Skip to content

Commit

Permalink
Include BUILD_NUMBER in rebuilt docker image. (#11165)
Browse files Browse the repository at this point in the history
* This allows folks to retrigger Jenkins runs through the Jenkins UI
   rather than requiring the author to push an empty or amended commit.
  • Loading branch information
areusch authored Apr 28, 2022
1 parent cedb0ba commit 2160f73
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions jenkins/Jenkinsfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 2160f73

Please sign in to comment.