Skip to content

Commit

Permalink
chore: update release script for jib-gradle-plugin (GoogleContainerTo…
Browse files Browse the repository at this point in the history
…ols#4011)

* Remove credentials-related setup for integration testing
* Add same workaround as continuous script for stopping docker containers
  • Loading branch information
emmileaf authored May 12, 2023
1 parent 42048b1 commit 8c7ccae
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions jib-gradle-plugin/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ readonly PUBLISH_SECRET=$(cat "${KOKORO_KEYSTORE_DIR}/72743_gradle_publish_secre

set -o xtrace

gcloud components install docker-credential-gcr

# docker-credential-gcr uses GOOGLE_APPLICATION_CREDENTIALS as the credentials key file
export readonly GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_KEYSTORE_DIR}/72743_jib_integration_testing_key"
docker-credential-gcr configure-docker
# From default hostname, get id of container to exclude
CONTAINER_ID=$(hostname)
echo "$CONTAINER_ID"

# Stops any left-over containers.
docker stop $(docker ps --all --quiet) || true
docker kill $(docker ps --all --quiet) || true

# Sets the integration testing project.
export readonly JIB_INTEGRATION_TESTING_PROJECT=jib-integration-testing

docker stop $(docker ps --all --quiet | grep -v "$CONTAINER_ID") || true
docker kill $(docker ps --all --quiet | grep -v "$CONTAINER_ID") || true
cd github/jib

echo "gradle publish"
Expand Down

0 comments on commit 8c7ccae

Please sign in to comment.