Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

CI: Really fix xurls URL issue #843

Closed
Closed
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
20 changes: 18 additions & 2 deletions .ci/install_go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,25 @@ case "$(arch)" in
;;
esac

archive="go${go_version}.linux-${goarch}.tar.gz"

info "Download go version ${go_version}"
curl -OL "https://storage.googleapis.com/golang/go${go_version}.linux-${goarch}.tar.gz"
curl -OL "https://storage.googleapis.com/golang/${archive}"
info "Install go"
mkdir -p "${install_dest}"
sudo tar -C "${install_dest}" -xzf "go${go_version}.linux-${goarch}.tar.gz"
sudo tar -C "${install_dest}" -xzf "${archive}"
popd

# Make sure we use the golang version we just installed
goroot="${install_dest}/go"

[ -d "${goroot}" ] || die "failed to find expected golang path ${goroot} (from ${archive})"

export GOROOT="${goroot}"

gorootbin="${GOROOT}/bin"
[ -d "${gorootbin}" ] || die "failed to find expected golang binary path ${gorootbin} (from ${archive})"

export PATH="${gorootbin}:$PATH"
Copy link
Contributor

Choose a reason for hiding this comment

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

iiuc, this script is called (nor sourced) from the jenkins script - so, these exports will be happening in a sub-shell, and not propagate up/out will they?
Maybe there needs to be a GOPATH type fix in either the jenkins script (caller) or the static script (user) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep - see comment above. I'm honestly not sure currently where the fix would go as the Jenkins script looks fine - any thoughts?

/cc @chavafg.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hold on - you say we need golang >= 1.10.3 - but, our versions.yaml is not fixed for that yet (as you noted on the runtime repo PR).
So, we should expect this not to work until we get golang updated, with the pending PRs.

Let me go check that PR - last I remember upstream crio got patched so we could make the version bump, let me see where we are stuck....


info "Using golang binary $(command -v go) version $(go version)"
2 changes: 1 addition & 1 deletion .ci/static-checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ check_docs()
if [ ! "$(command -v $cmd)" ]
then
info "Installing $cmd utility"
go get -u "github.com/mvdan/xurls/cmd/${cmd}"
go get -u -v "mvdan.cc/xurls/cmd/${cmd}" 2>&1
fi

info "Checking documentation"
Expand Down