|
59 | 59 | function cleanup ()
|
60 | 60 | {
|
61 | 61 | 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" |
63 | 63 | werft log slice "clean up" --done
|
64 | 64 | }
|
65 | 65 |
|
|
70 | 70 |
|
71 | 71 | git config --global user.name roboquat
|
72 | 72 | 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 |
74 | 74 |
|
75 | 75 | echo "copied config..." | werft log slice prepare
|
76 | 76 | go install github.com/csweichel/oci-tool@latest 2>&1 | werft log slice prepare
|
77 | 77 | werft log slice prepare --done
|
78 | 78 |
|
79 | 79 | werft log phase "build preview environment" "build preview environment"
|
80 | 80 | echo integration test >> README.md
|
81 |
| - git checkout -B $BRANCH |
| 81 | + git checkout -B "${BRANCH}" |
82 | 82 | git add README.md
|
83 | 83 | git commit -m "integration test"
|
84 |
| - git push --set-upstream origin $BRANCH |
| 84 | + git push --set-upstream origin "${BRANCH}" |
85 | 85 | trap cleanup SIGINT SIGTERM EXIT
|
86 | 86 |
|
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") |
88 | 88 | until [ "$BUILD_ID" != "" ]
|
89 | 89 | do
|
90 | 90 | 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") |
92 | 92 | done
|
93 | 93 | echo "start build preview environment, job name: ${BUILD_ID}, this will take long time" | werft log slice "build preview environment"
|
94 | 94 | werft log result -d "build job" url "https://werft.gitpod-dev.com/job/${BUILD_ID}"
|
95 | 95 |
|
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"; |
97 | 97 | then
|
98 | 98 | echo "build failed" | werft log slice "build preview environment"
|
99 | 99 | exit 1
|
|
136 | 136 | done
|
137 | 137 |
|
138 | 138 | 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 }}" |
141 | 141 | werftJobUrl="https://werft.gitpod-dev.com/job/${context_name}"
|
142 | 142 |
|
143 | 143 | if [ "${FAILURE_COUNT}" -ne "0" ]; then
|
|
0 commit comments