You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ar...@apache.org on 2022/05/14 00:18:53 UTC

[tvm] 07/32: make rebuild-images flow build base images

This is an automated email from the ASF dual-hosted git repository.

areusch pushed a commit to branch areusch/freeze-dependencies
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 373c8f41801142b3a4fdba08f8b7ccbfae974222
Author: Andrew Reusch <ar...@gmail.com>
AuthorDate: Thu May 12 09:43:17 2022 -0700

    make rebuild-images flow build base images
---
 jenkins/Jenkinsfile.j2 | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/jenkins/Jenkinsfile.j2 b/jenkins/Jenkinsfile.j2
index 869447f8c3..60327dd93c 100644
--- a/jenkins/Jenkinsfile.j2
+++ b/jenkins/Jenkinsfile.j2
@@ -240,12 +240,27 @@ stage('Lint') {
 // a method (so the code can't all be inlined)
 lint()
 
-def build_image(image_name) {
+def build_base_image(arch_name) {
+  hash = sh(
+    returnStdout: true,
+    script: 'git log -1 --format=\'%h\''
+  ).trim()
+  sh(
+    script: 'docker/build-base-images.sh ${arch_name}',
+    label: 'Build base image for ${arch_name}'
+  }
+  archiveArtifacts artifacts: 'docker/build/base_${arch_name}/**', fingerprint: true
+  def files = findFiles(glob: 'docker/build/base_${arch_name}/**')
+  pack_lib('${arch_name}-lockfiles', files.join(', '))
+}
+
+def build_image(arch_name, image_name) {
   hash = sh(
     returnStdout: true,
     script: 'git log -1 --format=\'%h\''
   ).trim()
   def full_name = "${image_name}:${env.BRANCH_NAME}-${hash}-${env.BUILD_NUMBER}"
+  unpack_lib('${arch_name}-lockfiles')
   sh(
     script: "${docker_build} ${image_name} --spec ${full_name}",
     label: 'Build docker image'