Skip to content

Commit

Permalink
CI: Prime docker cache in "Docker cache build" job (apache#18438)
Browse files Browse the repository at this point in the history
Cache priming was previously only handled when using the ./ci/build.py or
./ci/docker_cache.py script. The former is used during most CI jobs. The latter
is used for containers not declared in docker-compose.yml during the "Docker
cache build" job. More and more containers are declared in
docker-compose.yml now, but prior to this commit their cache wasn't primed in the
"Docker cache build" job.
  • Loading branch information
leezu authored and yijunc committed Jun 9, 2020
1 parent 5ced172 commit bb26121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ci/Jenkinsfile_docker_cache
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ core_logic: {
timeout(time: total_timeout, unit: 'MINUTES') {
utils.init_git()
sh "python3 ./ci/docker_cache.py --docker-registry ${env.DOCKER_CACHE_REGISTRY}"
sh "cd ci && python3 ./docker_login.py --secret-name ${env.DOCKERHUB_SECRET_NAME} && docker-compose -f docker/docker-compose.yml build --parallel && COMPOSE_HTTP_TIMEOUT=600 docker-compose -f docker/docker-compose.yml push && docker logout"
sh "cd ci && python3 ./docker_login.py --secret-name ${env.DOCKERHUB_SECRET_NAME} && docker-compose -f docker/docker-compose.yml pull && docker-compose -f docker/docker-compose.yml build --parallel && COMPOSE_HTTP_TIMEOUT=600 docker-compose -f docker/docker-compose.yml push && docker logout"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion ci/jenkins/Jenkins_steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,7 @@ def misc_test_docker_cache_build() {
ws('workspace/docker_cache') {
utils.init_git()
sh "python3 ./ci/docker_cache.py --docker-registry ${env.DOCKER_CACHE_REGISTRY} --no-publish"
sh "cd ci && docker-compose -f docker/docker-compose.yml build --parallel"
sh "cd ci && docker-compose -f docker/docker-compose.yml pull && docker-compose -f docker/docker-compose.yml build --parallel"
}
}
}]
Expand Down

0 comments on commit bb26121

Please sign in to comment.