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

fix: GO111MODULE broken with go 1.22 update #194

Merged
merged 1 commit into from
Jul 2, 2024
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 jobs/ci-run/scripts/centos-unit-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ else
fi

# This will be used to generate reports for jenkins.
GO111MODULE=off go get github.com/tebeka/go2xunit
go install github.com/tebeka/go2xunit@latest

cd ${full_path}

Expand Down
24 changes: 12 additions & 12 deletions jobs/ci-run/unittest/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
- apt-install:
packages: gcc squashfuse
- setup-go-environment
- go-get:
modules: github.com/tebeka/go2xunit
- go-install:
modules: github.com/tebeka/go2xunit@latest
- get-s3-source-payload
- description-setter:
description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}"
Expand Down Expand Up @@ -158,8 +158,8 @@
- apt-install:
packages: gcc squashfuse
- setup-go-environment
- go-get:
modules: github.com/tebeka/go2xunit
- go-install:
modules: github.com/tebeka/go2xunit@latest
- get-s3-source-payload
- description-setter:
description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}"
Expand Down Expand Up @@ -206,8 +206,8 @@
- apt-install:
packages: gcc squashfuse
- setup-go-environment
- go-get:
modules: github.com/tebeka/go2xunit
- go-install:
modules: github.com/tebeka/go2xunit@latest
- get-s3-source-payload
- description-setter:
description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}"
Expand Down Expand Up @@ -258,8 +258,8 @@
- apt-install:
packages: gcc squashfuse
- setup-go-environment
- go-get:
modules: github.com/tebeka/go2xunit
- go-install:
modules: github.com/tebeka/go2xunit@latest
- get-s3-source-payload
- description-setter:
description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}"
Expand Down Expand Up @@ -311,8 +311,8 @@
- apt-install:
packages: gcc squashfuse
- setup-go-environment
- go-get:
modules: github.com/tebeka/go2xunit
- go-install:
modules: github.com/tebeka/go2xunit@latest
- get-s3-source-payload
- description-setter:
description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}"
Expand Down Expand Up @@ -363,8 +363,8 @@
- apt-install:
packages: gcc squashfuse
- setup-go-environment
- go-get:
modules: github.com/tebeka/go2xunit
- go-install:
modules: github.com/tebeka/go2xunit@latest
- get-s3-source-payload
- description-setter:
description: "${JUJU_VERSION} ${SHORT_GIT_COMMIT}"
Expand Down
4 changes: 2 additions & 2 deletions jobs/common/pre-reqs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
{packages}

- builder:
name: go-get
name: go-install
builders:
- shell: |-
#!/bin/bash
set -eux
GO111MODULE=off go get {modules}
go install {modules}
Copy link
Member

Choose a reason for hiding this comment

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

This is the only one I don't know about. All those listed would have to include the specific version/latest.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed all the usages of this to be latest


# install-common-tools installs the common set of tools needed between 99% of
# jobs in this repo. This builder assumes the install target is Ubuntu.
Expand Down
2 changes: 1 addition & 1 deletion jobs/github/scripts/run-snippet-compat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ sudo su - "$USER" -c "$(echo "$SAVE_ENV" && cat <<'EOS'
if [ -f "${{WORKSPACE}}/go-unittest.out" ]; then
# This will be used to generate reports for jenkins assuming there is
# a file "go-unittest.out" in the WORKSPACE.
GO111MODULE=off go get -v github.com/tebeka/go2xunit
go install -v github.com/tebeka/go2xunit@latest
"${{GOPATH}}/bin/go2xunit" -fail -input "${{WORKSPACE}}/go-unittest.out" -output "${{WORKSPACE}}/tests.xml"
fi

Expand Down
2 changes: 1 addition & 1 deletion jobs/github/scripts/run-snippet-lxd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ lxc exec "${{CONTAINER_NAME}}" -- sudo -u ubuntu bash <<"EOT"
if [ -f "${{WORKSPACE}}/go-unittest.out" ]; then
# This will be used to generate reports for jenkins assuming there is
# a file "go-unittest.out" in the WORKSPACE.
GO111MODULE=off go get -v github.com/tebeka/go2xunit
go install -v github.com/tebeka/go2xunit@latest
"${{GOPATH}}/bin/go2xunit" -fail -input "${{WORKSPACE}}/go-unittest.out" -output "${{WORKSPACE}}/tests.xml"
fi

Expand Down
Loading