File tree 2 files changed +50
-2
lines changed
2 files changed +50
-2
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,37 @@ stages:
144
144
service : true
145
145
146
146
- job : logs
147
- displayName : " Failure Logs"
147
+ displayName : " Nightly Logs"
148
148
dependsOn :
149
149
- cilium_nightly
150
150
- cni_linux
151
- condition : failed ()
151
+ condition : always ()
152
152
steps :
153
+ - template : ../../templates/cilium-cli.yaml
154
+
155
+ - task : AzureCLI@2
156
+ inputs :
157
+ azureSubscription : $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
158
+ scriptLocation : " inlineScript"
159
+ scriptType : " bash"
160
+ addSpnToEnvironment : true
161
+ inlineScript : |
162
+ make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
163
+
164
+ set -e
165
+ echo "Run Cilium Connectivity Tests"
166
+ cilium status
167
+ cilium connectivity test --test check-log-errors --log-check-levels error
168
+ name : " ciliumConnectivityTests"
169
+ displayName : " Run Cilium Connectivity Tests"
170
+ condition : always()
171
+
172
+ - template : ../../templates/log-check-template.yaml # Operator Check
173
+ parameters :
174
+ clusterName : $(clusterName)-$(commitID)
175
+ podLabel : " name=cilium-operator"
176
+ logGrep : " level=error"
177
+
153
178
- template : ../../templates/log-template.yaml
154
179
parameters :
155
180
clusterName : ciliumnightly-$(commitID)
Original file line number Diff line number Diff line change
1
+ parameters :
2
+ clusterName : " "
3
+ podLabel : " "
4
+ logGrep : " "
5
+
6
+ steps :
7
+ - task : AzureCLI@2
8
+ inputs :
9
+ azureSubscription : $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
10
+ scriptLocation : " inlineScript"
11
+ scriptType : " bash"
12
+ addSpnToEnvironment : true
13
+ inlineScript : |
14
+ make -C ./hack/aks set-kubeconf AZCLI=az CLUSTER=${{ parameters.clusterName }}
15
+
16
+ if ! [ -z "$(kubectl logs -n kube-system -l ${{ parameters.podLabel }} --tail=-1 | grep ${{ parameters.logGrep }})" ]; then
17
+ kubectl logs -n kube-system -l ${{ parameters.podLabel }} --tail=-1 | grep ${{ parameters.logGrep }}
18
+ echo "Logs found with ${{ parameters.logGrep }}"
19
+ exit 1
20
+ fi
21
+ # Leaving "name:" blank as this template could be called multiple times in a single job with the same parameters.
22
+ displayName : " Check pod with ${{ parameters.podLabel }} label for ${{ parameters.logGrep }}"
23
+ condition : always()
You can’t perform that action at this time.
0 commit comments