Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.25.0
require (
github.com/google/go-github/v32 v32.1.0
gopkg.in/yaml.v2 v2.4.0
knative.dev/hack v0.0.0-20261118025754-120c8f556283
knative.dev/hack v0.0.0-20261120142159-5e9b644b541f
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8X
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
knative.dev/hack v0.0.0-20261118025754-120c8f556283 h1:TilEyF2CNKrZOmjA698p1HDXgRKZqBNLkDn7OepW60s=
knative.dev/hack v0.0.0-20261118025754-120c8f556283/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0=
knative.dev/hack v0.0.0-20261120142159-5e9b644b541f h1:hAKKBD7U2gAcLuctKgXOOXOhnxhS3n+yXi1J+r6flVo=
knative.dev/hack v0.0.0-20261120142159-5e9b644b541f/go.mod h1:L5RzHgbvam0u8QFHfzCX6MKxu/a/gIGEdaRBqNiVbl0=
22 changes: 15 additions & 7 deletions vendor/knative.dev/hack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ for a list of help wanted issues across the project.
This is a helper script to run the presubmit tests. To use it:

1. Source this script:

```bash
source "$(go run knative.dev/hack/cmd/script presubmit-tests.sh)"
```
Expand Down Expand Up @@ -108,9 +109,10 @@ This is a helper script for Knative E2E test scripts. To use it:
call if the default values don't fit your needs.

1. Source the script:
```bash
source "$(go run knative.dev/hack/cmd/script e2e-tests.sh)"
```

```bash
source "$(go run knative.dev/hack/cmd/script e2e-tests.sh)"
```

1. [optional] Write the `knative_setup()` function, which will set up your
system under test (e.g., Knative Serving).
Expand Down Expand Up @@ -166,9 +168,10 @@ This is a helper script for Knative E2E test scripts. To use it:

1. By default Google Kubernetes Engine telemetry to Cloud Logging and Monitoring is disabled.
This can be enabled by setting `ENABLE_GKE_TELEMETRY` to `true`.

1. By default Spot Worker nodes are disabled. This can be enabled by setting `ENABLE_PREEMPTIBLE_NODES`
to `true`.

### Sample end-to-end test script

This script will test that the latest Knative Serving nightly release works. It
Expand Down Expand Up @@ -212,6 +215,7 @@ with specific Prow jobs, it can automatically manage the environment for running
benchmarking jobs for each repo. To use it:

1. Source the script:

```bash
source "$(go run knative.dev/hack/cmd/script performance-tests.sh)"
```
Expand Down Expand Up @@ -271,9 +275,10 @@ main $@
This is a helper script for Knative release scripts. To use it:

1. Source the script:
```bash
source "$(go run knative.dev/hack/cmd/script release.sh)"
```

```bash
source "$(go run knative.dev/hack/cmd/script release.sh)"
```

1. [optional] By default, the release script will run
`./test/presubmit-tests.sh` as the release validation tests. If you need to
Expand All @@ -292,6 +297,9 @@ This is a helper script for Knative release scripts. To use it:
branch.
- `RELEASE_NOTES`: contains the filename with the release notes if
`--release-notes` was passed. The release notes is a simple markdown file.
For `--dot-release`, notes are generated when publishing with
`gh release create --generate-notes --notes-start-tag <previous-release-tag>`
unless `--release-notes` is passed.
- `RELEASE_GCS_BUCKET`: contains the GCS bucket name to store the manifests
if `--release-gcs` was passed, otherwise the default value
`knative-nightly/<repo>` will be used. It is empty if `--publish` was not
Expand Down
18 changes: 10 additions & 8 deletions vendor/knative.dev/hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ BUILD_TIMESTAMP=""
BUILD_TAG=""
RELEASE_VERSION=""
RELEASE_NOTES=""
RELEASE_NOTES_START_TAG=""
RELEASE_BRANCH=""
RELEASE_GCS_BUCKET="knative-nightly/${REPO_NAME}"
RELEASE_DIR=""
Expand All @@ -93,7 +94,7 @@ readonly IMAGES_REFS_FILE="${IMAGES_REFS_FILE:-$(mktemp -d)/images_refs.txt}"
# Convenience function to run the GitHub CLI tool `gh`.
# Parameters: $1..$n - arguments to gh.
function gh_tool() {
go_run github.com/cli/cli/v2/cmd/gh@v2.65.0 "$@"
go_run github.com/cli/cli/v2/cmd/gh@v2.105.0 "$@"
}

# Shortcut to "git push" that handles authentication.
Expand Down Expand Up @@ -239,12 +240,8 @@ function prepare_dot_release() {
local last_build="$(patch_version "${last_version}")"
RELEASE_VERSION="${major_minor_version}.$(( last_build + 1 ))"
echo "Will create release ${RELEASE_VERSION} at commit ${release_branch_commit}"
# If --release-notes not used, copy from the latest release
if [[ -z "${RELEASE_NOTES}" ]]; then
RELEASE_NOTES="$(mktemp)"
gh_tool release view "${github_tag}" --json "body" --jq '.body' > "${RELEASE_NOTES}"
echo "Release notes from ${last_version} copied to ${RELEASE_NOTES}"
fi
# Generate notes since the previous release when publishing, unless overridden.
RELEASE_NOTES_START_TAG="${github_tag}"
}

# Setup source nightly image for a release.
Expand Down Expand Up @@ -761,6 +758,11 @@ function publish_to_github() {
cat "${RELEASE_NOTES}" >> "${description}"
fi

local notes_args=(--notes-file "${description}")
if [[ -z "${RELEASE_NOTES}" && -n "${RELEASE_NOTES_START_TAG}" ]]; then
notes_args=(--generate-notes --notes-start-tag "${RELEASE_NOTES_START_TAG}")
fi

# Include a tag for the go module version
#
# v1.0.0 = v0.27.0
Expand All @@ -787,7 +789,7 @@ function publish_to_github() {
gh_tool release create \
"${github_tag}" \
--title "${title}" \
--notes-file "${description}" \
"${notes_args[@]}" \
"${target_branch}" \
${attachments[@]} && return 0

Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ golang.org/x/crypto/openpgp/s2k
# gopkg.in/yaml.v2 v2.4.0
## explicit; go 1.15
gopkg.in/yaml.v2
# knative.dev/hack v0.0.0-20261118025754-120c8f556283
# knative.dev/hack v0.0.0-20261120142159-5e9b644b541f
## explicit; go 1.24
knative.dev/hack
# go.opencensus.io => go.opencensus.io v0.20.2
Loading