Skip to content

Commit 0b6ad59

Browse files
authored
ci: support new release project location (googleapis#12456)
1 parent 925af11 commit 0b6ad59

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.kokoro/release.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ action {
1515
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
1616

1717
# Use the trampoline script to run in docker.
18-
build_file: "elixir-google-api/.kokoro/trampoline.sh"
18+
build_file: "elixir-google-api/.kokoro/trampoline_release.sh"
1919

2020
# Configure the docker image for kokoro-trampoline.
2121
env_vars: {

.kokoro/trampoline.sh renamed to .kokoro/trampoline_release.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2018 Google Inc.
2+
# Copyright 2024 Google LLC
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -12,6 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15+
1516
set -eo pipefail
1617
# Always run the cleanup script, regardless of the success of bouncing into
1718
# the container.
@@ -21,4 +22,13 @@ function cleanup() {
2122
echo "cleanup";
2223
}
2324
trap cleanup EXIT
24-
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"
25+
26+
$(dirname $0)/populate-secrets.sh # Secret Manager secrets.
27+
TRAMPOLINE_HOST=$(echo "${TRAMPOLINE_IMAGE}" | cut -d/ -f1)
28+
if [[ ! "${TRAMPOLINE_HOST}" =~ "gcr.io" ]]; then
29+
# If you need to specify a host other than gcr.io, you have to run on an update version of gcloud.
30+
echo "TRAMPOLINE_HOST: ${TRAMPOLINE_HOST}"
31+
gcloud components update
32+
gcloud auth configure-docker "${TRAMPOLINE_HOST}"
33+
fi
34+
python3 "${KOKORO_GFILE_DIR}/trampoline_release.py"

0 commit comments

Comments
 (0)