|
5 | 5 | - develop |
6 | 6 | - main |
7 | 7 | - feature** |
| 8 | + - CSPL-3776-vcluster-enablement |
8 | 9 | jobs: |
9 | 10 | build-operator-image: |
10 | 11 | runs-on: ubuntu-latest |
|
51 | 52 | matrix: |
52 | 53 | test: |
53 | 54 | [ |
54 | | - appframeworksS1, |
| 55 | + appframeworks1, |
55 | 56 | managerappframeworkc3, |
56 | 57 | managerappframeworkm4, |
57 | 58 | managersecret, |
@@ -84,16 +85,15 @@ jobs: |
84 | 85 | ENTERPRISE_LICENSE_LOCATION: ${{ secrets.ENTERPRISE_LICENSE_LOCATION }} |
85 | 86 | CLUSTER_WIDE: "true" |
86 | 87 | DEPLOYMENT_TYPE: "" |
| 88 | + TEST_CLUSTER_NAME: cspl-3776-vcluster-test |
| 89 | + TEST_VCLUSTER_NAME: eks-integ-${{ matrix.test }}-${{ github.run_id }} |
87 | 90 | 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 | 91 | - name: Set Test Cluster Nodes and Parallel Runs |
92 | 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 |
| 93 | + if grep -q "appframework" <<< "${{ matrix.test }}"; then |
| 94 | + echo "CLUSTER_WORKERS=5" >> $GITHUB_ENV |
| 95 | + echo "CLUSTER_NODES=2" >> $GITHUB_ENV |
| 96 | + fi |
97 | 97 | - name: Checkcout code |
98 | 98 | uses: actions/checkout@v2 |
99 | 99 | - name: Dotenv Action |
@@ -127,7 +127,7 @@ jobs: |
127 | 127 | curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 |
128 | 128 | chmod 700 get_helm.sh |
129 | 129 | ./get_helm.sh |
130 | | - DESIRED_VERSION=v3.8.2 bash get_helm.sh |
| 130 | + DESIRED_VERSION=v3.10.0 bash get_helm.sh |
131 | 131 | - name: Install EKS CTL |
132 | 132 | run: | |
133 | 133 | curl --silent --insecure --location "https://github.com/weaveworks/eksctl/releases/download/${{ steps.dotenv.outputs.EKSCTL_VERSION }}/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp |
@@ -158,10 +158,14 @@ jobs: |
158 | 158 | run: | |
159 | 159 | docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} |
160 | 160 | 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 |
| 161 | + - name: Login to test cluster |
| 162 | + run: | |
| 163 | + echo "Retrieving kubeconfig for ${TEST_CLUSTER_NAME}" |
| 164 | + eksctl utils write-kubeconfig --cluster=${TEST_CLUSTER_NAME} |
| 165 | + - name: Install vCluster CLI |
| 166 | + uses: loft-sh/setup-vcluster@main |
| 167 | + - name: Create Virtual Cluster |
| 168 | + run: vcluster create ${TEST_VCLUSTER_NAME} |
165 | 169 | - name: install metric server |
166 | 170 | run: | |
167 | 171 | kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml |
@@ -192,10 +196,8 @@ jobs: |
192 | 196 | run: | |
193 | 197 | make cleanup |
194 | 198 | make clean |
195 | | - - name: Cleanup up EKS cluster |
196 | | - if: ${{ always() }} |
197 | | - run: | |
198 | | - make cluster-down |
| 199 | + - name: Delete Virtual Cluster |
| 200 | + run: vcluster delete ${TEST_VCLUSTER_NAME} |
199 | 201 | #- name: Test Report |
200 | 202 | # uses: dorny/test-reporter@v1 |
201 | 203 | # if: success() || failure() # run this step even if previous step failed |
|
0 commit comments