Skip to content

[CI] ensure we can download the specific version's go#4378

Merged
rata merged 1 commit into
opencontainers:mainfrom
lifubang:fix-ci-curlL
Aug 14, 2024
Merged

[CI] ensure we can download the specific version's go#4378
rata merged 1 commit into
opencontainers:mainfrom
lifubang:fix-ci-curlL

Conversation

@lifubang
Copy link
Copy Markdown
Member

It seems that there are only two latest stable versions go in the content downloaded from https://go.dev/dl/?mode=json, so if we can't update the go's version in time, it will cause CI failure.

Please see: #4374 (comment)
The relate error logs:

# Install Go.
PREFIX="https://go.dev/dl/"
# Find out the latest minor release URL.
eval $(curl -fsSL "${PREFIX}?mode=json" | jq -r  --arg Ver "$GO_VERSION" '.[] | select(.version | startswith("go\($Ver)")) | .files[] | select(.os == "linux" and .arch == "amd64" and .kind == "archive") | "filename=\"" + .filename + "\""')
curl -fsSL "$PREFIX$filename" | tar Cxz /usr/local

gzip: stdin: not in gzip format
tar: Child died with signal 13
tar: Error is not recoverable: exiting now
curl: (23) Failed writing body (360 != 1408)

Signed-off-by: lifubang <lifubang@acmcoder.com>
Copy link
Copy Markdown
Member

@rata rata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Although if escaping the & works, that seems safer to me.

Comment thread .cirrus.yml
@rata rata merged commit 2ee5564 into opencontainers:main Aug 14, 2024
@lifubang lifubang deleted the fix-ci-curlL branch October 15, 2024 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants