Skip to content

Commit

Permalink
ci: Add exit code capture for PR pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jpayne3506 committed Nov 8, 2024
1 parent cf89840 commit 2069bf0
Show file tree
Hide file tree
Showing 20 changed files with 54 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down
1 change: 1 addition & 0 deletions .pipelines/singletenancy/aks-swift/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down
1 change: 1 addition & 0 deletions .pipelines/singletenancy/aks/aks-e2e.steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ steps:
displayName: "Restart Nodes"

- script: |
set -e
kubectl get pods -A -o wide
echo "Deploying test pods"
Expand Down
1 change: 1 addition & 0 deletions .pipelines/singletenancy/aks/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ steps:
done
displayName: "Restart Nodes"
- script: |
set -e
kubectl get pods -A -o wide
echo "Deploying test pods"
cd test/integration/load
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down Expand Up @@ -129,6 +130,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down Expand Up @@ -138,6 +139,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand All @@ -106,6 +107,7 @@ steps:
retryCountOnTaskFailure: 3

- script: |
set -e
echo "Run Cilium Connectivity Tests"
cilium status
cilium connectivity test --connect-timeout 4s --request-timeout 30s --test '!pod-to-pod-encryption,!node-to-node-encryption,!no-unexpected-packet-drops' --force-deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand All @@ -110,6 +111,7 @@ steps:
retryCountOnTaskFailure: 3

- script: |
set -e
echo "Run Cilium Connectivity Tests"
cilium status
cilium connectivity test --connect-timeout 4s --request-timeout 30s --test '!pod-to-pod-encryption,!node-to-node-encryption,!no-unexpected-packet-drops' --force-deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ steps:
inlineScript: |
set -e
make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
ls -lah
ls -lah
pwd
kubectl cluster-info
kubectl get po -owide -A
Expand Down Expand Up @@ -81,5 +81,8 @@ steps:
retryCountOnTaskFailure: 3
name: "nodeSubnetE2ETests"
displayName: "Run NodeSubnet E2E"
- template: ../../templates/cilium-tests.yaml
parameters:
clusterName: ${{ parameters.clusterName }}
scaleup: ${{ parameters.scaleup }}
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand All @@ -110,6 +111,7 @@ steps:
retryCountOnTaskFailure: 3

- script: |
set -e
echo "Run Cilium Connectivity Tests"
cilium status
cilium connectivity test --connect-timeout 4s --request-timeout 30s --test '!pod-to-pod-encryption,!node-to-node-encryption' --force-deploy
Expand All @@ -135,19 +137,17 @@ steps:
displayName: "Run Hubble Connectivity Tests"
- script: |
set -e
echo "validate pod IP assignment and check systemd-networkd restart"
kubectl get pod -owide -A
# Deleting echo-external-node deployment until cilium version matches TODO. https://github.com/cilium/cilium-cli/issues/67 is addressing the change.
# Saves 17 minutes
kubectl delete deploy -n $(ciliumNamespace) echo-external-node
if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]; then
echo "Check cilium identities in $(ciliumNamespace) namepsace during nightly run"
echo "expect the identities to be deleted when the namespace is deleted"
kubectl get ciliumidentity | grep cilium-test
fi
make test-validate-state
echo "delete cilium connectivity test resources and re-validate state"
echo "delete cilium connectivity test resources and re-validate state" # TODO Delete this and the next 4 lines if connectivity no longer has bug
kubectl delete ns $(ciliumNamespace)
kubectl get pod -owide -A
make test-validate-state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand All @@ -107,6 +108,7 @@ steps:
retryCountOnTaskFailure: 3

- script: |
set -e
echo "Run Cilium Connectivity Tests"
cilium status
cilium connectivity test --connect-timeout 4s --request-timeout 30s --test '!pod-to-pod-encryption,!node-to-node-encryption' --force-deploy
Expand Down Expand Up @@ -134,19 +136,17 @@ steps:
displayName: "Run Hubble Connectivity Tests"
- script: |
set -e
echo "validate pod IP assignment and check systemd-networkd restart"
kubectl get pod -owide -A
# Deleting echo-external-node deployment until cilium version matches TODO. https://github.com/cilium/cilium-cli/issues/67 is addressing the change.
# Saves 17 minutes
kubectl delete deploy -n $(ciliumNamespace) echo-external-node
if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]; then
echo "Check cilium identities in $(ciliumNamespace) namepsace during nightly run"
echo "expect the identities to be deleted when the namespace is deleted"
kubectl get ciliumidentity | grep cilium-test
fi
make test-validate-state
echo "delete cilium connectivity test resources and re-validate state"
echo "delete cilium connectivity test resources and re-validate state" # TODO Delete this and the next 4 lines if connectivity no longer has bug
kubectl delete ns $(ciliumNamespace)
kubectl get pod -owide -A
make test-validate-state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand All @@ -132,6 +133,7 @@ steps:
retryCountOnTaskFailure: 3

- script: |
set -e
echo "Run Cilium Connectivity Tests"
cilium status
if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]
Expand Down Expand Up @@ -162,11 +164,9 @@ steps:
displayName: "Run Hubble Connectivity Tests"
- script: |
set -e
echo "validate pod IP assignment and check systemd-networkd restart"
kubectl get pod -owide -A
# Deleting echo-external-node deployment until cilium version matches TODO. https://github.com/cilium/cilium-cli/issues/67 is addressing the change.
# Saves 17 minutes
kubectl delete deploy -n $(ciliumNamespace) echo-external-node
if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]; then
echo "Check cilium identities in $(ciliumNamespace) namepsace during nightly run"
echo "expect the identities to be deleted when the namespace is deleted"
Expand Down Expand Up @@ -207,7 +207,8 @@ steps:
name: "CiliumIdentities"
displayName: "Verify Cilium Identities Deletion"
- script: |
- script: | # TODO REMOVE THIS STEP, make test-load covers this
set -e
echo "validate pod IP assignment before CNS restart"
kubectl get pod -owide -A
make test-validate-state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand All @@ -129,6 +130,7 @@ steps:
retryCountOnTaskFailure: 3

- script: |
set -e
echo "Run Cilium Connectivity Tests"
cilium status
if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]
Expand Down Expand Up @@ -160,18 +162,16 @@ steps:
displayName: "Run Hubble Connectivity Tests"
- script: |
set -e
echo "validate pod IP assignment and check systemd-networkd restart"
kubectl get pod -owide -A
# Deleting echo-external-node deployment until cilium version matches TODO. https://github.com/cilium/cilium-cli/issues/67 is addressing the change.
# Saves 17 minutes
kubectl delete deploy -n $(ciliumNamespace) echo-external-node
if [ "$CILIUM_VERSION_TAG" = "cilium-nightly-pipeline" ]; then
echo "Check cilium identities in $(ciliumNamespace) namepsace during nightly run"
echo "expect the identities to be deleted when the namespace is deleted"
kubectl get ciliumidentity | grep cilium-test
fi
make test-validate-state
echo "delete cilium connectivity test resources and re-validate state"
echo "delete cilium connectivity test resources and re-validate state" # TODO Delete this and the next 4 lines if connectivity no longer has bug
kubectl delete ns $(ciliumNamespace)
kubectl get pod -owide -A
make test-validate-state
Expand Down Expand Up @@ -206,7 +206,8 @@ steps:
name: "CiliumIdentities"
displayName: "Verify Cilium Identities Deletion"
- script: |
- script: | # TODO REMOVE THIS STEP, make test-load covers this
set -e
echo "validate pod IP assignment before CNS restart"
kubectl get pod -owide -A
make test-validate-state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,8 @@ steps:
name: "aziliumTest"
displayName: "Run Azilium E2E"
- template: ../../templates/cilium-tests.yaml
- template: ../../templates/cilium-tests.yaml
parameters:
clusterName: ${{ parameters.clusterName }}
scaleup: ${{ parameters.scaleup }}

2 changes: 2 additions & 0 deletions .pipelines/singletenancy/cilium/cilium-e2e.steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand All @@ -107,6 +108,7 @@ steps:
retryCountOnTaskFailure: 3

- script: |
set -e
echo "Run Cilium Connectivity Tests"
cilium status
cilium connectivity test --connect-timeout 4s --request-timeout 30s --test '!pod-to-pod-encryption,!node-to-node-encryption' --force-deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down Expand Up @@ -134,6 +135,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down Expand Up @@ -143,6 +144,7 @@ steps:
workingDirectory: $(ACN_DIR)
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand Down
1 change: 1 addition & 0 deletions .pipelines/templates/cilium-cli.steps.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
steps:
- script: |
set -e
echo "install cilium CLI"
if [[ ${CILIUM_VERSION_TAG} =~ ^1.1[1-3].[0-9]{1,2} ]]; then
echo "Cilium Agent Version ${BASH_REMATCH[0]}"
Expand Down
1 change: 1 addition & 0 deletions .pipelines/templates/cilium-cli.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
steps:
- script: |
set -e
echo "install cilium CLI"
if [[ ${CILIUM_VERSION_TAG} =~ ^1.1[1-3].[0-9]{1,2} ]]; then
echo "Cilium Agent Version ${BASH_REMATCH[0]}"
Expand Down
10 changes: 5 additions & 5 deletions .pipelines/templates/cilium-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ steps:
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
set -e
cd test/integration/load
# Scale Cluster Up/Down to confirm functioning CNS
Expand All @@ -45,6 +46,7 @@ steps:
retryCountOnTaskFailure: 3

- script: |
set -e
echo "Run Cilium Connectivity Tests"
cilium status
cilium connectivity test --connect-timeout 4s --request-timeout 30s --test '!pod-to-pod-encryption,!node-to-node-encryption' --force-deploy
Expand All @@ -55,13 +57,11 @@ steps:
displayName: "Run Cilium Connectivity Tests"
- script: |
set -e
echo "validate pod IP assignment and check systemd-networkd restart"
kubectl get pod -owide -A
# Deleting echo-external-node deployment until cilium version matches TODO. https://github.com/cilium/cilium-cli/issues/67 is addressing the change.
# Saves 17 minutes
kubectl delete deploy -n $(ciliumNamespace) echo-external-node
make test-validate-state
echo "delete cilium connectivity test resources and re-validate state"
echo "delete cilium connectivity test resources and re-validate state" # TODO Delete this and the next 4 lines if connectivity no longer has bug
kubectl delete ns $(ciliumNamespace)
kubectl get pod -owide -A
make test-validate-state
Expand All @@ -83,4 +83,4 @@ steps:
kubectl -n kube-system patch daemonset azure-cns --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]'
fi
name: "testAsyncDelete"
displayName: "Verify Async Delete when CNS is down"
displayName: "Verify Async Delete when CNS is down"

0 comments on commit 2069bf0

Please sign in to comment.