Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI:DOCS] Cirrus: Use cached swagger binary #12547

Merged
merged 1 commit into from
Dec 9, 2021
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 .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ env:
UBUNTU_NAME: "ubuntu-2110"

# Google-cloud VM Images
IMAGE_SUFFIX: "c6226133906620416"
IMAGE_SUFFIX: "c6015869890330624"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"
Expand Down
10 changes: 2 additions & 8 deletions contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,8 @@ function _run_swagger() {
local envvarsfile
req_env_vars GCPJSON GCPNAME GCPPROJECT CTR_FQIN

# Building this is a PITA, just grab binary for use in automation
# Ref: https://goswagger.io/install.html#static-binary
download_url=$(\
curl -s https://api.github.com/repos/go-swagger/go-swagger/releases/latest | \
jq -r '.assets[] | select(.name | contains("linux_amd64")) | .browser_download_url')
[[ -x /usr/local/bin/swagger ]] || \
die "Expecting swagger binary to be present and executable."

# The filename and bucket depend on the automation context
#shellcheck disable=SC2154,SC2153
Expand All @@ -166,9 +163,6 @@ function _run_swagger() {
die "Unknown execution context, expected a non-empty value for \$CIRRUS_TAG, \$CIRRUS_BRANCH, or \$CIRRUS_PR"
fi

curl -s -o /usr/local/bin/swagger -L'#' "$download_url"
chmod +x /usr/local/bin/swagger

# Swagger validation takes a significant amount of time
msg "Pulling \$CTR_FQIN '$CTR_FQIN' (background process)"
podman pull --quiet $CTR_FQIN &
Expand Down