Skip to content

Commit

Permalink
WX-1519 Stop leaking DRS Localizer images on every CI run (#7390)
Browse files Browse the repository at this point in the history
  • Loading branch information
aednichols authored Mar 19, 2024
1 parent 171f3e9 commit 027de62
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/ci/bin/test.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ cromwell::private::create_build_variables() {
esac

if [[ "${CROMWELL_BUILD_IS_CI}" == "true" ]]; then
CROMWELL_BUILD_DOCKER_TAG="${CROMWELL_BUILD_PROVIDER}-${CROMWELL_BUILD_NUMBER}"
CROMWELL_BUILD_DOCKER_TAG="${CROMWELL_BUILD_PROVIDER}-${CROMWELL_BUILD_TYPE}-${CROMWELL_BUILD_NUMBER}"
else
CROMWELL_BUILD_DOCKER_TAG="${CROMWELL_BUILD_PROVIDER}-${CROMWELL_BUILD_TYPE}-${CROMWELL_BUILD_GIT_HASH_SUFFIX}"
fi
Expand Down
6 changes: 3 additions & 3 deletions src/ci/bin/test_gcpbatch.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ cromwell::private::batch::gcr_image_push() {

cromwell::build::build_docker_image "${executable_name}" "${docker_image}"
echo "${docker_image}" >> "${CROMWELL_BUILD_BATCH_GCR_IMAGES}"
# Use cat to quiet docker: https://github.com/moby/moby/issues/36655#issuecomment-375136087
docker push "${docker_image}" | cat
docker push --quiet "${docker_image}"
}

cromwell::private::batch::gcr_image_delete() {
Expand All @@ -86,7 +85,7 @@ cromwell::private::batch::setup_batch_gcr() {
elif command -v docker; then
# Upload images built from this commit
gcloud auth configure-docker --quiet
CROMWELL_BUILD_BATCH_DOCKER_IMAGE_DRS="gcr.io/${CROMWELL_BUILD_BATCH_PROJECT_ID}/cromwell-drs-localizer:${CROMWELL_BUILD_DOCKER_TAG}-batch"
CROMWELL_BUILD_BATCH_DOCKER_IMAGE_DRS="gcr.io/${CROMWELL_BUILD_BATCH_PROJECT_ID}/cromwell-drs-localizer:${CROMWELL_BUILD_DOCKER_TAG}"
cromwell::private::batch::gcr_image_push cromwell-drs-localizer "${CROMWELL_BUILD_BATCH_DOCKER_IMAGE_DRS}"
export CROMWELL_BUILD_BATCH_DOCKER_IMAGE_DRS
else
Expand All @@ -102,5 +101,6 @@ cromwell::private::batch::setup_batch_service_account() {

cromwell::build::batch::setup_batch_centaur_environment() {
cromwell::private::batch::setup_batch_gcloud
cromwell::private::batch::setup_batch_gcr
cromwell::private::batch::setup_batch_service_account
}
5 changes: 2 additions & 3 deletions src/ci/bin/test_papi.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ cromwell::private::papi::gcr_image_push() {

cromwell::build::build_docker_image "${executable_name}" "${docker_image}"
echo "${docker_image}" >> "${CROMWELL_BUILD_PAPI_GCR_IMAGES}"
# Use cat to quiet docker: https://github.com/moby/moby/issues/36655#issuecomment-375136087
docker push "${docker_image}" | cat
docker push --quiet "${docker_image}"
}

cromwell::private::papi::gcr_image_delete() {
Expand All @@ -85,7 +84,7 @@ cromwell::private::papi::setup_papi_gcr() {
elif command -v docker; then
# Upload images built from this commit
gcloud auth configure-docker --quiet
CROMWELL_BUILD_PAPI_DOCKER_IMAGE_DRS="gcr.io/${CROMWELL_BUILD_PAPI_PROJECT_ID}/cromwell-drs-localizer:${CROMWELL_BUILD_DOCKER_TAG}-papi"
CROMWELL_BUILD_PAPI_DOCKER_IMAGE_DRS="gcr.io/${CROMWELL_BUILD_PAPI_PROJECT_ID}/cromwell-drs-localizer:${CROMWELL_BUILD_DOCKER_TAG}"
cromwell::private::papi::gcr_image_push cromwell-drs-localizer "${CROMWELL_BUILD_PAPI_DOCKER_IMAGE_DRS}"
export CROMWELL_BUILD_PAPI_DOCKER_IMAGE_DRS
else
Expand Down
4 changes: 2 additions & 2 deletions src/ci/resources/gcp_batch_application.inc.conf.ctmpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ filesystems.drs.global.config.resolver.url = "https://drshub.dsde-dev.broadinsti

drs {
localization {
docker-image = "Error: BA-6546 The environment variable CROMWELL_BUILD_PAPI_DOCKER_IMAGE_DRS must be set/export pointing to a valid docker image"
docker-image = ${?CROMWELL_BUILD_PAPI_DOCKER_IMAGE_DRS}
docker-image = "Error: BA-6546 The environment variable CROMWELL_BUILD_BATCH_DOCKER_IMAGE_DRS must be set/export pointing to a valid docker image"
docker-image = ${?CROMWELL_BUILD_BATCH_DOCKER_IMAGE_DRS}
}
}

0 comments on commit 027de62

Please sign in to comment.