-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bumping knative.dev/reconciler-test 00d94f4...0ff820e: > 0ff820e Update community files (# 747) > a2d1677 upgrade to latest dependencies (# 746) > dd2ded3 upgrade to latest dependencies (# 744) > 4ca183f Update community files (# 745) bumping knative.dev/pkg 330b271...0991b2f: > 0991b2f Update community files (# 3083) > c88d5da Bump github.com/tsenart/vegeta/v12 from 12.11.3 to 12.12.0 (# 3082) > cb30d00 Bump golang.org/x/sync from 0.7.0 to 0.8.0 (# 3081) > 433889b upgrade to latest dependencies (# 3080) > 0e7ffe4 Update community files (# 3079) bumping knative.dev/hack/schema 9c9eed6...452e340: > 452e340 Update community files (# 392) > 441a19f remove geo replication (# 389) > 0a23232 Update community files (# 388) bumping golang.org/x/sync 14be23e...411f99e: > 411f99e LICENSE: update per Google Legal bumping knative.dev/hack 9c9eed6...452e340: > 452e340 Update community files (# 392) > 441a19f remove geo replication (# 389) > 0a23232 Update community files (# 388) Signed-off-by: Knative Automation <[email protected]>
- Loading branch information
1 parent
c521efb
commit 27e416a
Showing
5 changed files
with
22 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,36 +33,12 @@ readonly RELEASE_GCR="gcr.io/knative-releases/github.com/${ORG_NAME}/${REPO_NAME | |
readonly NIGHTLY_SIGNING_IDENTITY="[email protected]" | ||
readonly RELEASE_SIGNING_IDENTITY="[email protected]" | ||
|
||
# Georeplicate images to {us,eu,asia}.gcr.io | ||
readonly GEO_REPLICATION=(us eu asia) | ||
|
||
# Simple banner for logging purposes. | ||
# Parameters: $* - message to display. | ||
function banner() { | ||
subheader "$*" | ||
} | ||
|
||
# Tag images in the yaml files if $TAG is not empty. | ||
# $KO_DOCKER_REPO is the registry containing the images to tag with $TAG. | ||
# Parameters: $1..$n - files to parse for images (non .yaml files are ignored). | ||
function tag_images_in_yamls() { | ||
[[ -z ${TAG} ]] && return 0 | ||
local SRC_DIR="${GOPATH}/src/" | ||
local DOCKER_BASE="${KO_DOCKER_REPO}/${REPO_ROOT_DIR/$SRC_DIR}" | ||
local GEO_REGIONS="${GEO_REPLICATION[@]} " | ||
echo "Tagging any images under '${DOCKER_BASE}' with ${TAG}" | ||
# shellcheck disable=SC2068 | ||
for file in $@; do | ||
[[ "${file##*.}" != "yaml" ]] && continue | ||
echo "Inspecting ${file}" | ||
for image in $(grep -o "${DOCKER_BASE}/[a-z\./-]\+@sha256:[0-9a-f]\+" "${file}"); do | ||
for region in "" ${GEO_REGIONS// /. }; do | ||
gcloud -q container images add-tag "${image}" "${region}${image%%@*}:${TAG}" | ||
done | ||
done | ||
done | ||
} | ||
|
||
# Copy the given files to the $RELEASE_GCS_BUCKET bucket's "latest" directory. | ||
# If $TAG is not empty, also copy them to $RELEASE_GCS_BUCKET bucket's "previous" directory. | ||
# Parameters: $1..$n - files to copy. | ||
|
@@ -646,7 +622,6 @@ function run_validation_tests() { | |
# Parameters: $1..$n - files to add to the release. | ||
function publish_artifacts() { | ||
(( ! PUBLISH_RELEASE )) && return | ||
tag_images_in_yamls "${ARTIFACTS_TO_PUBLISH}" | ||
if [[ -n "${RELEASE_DIR}" ]]; then | ||
cp "${ARTIFACTS_TO_PUBLISH}" "${RELEASE_DIR}" || abort "cannot copy release to '${RELEASE_DIR}'" | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters