Skip to content

Commit ba5faa5

Browse files
authored
ci: Improve CNI|NPM integration test (#2498)
* ci: increase timeout for CNI|NPM intergration test * add: retry to generate NPM logs
1 parent f6ce90c commit ba5faa5

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.pipelines/npm/npm-cni-integration-test.yaml

+11-7
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
displayName: "NPM k8s E2E"
1717
dependsOn: ${{ parameters.dependsOn }}
1818
condition: and( and( not(canceled()), not(failed()) ), ${{ or(contains(parameters.os_version, '2022'), eq(parameters.os, 'linux') ) }} , or( contains(variables.CONTROL_SCENARIO, 'npm') , contains(variables.CONTROL_SCENARIO, 'all') ) )
19+
timeoutInMinutes: 180 # This is for testing windows, due to the 3m between the 14 tests -> results in 42m of wasted time
1920
pool:
2021
name: $(BUILD_POOL_NAME_DEFAULT)
2122
demands:
@@ -120,15 +121,17 @@ jobs:
120121
--ginkgo.focus="$focus" \
121122
--ginkgo.skip="NetworkPolicyLegacy|SCTP" \
122123
--kubeconfig=$HOME/.kube/config
123-
124-
# Untaint Linux (system) nodes once testing is complete
125-
if ${{ lower(eq(parameters.os, 'windows')) }}
126-
then
127-
kubectl taint nodes -l kubernetes.azure.com/mode=system node-role.kubernetes.io/control-plane:NoSchedule-
128-
fi
129124
displayName: "Run Kubernetes e2e.test"
130125
continueOnError: ${{ parameters.continueOnError }}
131126
127+
- ${{ if eq(parameters.os, 'windows') }}:
128+
- bash: |
129+
# Untaint Linux (system) nodes once testing is complete
130+
kubectl taint nodes -l kubernetes.azure.com/mode=system node-role.kubernetes.io/control-plane:NoSchedule-
131+
132+
displayName: Untaint Linux Nodes
133+
condition: always()
134+
132135
- bash: |
133136
npmLogs=$(System.DefaultWorkingDirectory)/${{ parameters.clusterName }}_npmLogs_Attempt_#$(System.StageAttempt)
134137
mkdir -p $npmLogs
@@ -137,9 +140,10 @@ jobs:
137140
npmPodList=`kubectl get pods -n kube-system | grep npm | awk '{print $1}'`
138141
# capture all logs
139142
for npmPod in $npmPodList; do
140-
kubectl logs -n kube-system $npmPod > $npmLogs/$npmPod-logs.txt
143+
kubectl logs -n kube-system $npmPod > $npmLogs/$npmPod-logs.txt
141144
done
142145
displayName: Generate NPM pod logs
146+
retryCountOnTaskFailure: 3
143147
condition: always()
144148
145149
- publish: $(System.DefaultWorkingDirectory)/${{ parameters.clusterName }}_npmLogs_Attempt_#$(System.StageAttempt)

0 commit comments

Comments
 (0)