File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed 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+ done
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