From 2160f731c8b3b5aa1e06c26c71943fba2e2fb7bc Mon Sep 17 00:00:00 2001 From: Andrew Reusch Date: Thu, 28 Apr 2022 15:19:43 -0700 Subject: [PATCH] Include BUILD_NUMBER in rebuilt docker image. (#11165) * This allows folks to retrigger Jenkins runs through the Jenkins UI rather than requiring the author to push an empty or amended commit. --- Jenkinsfile | 4 ++-- jenkins/Jenkinsfile.j2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 824edeac4f..fe7d2fd43b 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,7 +45,7 @@ // 'python3 jenkins/generate.py' // Note: This timestamp is here to ensure that updates to the Jenkinsfile are // always rebased on main before merging: -// Generated at 2022-04-27T09:06:39.799194 +// Generated at 2022-04-28T10:29:38.389939 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. --> @@ -264,7 +264,7 @@ def build_image(image_name) { returnStdout: true, script: 'git log -1 --format=\'%h\'' ).trim() - def full_name = "${image_name}:${env.BRANCH_NAME}-${hash}" + def full_name = "${image_name}:${env.BRANCH_NAME}-${hash}-${env.BUILD_NUMBER}" sh( script: "${docker_build} ${image_name} --spec ${full_name}", label: 'Build docker image' diff --git a/jenkins/Jenkinsfile.j2 b/jenkins/Jenkinsfile.j2 index 0d2d91ad91..fc2b90e016 100644 --- a/jenkins/Jenkinsfile.j2 +++ b/jenkins/Jenkinsfile.j2 @@ -261,7 +261,7 @@ def build_image(image_name) { returnStdout: true, script: 'git log -1 --format=\'%h\'' ).trim() - def full_name = "${image_name}:${env.BRANCH_NAME}-${hash}" + def full_name = "${image_name}:${env.BRANCH_NAME}-${hash}-${env.BUILD_NUMBER}" sh( script: "${docker_build} ${image_name} --spec ${full_name}", label: 'Build docker image' @@ -766,7 +766,7 @@ stage('Test') { ) {% endcall %} {% call(shard_index) m.sharded_test_step( - name="topi: GPU", + name="topi: GPU", node="GPU", num_shards=2, ws="tvm/topi-python-gpu",