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 a85b3a1fdc42087297ff6c6c6c2ce2d25c0ba371 Author: Andrew Reusch <[email protected]> AuthorDate: Mon Jun 6 15:15:53 2022 -0700 fix merge conflict --- Jenkinsfile | 44 +++++++++++++++++-------------------------- jenkins/DockerBuild.groovy.j2 | 26 ------------------------- jenkins/Prepare.groovy.j2 | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 53 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c594a85c8a..3b3567b3a5 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-06-02T17:55:38.066542 +// Generated at 2022-06-06T15:16:08.384458 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils // NOTE: these lines are scanned by docker/dev_common.sh. Please update the regex as needed. --> @@ -166,6 +166,22 @@ def init_git() { ) } +def docker_init(image) { + sh( + script: """ + set -eux + docker image ls --all + IMAGES=\$(docker image ls --all --format '{{.Repository}}:{{.Tag}} {{.ID}}') + + echo -e "Found images:\\n\$IMAGES" + echo "\$IMAGES" | { grep -vE '${image}' || test \$? = 1; } | { xargs docker rmi || test \$? = 123; } + + docker image ls --all + """, + label: 'Clean old Docker images', + ) +} + def should_skip_slow_tests(pr_number) { withCredentials([string( credentialsId: 'tvm-bot-jenkins-reader', @@ -462,32 +478,6 @@ def ecr_pull(full_name) { } } -def docker_init(image) { - sh( - script: """ - set -eux - docker image ls --all - IMAGES=\$(docker image ls --all --format '{{.Repository}}:{{.Tag}} {{.ID}}') - - echo -e "Found images:\\n\$IMAGES" - echo "\$IMAGES" | { grep -vE '${image}' || test \$? = 1; } | { xargs docker rmi || test \$? = 123; } - - docker image ls --all - """, - label: 'Clean old Docker images', - ) - if (image.contains("amazonaws.com")) { - // If this string is in the image name it's from ECR and needs to be pulled - // with the right credentials - ecr_pull(image) - } else { - sh( - script: "docker pull ${image}", - label: 'Pull docker image', - ) - } -} - // Run make. First try to do an incremental make from a previous workspace in hope to // accelerate the compilation. If something is wrong, clean the workspace and then // build from scratch. diff --git a/jenkins/DockerBuild.groovy.j2 b/jenkins/DockerBuild.groovy.j2 index 167142df2d..1cd67280f0 100644 --- a/jenkins/DockerBuild.groovy.j2 +++ b/jenkins/DockerBuild.groovy.j2 @@ -194,32 +194,6 @@ def ecr_pull(full_name) { } } -def docker_init(image) { - sh( - script: """ - set -eux - docker image ls --all - IMAGES=\$(docker image ls --all --format {% raw %}'{{.Repository}}:{{.Tag}} {{.ID}}'{% endraw %}) - - echo -e "Found images:\\n\$IMAGES" - echo "\$IMAGES" | { grep -vE '${image}' || test \$? = 1; } | { xargs docker rmi || test \$? = 123; } - - docker image ls --all - """, - label: 'Clean old Docker images', - ) - if (image.contains("amazonaws.com")) { - // If this string is in the image name it's from ECR and needs to be pulled - // with the right credentials - ecr_pull(image) - } else { - sh( - script: "docker pull ${image}", - label: 'Pull docker image', - ) - } -} - // Run make. First try to do an incremental make from a previous workspace in hope to // accelerate the compilation. If something is wrong, clean the workspace and then // build from scratch. diff --git a/jenkins/Prepare.groovy.j2 b/jenkins/Prepare.groovy.j2 index 03f815e1af..f34eb78f42 100644 --- a/jenkins/Prepare.groovy.j2 +++ b/jenkins/Prepare.groovy.j2 @@ -54,6 +54,22 @@ def init_git() { ) } +def docker_init(image) { + sh( + script: """ + set -eux + docker image ls --all + IMAGES=\$(docker image ls --all --format {% raw %}'{{.Repository}}:{{.Tag}} {{.ID}}'{% endraw %}) + + echo -e "Found images:\\n\$IMAGES" + echo "\$IMAGES" | { grep -vE '${image}' || test \$? = 1; } | { xargs docker rmi || test \$? = 123; } + + docker image ls --all + """, + label: 'Clean old Docker images', + ) +} + def should_skip_slow_tests(pr_number) { withCredentials([string( credentialsId: 'tvm-bot-jenkins-reader',
