Skip to content

Commit 8ff1920

Browse files
committed
CSPL-3776 Initial changes for int-tests build
1 parent 1871d25 commit 8ff1920

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

.github/workflows/int-test-workflow.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
- develop
66
- main
77
- feature**
8+
- CSPL-3776-vcluster-enablement
89
jobs:
910
build-operator-image:
1011
runs-on: ubuntu-latest
@@ -65,8 +66,6 @@ jobs:
6566
runs-on: ubuntu-latest
6667
needs: build-operator-image
6768
env:
68-
CLUSTER_NODES: 1
69-
CLUSTER_WORKERS: 3
7069
SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }}
7170
SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator
7271
SPLUNK_OPERATOR_IMAGE_FILENAME: splunk-operator
@@ -85,15 +84,6 @@ jobs:
8584
CLUSTER_WIDE: "true"
8685
DEPLOYMENT_TYPE: ""
8786
steps:
88-
- name: Set Test Cluster Name
89-
run: |
90-
echo "TEST_CLUSTER_NAME=eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID" >> $GITHUB_ENV
91-
- name: Set Test Cluster Nodes and Parallel Runs
92-
run: >-
93-
if grep -q "appframework" <<< "${{ matrix.test }}"; then
94-
echo "CLUSTER_WORKERS=5" >> $GITHUB_ENV
95-
echo "CLUSTER_NODES=2" >> $GITHUB_ENV
96-
fi
9787
- name: Checkcout code
9888
uses: actions/checkout@v2
9989
- name: Dotenv Action
@@ -158,10 +148,16 @@ jobs:
158148
run: |
159149
docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }}
160150
docker push ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }}
161-
- name: Create EKS cluster
162-
run: |
163-
export EKS_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }}
164-
make cluster-up
151+
- name: Login to test cluster
152+
run: |
153+
echo "Retrieving kubeconfig for ${TEST_CLUSTER_NAME}"
154+
eksctl utils write-kubeconfig --cluster=${TEST_CLUSTER_NAME}
155+
- name: Install vCluster CLI
156+
uses: loft-sh/setup-vcluster@main
157+
- name: Create Virtual Cluster
158+
env:
159+
NAME: eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID
160+
run: vcluster create $NAME --project default
165161
- name: install metric server
166162
run: |
167163
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
@@ -192,10 +188,10 @@ jobs:
192188
run: |
193189
make cleanup
194190
make clean
195-
- name: Cleanup up EKS cluster
196-
if: ${{ always() }}
197-
run: |
198-
make cluster-down
191+
- name: Delete Virtual Cluster
192+
env:
193+
NAME: eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID
194+
run: vcluster delete $NAME --project default
199195
#- name: Test Report
200196
# uses: dorny/test-reporter@v1
201197
# if: success() || failure() # run this step even if previous step failed

0 commit comments

Comments
 (0)