diff options
| author | Hana Kim <hyangah@gmail.com> | 2026-03-22 18:37:51 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-23 14:01:34 -0700 |
| commit | 1b091e590bab0f0e98b815d7dd42b1e29041b473 (patch) | |
| tree | e6852923c60623f727b370c5ea4330712215b0df | |
| parent | c43b677a694ff5791b1b696298c9e29ae6d221bb (diff) | |
| download | go-x-pkgsite-1b091e590bab0f0e98b815d7dd42b1e29041b473.tar.xz | |
deploy: run go mod tidy in go container
CL 757540 tried to run `go mod tidy` during the prepare.sh run, but
it turned out the script runs in a stage where `go` is unavailable.
Instead, move the (cd private && go mod tidy) run in a new
step that runs in the go container right after the prepare step.
Change-Id: I4595fc9b5e9b0172753b0b4d1425093449d84421
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/757920
kokoro-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ethan Lee <ethanalee@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
| -rw-r--r-- | deploy/deploy-env.yaml | 6 | ||||
| -rw-r--r-- | deploy/deploy.yaml | 6 | ||||
| -rwxr-xr-x | deploy/prepare.sh | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/deploy/deploy-env.yaml b/deploy/deploy-env.yaml index 8bc94629..7f606f6a 100644 --- a/deploy/deploy-env.yaml +++ b/deploy/deploy-env.yaml @@ -21,6 +21,12 @@ steps: entrypoint: deploy/prepare.sh args: - $PROJECT_ID + - id: Tidy private + name: golang:1.25.5 + entrypoint: sh + args: + - -c + - cd private && go mod tidy - id: Check redistributable name: golang:1.25.5 entrypoint: private/devtools/check_redist.sh diff --git a/deploy/deploy.yaml b/deploy/deploy.yaml index b2bbe955..96169118 100644 --- a/deploy/deploy.yaml +++ b/deploy/deploy.yaml @@ -21,6 +21,12 @@ steps: entrypoint: deploy/prepare.sh args: - $PROJECT_ID + - id: Tidy private + name: golang:1.25.5 + entrypoint: sh + args: + - -c + - cd private && go mod tidy - id: Check redistributable name: golang:1.25.5 entrypoint: private/devtools/check_redist.sh diff --git a/deploy/prepare.sh b/deploy/prepare.sh index cf153862..833b0b3e 100755 --- a/deploy/prepare.sh +++ b/deploy/prepare.sh @@ -21,7 +21,6 @@ main() { local project_id=$1 gcloud source repos clone private private source private/devtools/lib.sh || { echo "Are you at repo root?"; exit 1; } - (cd private && go mod tidy) (cd private && docker_image_tag > ../_BUILD_TAG) private/devtools/idtoken.sh $project_id > _ID_TOKEN } |
