Skip to content

Commit c4d9343

Browse files
authored
ci: fix log template pipeline variable expansion (#4385)
fix log template pipeline variable expansion $(acnLogs) is a pipeline variable, $acnLogs is a bash variable echo "##vso[task.setvariable variable=acnLogs]$acnLogs" sets the pipeline var $acnLogs the bash variable was not set in the task, so it resolved to empty (bad) $(acnLogs) is replaced with the pipeline variable val prior to the script running
1 parent ab1d877 commit c4d9343

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.pipelines/templates/log-template.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,12 @@ steps:
112112
if [ -z ${array[0]} ]; then
113113
echo "There are no kube-system pods in a non-ready state."
114114
else
115-
mkdir -p $acnLogs/${{ parameters.os }}non-ready
116-
echo "Directory created: $acnLogs/${{ parameters.os }}non-ready"
115+
mkdir -p $(acnLogs)/${{ parameters.os }}non-ready
116+
echo "Directory created: $(acnLogs)/${{ parameters.os }}non-ready"
117117
echo "Capturing failed pods"
118118
for pod in $podList; do
119-
kubectl describe pod -n kube-system $pod > $acnLogs/${{ parameters.os }}non-ready/$pod.txt
120-
echo "$acnLogs/${{ parameters.os }}non-ready/$pod.txt"
119+
kubectl describe pod -n kube-system $pod > $(acnLogs)/${{ parameters.os }}non-ready/$pod.txt
120+
echo "$(acnLogs)/${{ parameters.os }}non-ready/$pod.txt"
121121
done
122122
fi
123123
displayName: Failure Logs

0 commit comments

Comments
 (0)