Skip to content

Commit

Permalink
CI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Despire committed Nov 25, 2024
1 parent c064048 commit 9b508f8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/CI-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,30 +341,30 @@ jobs:
sudo apt update && sudo apt install terraform -y
- name: Set short sha output
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
run: echo "SHORT_GITHUB_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV

- name: Install kubectl
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
uses: azure/setup-kubectl@v4
with:
version: latest

- name: Install kustomize
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
uses: imranismail/setup-kustomize@v2
with:
kustomize-version: 4.5.6

- name: Set e2e kubeconfig
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
uses: azure/k8s-set-context@v4
with:
kubeconfig: ${{ secrets.E2E_CLUSTER_KUBECONFIG }}

# Deploy services to new namespace
- name: Deploy to new namespace
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
working-directory: ./manifests/claudie
run: |
#set log level to debug
Expand All @@ -385,7 +385,7 @@ jobs:
# Check if everything is ready and running
- name: Monitor status of the new namespace
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
run: |
arr=( ${{ env.SERVICES }} )
echo "${arr[@]}"
Expand All @@ -399,14 +399,14 @@ jobs:
kubectl get pods --namespace=claudie-${SHORT_GITHUB_SHA}-${GITHUB_RUN_NUMBER}
- name: Insert random test hostnames to loadbalancer test set
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
working-directory: ./manifests/testing-framework/test-sets
run: |
HOSTNAME=$(echo $RANDOM | md5sum | head -c 20; echo;) ../../yq e '.spec.loadBalancers.clusters.[1].dns.hostname = strenv(HOSTNAME)' test-set2/1.yaml -i
HOSTNAME=$(echo $RANDOM | md5sum | head -c 20; echo;) ../../yq e '.spec.loadBalancers.clusters.[0].dns.hostname = strenv(HOSTNAME)' test-set2/3.yaml -i
- name: Create test static nodes
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
working-directory: ./manifests/testing-framework/test-sets
run: |
sudo apt update && sudo apt install -y jq
Expand Down Expand Up @@ -455,7 +455,7 @@ jobs:
done
- name: Start the E2E tests
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
working-directory: ./manifests
run: |
NAME_HASH="testing-framework-${SHORT_GITHUB_SHA}-${GITHUB_RUN_NUMBER}" ./yq e -i '(select(.kind == "ClusterRoleBinding").metadata.name = strenv(NAME_HASH))' ./testing-framework/testing-framework.yaml
Expand All @@ -471,7 +471,7 @@ jobs:
rm -f install-man-page.sh
- name: Monitor E2E test
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
run: |
# Wait for completion as background process - capture PID
kubectl wait --for=condition=complete --timeout=25000s job/testing-framework -n claudie-${SHORT_GITHUB_SHA}-${GITHUB_RUN_NUMBER} &
Expand All @@ -494,7 +494,7 @@ jobs:
exit $exit_code
- name: Delete temporary namespace
if: (steps.determine-test-sets.skip_deploy == 'false')
if: (steps.determine-test-sets.outputs.skip_deploy == 'false')
run: |
kubectl delete namespace claudie-${SHORT_GITHUB_SHA}-${GITHUB_RUN_NUMBER}
Expand Down

0 comments on commit 9b508f8

Please sign in to comment.