Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into feature/source-embe…
Browse files Browse the repository at this point in the history
…dded-hacks
  • Loading branch information
cardil committed Oct 5, 2022
2 parents 1166101 + 92a65f1 commit 7d0eb21
Show file tree
Hide file tree
Showing 90 changed files with 213 additions and 126 deletions.
11 changes: 6 additions & 5 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,19 @@ aliases:
- knative-test-reporter-robot
- kvmware
- lance
- matzew
- n3wscott
- lionelvillard
- nak3
- pmorie
- psschwei
- smoser-ibm
- spencerdillard
- thisisnotapril
- upodroid
- vaikas
- zroubalik
knative-release-leads:
- dprotaso
- matzew
- lionelvillard
- nak3
knative-robots:
- knative-automation
- knative-prow-releaser-robot
Expand Down Expand Up @@ -196,7 +197,7 @@ aliases:
- dprotaso
- dsimansk
- evankanderson
- n3wscott
- psschwei
- zroubalik
trademark-committee:
- evankanderson
Expand Down
4 changes: 1 addition & 3 deletions e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function go_test_e2e() {

# Setup the test cluster for running the tests.
function setup_test_cluster() {
(
# Fail fast during setup.
set -o errexit
set -o pipefail
Expand Down Expand Up @@ -109,7 +108,6 @@ function setup_test_cluster() {
if function_exists test_setup; then
test_setup || fail_test "test setup failed"
fi
)
}

# Signal (as return code and in the logs) that all E2E tests passed.
Expand All @@ -125,7 +123,7 @@ function success() {
# Parameters: $* - error message (optional).
function fail_test() {
local message="$*"
if [[ -n ${message:-} ]]; then
if [[ "X${message:-}X" == "XX" ]]; then
message='test failed'
fi
add_trap "dump_cluster_state;dump_metrics" EXIT
Expand Down
32 changes: 30 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ ARTIFACTS_TO_PUBLISH=""
FROM_NIGHTLY_RELEASE=""
FROM_NIGHTLY_RELEASE_GCS=""
SIGNING_IDENTITY=""
APPLE_CODESIGN_KEY=""
APPLE_NOTARY_API_KEY=""
APPLE_CODESIGN_PASSWORD_FILE=""
export KO_DOCKER_REPO="gcr.io/knative-nightly"
# Build stripped binary to reduce size
export GOFLAGS="-ldflags=-s -ldflags=-w"
Expand Down Expand Up @@ -314,6 +317,22 @@ function sign_release() {
if [ -z "${SIGN_IMAGES:-}" ]; then # Temporary Feature Gate
return 0
fi

# Notarizing mac binaries needs to be done before cosign as it changes the checksum values
# of the darwin binaries
if [ -n "${APPLE_CODESIGN_KEY}" ] && [ -n "${APPLE_CODESIGN_PASSWORD_FILE}" ] && [ -n "${APPLE_NOTARY_API_KEY}" ]; then
banner "Notarizing macOS Binaries for the release"
FILES=$(find -- * -type f -name "*darwin*")
for file in $FILES; do
rcodesign sign "${file}" --p12-file="${APPLE_CODESIGN_KEY}" \
--code-signature-flags=runtime \
--p12-password-file="${APPLE_CODESIGN_PASSWORD_FILE}"
done
zip files.zip ${FILES}
rcodesign notary-submit files.zip --api-key-path="${APPLE_NOTARY_API_KEY}" --wait
sha256sum ${ARTIFACTS_TO_PUBLISH//checksums.txt/} > checksums.txt
fi

## Sign the images with cosign
## For now, check if ko has created imagerefs.txt file. In the future, missing image refs will break
## the release for all jobs that publish images.
Expand All @@ -328,11 +347,11 @@ function sign_release() {
## Check if there is checksums.txt file. If so, sign the checksum file
if [[ -f "checksums.txt" ]]; then
echo "Signing Images with the identity ${SIGNING_IDENTITY}"
COSIGN_EXPERIMENTAL=1 cosign sign-blob checksums.txt --output-signature checksums.txt.sig --identity-token="$(
COSIGN_EXPERIMENTAL=1 cosign sign-blob checksums.txt --output-signature=checksums.txt.sig --output-certificate=checksums.txt.pem --identity-token="$(
gcloud auth print-identity-token --audiences=sigstore \
--include-email \
--impersonate-service-account="${SIGNING_IDENTITY}")"
ARTIFACTS_TO_PUBLISH="${ARTIFACTS_TO_PUBLISH} checksums.txt.sig"
ARTIFACTS_TO_PUBLISH="${ARTIFACTS_TO_PUBLISH} checksums.txt.sig checksums.txt.pem"
fi
}

Expand Down Expand Up @@ -438,6 +457,15 @@ function parse_flags() {
[[ $1 =~ ^v[0-9]+-[0-9a-f]+$ ]] || abort "nightly tag must be 'vYYYYMMDD-commithash'"
FROM_NIGHTLY_RELEASE=$1
;;
--apple-codesign-key)
APPLE_CODESIGN_KEY=$1
;;
--apple-codesign-password-file)
APPLE_CODESIGN_PASSWORD_FILE=$1
;;
--apple-notary-api-key)
APPLE_NOTARY_API_KEY=$1
;;
*) abort "unknown option ${parameter}" ;;
esac
esac
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/json-iterator/go/any.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/json-iterator/go/reflect_array.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/json-iterator/go/reflect_dynamic.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/json-iterator/go/reflect_map.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/json-iterator/go/reflect_slice.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/modern-go/concurrent/go_above_19.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/modern-go/concurrent/go_below_19.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions schema/vendor/github.com/modern-go/concurrent/log.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/modern-go/reflect2/go_above_17.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/modern-go/reflect2/go_above_19.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/modern-go/reflect2/go_below_17.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion schema/vendor/github.com/modern-go/reflect2/go_below_19.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7d0eb21

Please sign in to comment.