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 7aabc6a3dc3d837c2cf4bd75973da7257d7df195 Author: Andrew Reusch <[email protected]> AuthorDate: Tue May 24 12:28:47 2022 -0700 fix docker images to built ones for testing. --- Jenkinsfile | 52 +++++++++++++++++++++++++++++++++++------------- jenkins/Build.groovy.j2 | 7 +++++++ jenkins/Deploy.groovy.j2 | 1 + jenkins/Jenkinsfile.j2 | 34 +++++++++++++++++++++---------- jenkins/Lint.groovy.j2 | 1 + jenkins/Test.groovy.j2 | 4 ++++ 6 files changed, 74 insertions(+), 25 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0f7ea45c64..d9d661572b 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,18 +45,27 @@ // '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-06-10T14:16:52.019357 +// Generated at 2022-06-10T14:18:07.069924 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. --> -ci_lint = 'tlcpack/ci-lint:20220513-055910-fa834f67e' -ci_gpu = 'tlcpack/ci-gpu:20220519-055908-ddfa1da69' -ci_cpu = 'tlcpack/ci-cpu:20220519-055908-ddfa1da69' -ci_wasm = 'tlcpack/ci-wasm:20220513-055910-fa834f67e' -ci_i386 = 'tlcpack/ci-i386:20220513-055910-fa834f67e' -ci_qemu = 'tlcpack/ci-qemu:20220517-094028-de21c8f2e' -ci_arm = 'tlcpack/ci-arm:20220513-055910-fa834f67e' -ci_hexagon = 'tlcpack/ci-hexagon:20220516-190055-672ce3365' +def aws_account_id = '' +node("CPU-SMALL") { +aws_account_id = sh( + returnStdout: true, + script: 'aws sts get-caller-identity | grep Account | cut -f4 -d\\"', + label: 'Get AWS ID' + ).trim() +} +def AWS_DEFAULT_REGION = 'us-west-2' +ci_lint = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_lint:areusch-2ffreeze-dependencies-4233ca6eb-49" +ci_gpu = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_gpu:areusch-2ffreeze-dependencies-6799bd6f9-49" +ci_cpu = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_cpu:areusch-2ffreeze-dependencies-98aa6dde6-49" +ci_wasm = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_wasm:areusch-2ffreeze-dependencies-c12a78740-49" +ci_i386 = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_i386:areusch-2ffreeze-dependencies-89e22c948-49" +ci_qemu = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_qemu:areusch-2ffreeze-dependencies-e839c36c8-48" +ci_arm = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_arm:areusch-2ffreeze-dependencies-b9d48a35f-49" +ci_hexagon = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_hexagon:areusch-2ffreeze-dependencies-e7d44544e-49" // <--- End of regex-scanned config. // Parameters to allow overriding (in Jenkins UI), the images @@ -94,6 +103,7 @@ if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { return } + // Filenames for stashing between build and test steps s3_prefix = "tvm-jenkins-artifacts-prod/tvm/${env.BRANCH_NAME}/${env.BUILD_NUMBER}" @@ -488,7 +498,8 @@ def lint() { withEnv([ 'TVM_NUM_SHARDS=2', 'TVM_SHARD_INDEX=0'], { - sh ( + docker_init(ci_lint) + sh ( script: "${docker_run} ${ci_lint} ./tests/scripts/task_lint.sh", label: 'Run lint', ) @@ -506,7 +517,8 @@ def lint() { withEnv([ 'TVM_NUM_SHARDS=2', 'TVM_SHARD_INDEX=1'], { - sh ( + docker_init(ci_lint) + sh ( script: "${docker_run} ${ci_lint} ./tests/scripts/task_lint.sh", label: 'Run lint', ) @@ -603,6 +615,7 @@ stage('Build') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-gpu") { docker_init(ci_gpu) init_git() + docker_init(ci_gpu) sh "${docker_run} --no-gpu ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh build" make("${ci_gpu} --no-gpu", 'build', '-j2') sh( @@ -650,6 +663,7 @@ stage('Build') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-cpu") { docker_init(ci_cpu) init_git() + docker_init(ci_cpu) sh ( script: "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh build", label: 'Create CPU cmake config', @@ -690,6 +704,7 @@ stage('Build') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-wasm") { docker_init(ci_wasm) init_git() + docker_init(ci_wasm) sh ( script: "${docker_run} ${ci_wasm} ./tests/scripts/task_config_build_wasm.sh build", label: 'Create WASM cmake config', @@ -715,6 +730,7 @@ stage('Build') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-i386") { docker_init(ci_i386) init_git() + docker_init(ci_i386) sh ( script: "${docker_run} ${ci_i386} ./tests/scripts/task_config_build_i386.sh build", label: 'Create i386 cmake config', @@ -749,6 +765,7 @@ stage('Build') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-arm") { docker_init(ci_arm) init_git() + docker_init(ci_arm) sh ( script: "${docker_run} ${ci_arm} ./tests/scripts/task_config_build_arm.sh build", label: 'Create ARM cmake config', @@ -781,6 +798,7 @@ stage('Build') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-qemu") { docker_init(ci_qemu) init_git() + docker_init(ci_qemu) sh ( script: "${docker_run} ${ci_qemu} ./tests/scripts/task_config_build_qemu.sh build", label: 'Create QEMU cmake config', @@ -812,6 +830,7 @@ stage('Build') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/build-hexagon") { docker_init(ci_hexagon) init_git() + docker_init(ci_hexagon) sh ( script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_config_build_hexagon.sh build", label: 'Create Hexagon cmake config', @@ -3087,6 +3106,7 @@ stage('Test') { docker_init(ci_cpu) init_git() withEnv(['PLATFORM=cpu'], { + docker_init(ci_cpu) sh( script: """ set -eux @@ -3140,6 +3160,7 @@ stage('Test') { docker_init(ci_qemu) init_git() withEnv(['PLATFORM=qemu'], { + docker_init(ci_qemu) sh( script: """ set -eux @@ -3193,6 +3214,7 @@ stage('Test') { docker_init(ci_cpu) init_git() withEnv(['PLATFORM=cpu'], { + docker_init(ci_cpu) sh( script: """ set -eux @@ -3238,6 +3260,7 @@ stage('Test') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/docs-python-gpu") { docker_init(ci_gpu) init_git() + docker_init(ci_gpu) sh( script: """ set -eux @@ -3364,6 +3387,7 @@ def deploy() { if (env.BRANCH_NAME == 'main' && env.DOCS_DEPLOY_ENABLED == 'yes') { node('CPU') { ws("workspace/exec_${env.EXECUTOR_NUMBER}/tvm/deploy-docs") { + docker_init(ci_gpu) sh( script: """ set -eux @@ -3421,9 +3445,9 @@ cancel_previous_build() prepare() -if (rebuild_docker_images) { - build_docker_images() -} +// if (rebuild_docker_images) { +// build_docker_images() +// } lint() diff --git a/jenkins/Build.groovy.j2 b/jenkins/Build.groovy.j2 index fcde53f559..5c9e40dfcd 100644 --- a/jenkins/Build.groovy.j2 +++ b/jenkins/Build.groovy.j2 @@ -87,6 +87,7 @@ stage('Build') { ws({{ m.per_exec_ws('tvm/build-gpu') }}) { docker_init(ci_gpu) init_git() + docker_init(ci_gpu) sh "${docker_run} --no-gpu ${ci_gpu} ./tests/scripts/task_config_build_gpu.sh build" make("${ci_gpu} --no-gpu", 'build', '-j2') {{ m.upload_artifacts(tag='gpu', filenames=tvm_multilib, folders=microtvm_template_projects) }} @@ -105,6 +106,7 @@ stage('Build') { ws({{ m.per_exec_ws('tvm/build-cpu') }}) { docker_init(ci_cpu) init_git() + docker_init(ci_cpu) sh ( script: "${docker_run} ${ci_cpu} ./tests/scripts/task_config_build_cpu.sh build", label: 'Create CPU cmake config', @@ -129,6 +131,7 @@ stage('Build') { ws({{ m.per_exec_ws('tvm/build-wasm') }}) { docker_init(ci_wasm) init_git() + docker_init(ci_wasm) sh ( script: "${docker_run} ${ci_wasm} ./tests/scripts/task_config_build_wasm.sh build", label: 'Create WASM cmake config', @@ -154,6 +157,7 @@ stage('Build') { ws({{ m.per_exec_ws('tvm/build-i386') }}) { docker_init(ci_i386) init_git() + docker_init(ci_i386) sh ( script: "${docker_run} ${ci_i386} ./tests/scripts/task_config_build_i386.sh build", label: 'Create i386 cmake config', @@ -172,6 +176,7 @@ stage('Build') { ws({{ m.per_exec_ws('tvm/build-arm') }}) { docker_init(ci_arm) init_git() + docker_init(ci_arm) sh ( script: "${docker_run} ${ci_arm} ./tests/scripts/task_config_build_arm.sh build", label: 'Create ARM cmake config', @@ -190,6 +195,7 @@ stage('Build') { ws({{ m.per_exec_ws('tvm/build-qemu') }}) { docker_init(ci_qemu) init_git() + docker_init(ci_qemu) sh ( script: "${docker_run} ${ci_qemu} ./tests/scripts/task_config_build_qemu.sh build", label: 'Create QEMU cmake config', @@ -208,6 +214,7 @@ stage('Build') { ws({{ m.per_exec_ws('tvm/build-hexagon') }}) { docker_init(ci_hexagon) init_git() + docker_init(ci_hexagon) sh ( script: "${docker_run} ${ci_hexagon} ./tests/scripts/task_config_build_hexagon.sh build", label: 'Create Hexagon cmake config', diff --git a/jenkins/Deploy.groovy.j2 b/jenkins/Deploy.groovy.j2 index 3a049c5141..5ec0c62172 100644 --- a/jenkins/Deploy.groovy.j2 +++ b/jenkins/Deploy.groovy.j2 @@ -81,6 +81,7 @@ def deploy() { if (env.BRANCH_NAME == 'main' && env.DOCS_DEPLOY_ENABLED == 'yes') { node('CPU') { ws({{ m.per_exec_ws('tvm/deploy-docs') }}) { + docker_init(ci_gpu) {{ m.download_artifacts(tag='docs', filenames=["docs.tgz"]) }} deploy_docs() } diff --git a/jenkins/Jenkinsfile.j2 b/jenkins/Jenkinsfile.j2 index 4e344c56d7..40990337bc 100644 --- a/jenkins/Jenkinsfile.j2 +++ b/jenkins/Jenkinsfile.j2 @@ -51,14 +51,23 @@ import org.jenkinsci.plugins.pipeline.modeldefinition.Utils {% import 'jenkins/macros.j2' as m with context -%} // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. --> -ci_lint = 'tlcpack/ci-lint:20220513-055910-fa834f67e' -ci_gpu = 'tlcpack/ci-gpu:20220519-055908-ddfa1da69' -ci_cpu = 'tlcpack/ci-cpu:20220519-055908-ddfa1da69' -ci_wasm = 'tlcpack/ci-wasm:20220513-055910-fa834f67e' -ci_i386 = 'tlcpack/ci-i386:20220513-055910-fa834f67e' -ci_qemu = 'tlcpack/ci-qemu:20220517-094028-de21c8f2e' -ci_arm = 'tlcpack/ci-arm:20220513-055910-fa834f67e' -ci_hexagon = 'tlcpack/ci-hexagon:20220516-190055-672ce3365' +def aws_account_id = '' +node("CPU-SMALL") { +aws_account_id = sh( + returnStdout: true, + script: 'aws sts get-caller-identity | grep Account | cut -f4 -d\\"', + label: 'Get AWS ID' + ).trim() +} +def AWS_DEFAULT_REGION = 'us-west-2' +ci_lint = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_lint:areusch-2ffreeze-dependencies-4233ca6eb-49" +ci_gpu = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_gpu:areusch-2ffreeze-dependencies-6799bd6f9-49" +ci_cpu = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_cpu:areusch-2ffreeze-dependencies-98aa6dde6-49" +ci_wasm = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_wasm:areusch-2ffreeze-dependencies-c12a78740-49" +ci_i386 = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_i386:areusch-2ffreeze-dependencies-89e22c948-49" +ci_qemu = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_qemu:areusch-2ffreeze-dependencies-e839c36c8-48" +ci_arm = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_arm:areusch-2ffreeze-dependencies-b9d48a35f-49" +ci_hexagon = "${aws_account_id}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/ci_hexagon:areusch-2ffreeze-dependencies-e7d44544e-49" // <--- End of regex-scanned config. // Parameters to allow overriding (in Jenkins UI), the images @@ -91,6 +100,9 @@ if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { return } +{% set aws_default_region = "us-west-2" %} +{% set aws_ecr_url = "dkr.ecr." + aws_default_region + ".amazonaws.com" %} + // Filenames for stashing between build and test steps {% set tvm_runtime = ['build/libtvm_runtime.so', 'build/config.cmake'] %} {% set tvm_lib = ['build/libtvm.so'] + tvm_runtime %} @@ -118,9 +130,9 @@ cancel_previous_build() prepare() -if (rebuild_docker_images) { - build_docker_images() -} +// if (rebuild_docker_images) { +// build_docker_images() +// } lint() diff --git a/jenkins/Lint.groovy.j2 b/jenkins/Lint.groovy.j2 index 3ede64301c..1d196ee904 100644 --- a/jenkins/Lint.groovy.j2 +++ b/jenkins/Lint.groovy.j2 @@ -9,6 +9,7 @@ def lint() { docker_image='ci_lint', ) %} + docker_init(ci_lint) sh ( script: "${docker_run} ${ci_lint} ./tests/scripts/task_lint.sh", label: 'Run lint', diff --git a/jenkins/Test.groovy.j2 b/jenkins/Test.groovy.j2 index d219b47bc7..393ed6243a 100644 --- a/jenkins/Test.groovy.j2 +++ b/jenkins/Test.groovy.j2 @@ -206,6 +206,7 @@ stage('Test') { platform="cpu", docker_image="ci_cpu", ) %} + docker_init(ci_cpu) {{ m.download_artifacts(tag='cpu', filenames=tvm_multilib_tsim) }} ci_setup(ci_cpu) cpp_unittest(ci_cpu) @@ -223,6 +224,7 @@ stage('Test') { platform="qemu", docker_image="ci_qemu", ) %} + docker_init(ci_qemu) {{ m.download_artifacts(tag='qemu', filenames=tvm_lib, folders=microtvm_template_projects) }} add_microtvm_permissions() ci_setup(ci_qemu) @@ -243,6 +245,7 @@ stage('Test') { platform="cpu", docker_image="ci_cpu", ) %} + docker_init(ci_cpu) {{ m.download_artifacts(tag='cpu', filenames=tvm_multilib) }} ci_setup(ci_cpu) sh ( @@ -256,6 +259,7 @@ stage('Test') { ws({{ m.per_exec_ws('tvm/docs-python-gpu') }}) { docker_init(ci_gpu) init_git() + docker_init(ci_gpu) {{ m.download_artifacts(tag='gpu', filenames=tvm_multilib, folders=microtvm_template_projects) }} add_microtvm_permissions() timeout(time: 180, unit: 'MINUTES') {
