Skip to content

Commit 81c5a50

Browse files
jentingroboquat
authored andcommitted
Double quote variable names to prevent word splitting
Signed-off-by: JenTing Hsiao <[email protected]>
1 parent ab98587 commit 81c5a50

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.werft/workspace-run-integration-tests.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pod:
5959
function cleanup ()
6060
{
6161
werft log phase "clean up" "clean up"
62-
git push origin :$BRANCH | werft log slice "clean up"
62+
git push origin "${BRANCH}" | werft log slice "clean up"
6363
werft log slice "clean up" --done
6464
}
6565
@@ -70,30 +70,30 @@ pod:
7070
7171
git config --global user.name roboquat
7272
git config --global user.email [email protected]
73-
git remote set-url origin https://oauth2:$[email protected]/gitpod-io/gitpod.git
73+
git remote set-url origin https://oauth2:"${ROBOQUAT_TOKEN}"@github.com/gitpod-io/gitpod.git
7474
7575
echo "copied config..." | werft log slice prepare
7676
go install github.com/csweichel/oci-tool@latest 2>&1 | werft log slice prepare
7777
werft log slice prepare --done
7878
7979
werft log phase "build preview environment" "build preview environment"
8080
echo integration test >> README.md
81-
git checkout -B $BRANCH
81+
git checkout -B "${BRANCH}"
8282
git add README.md
8383
git commit -m "integration test"
84-
git push --set-upstream origin $BRANCH
84+
git push --set-upstream origin "${BRANCH}"
8585
trap cleanup SIGINT SIGTERM EXIT
8686
87-
BUILD_ID=$(werft job list repo.ref==refs/heads/${BRANCH} -o yaml | yq r - "result[0].name")
87+
BUILD_ID=$(werft job list repo.ref==refs/heads/"${BRANCH}" -o yaml | yq r - "result[0].name")
8888
until [ "$BUILD_ID" != "" ]
8989
do
9090
sleep 1
91-
BUILD_ID=$(werft job list repo.ref==refs/heads/${BRANCH} -o yaml | yq r - "result[0].name")
91+
BUILD_ID=$(werft job list repo.ref==refs/heads/"${BRANCH}" -o yaml | yq r - "result[0].name")
9292
done
9393
echo "start build preview environment, job name: ${BUILD_ID}, this will take long time" | werft log slice "build preview environment"
9494
werft log result -d "build job" url "https://werft.gitpod-dev.com/job/${BUILD_ID}"
9595
96-
if ! werft job logs ${BUILD_ID} | werft log slice "build preview environment";
96+
if ! werft job logs "${BUILD_ID}" | werft log slice "build preview environment";
9797
then
9898
echo "build failed" | werft log slice "build preview environment"
9999
exit 1
@@ -136,8 +136,8 @@ pod:
136136
done
137137
138138
werft log phase "slack notification" "slack notification"
139-
context_name={{ .Name }}
140-
context_repo={{ .Repository.Repo }}
139+
context_name="{{ .Name }}"
140+
context_repo="{{ .Repository.Repo }}"
141141
werftJobUrl="https://werft.gitpod-dev.com/job/${context_name}"
142142
143143
if [ "${FAILURE_COUNT}" -ne "0" ]; then

0 commit comments

Comments
 (0)