Skip to content

Commit 09ca839

Browse files
fix(CI): don't upload to old bucket and declare varaibles locally (#211)
1 parent d8e63c9 commit 09ca839

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

Jenkinsfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,16 @@ parallel(
154154
revision: {
155155
node(linux) {
156156

157-
flags = ""
157+
def flags = ""
158158
if (git_branch != "remotes/origin/master") {
159159
echo "Skipping build of 386 binaries to shorten CI for Pull Requests"
160160
flags += "-e BUILD_ARCH=amd64"
161161
}
162162

163-
tmp_dir = mktmp()
164-
dist_dir = "-e DIST_DIR=/upload -v ${tmp_dir}:/upload"
163+
def tmp_dir = mktmp()
164+
def dist_dir = "-e DIST_DIR=/upload -v ${tmp_dir}:/upload"
165165
sh "docker run ${flags} -e REVISION=${git_commit.take(7)} ${dist_dir} --rm ${test_image} make build-revision"
166166

167-
168-
upload_artifacts(dist_dir, '6561701c-b7b4-4796-83c4-9d87946799e4', old_gcs_bucket, true)
169167
if (git_branch == "remotes/origin/master") {
170168
upload_artifacts(dist_dir, '6029cf4e-eaa3-4a8e-9dc7-744d118ebe6a', master_gcs_bucket, true)
171169
} else {
@@ -178,11 +176,10 @@ parallel(
178176
latest: {
179177
node(linux) {
180178
if (git_branch == "remotes/origin/master") {
181-
tmp_dir = mktmp()
182-
dist_dir = "-e DIST_DIR=/upload -v ${tmp_dir}:/upload"
179+
def tmp_dir = mktmp()
180+
def dist_dir = "-e DIST_DIR=/upload -v ${tmp_dir}:/upload"
183181
sh "docker run ${dist_dir} --rm ${test_image} make build-latest"
184182

185-
upload_artifacts(dist_dir, '6561701c-b7b4-4796-83c4-9d87946799e4', old_gcs_bucket, false)
186183
upload_artifacts(dist_dir, '6029cf4e-eaa3-4a8e-9dc7-744d118ebe6a', master_gcs_bucket, false)
187184
sh "docker run ${dist_dir} --rm ${test_image} sh -c 'rm -rf /upload/*'"
188185
sh "rm -rf ${tmp_dir}"

0 commit comments

Comments
 (0)