Skip to content

Commit 0c798a7

Browse files
authored
chore: upgrade to Go v1.20 (NR-95901) (#1690)
* chore: upgrade to Go v1.20 (NR-95901) * ci: remove now redundant copy cp: '/opt/hostedtoolcache/go/1.20.5/x64/bin/go' and '/usr/bin/go' are the same file
1 parent d9ff1a3 commit 0c798a7

File tree

11 files changed

+14
-18
lines changed

11 files changed

+14
-18
lines changed

.github/workflows/component_linux_harvest_test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@ jobs:
1818
with:
1919
go-version-file: 'go.mod'
2020

21-
- run: |
22-
# https://github.com/actions/setup-go/issues/107
23-
cp -f `which go` /usr/bin/go
24-
2521
- name: Setup node
2622
run: sudo apt install musl-dev
2723

2824
- name: Fix GOROOT to be run with sudo
2925
run: |
3026
mkdir -p /home/runner/.config/go
31-
echo GOROOT=$( go env GOROOT ) > /home/runner/.config/go/env
32-
echo GOTOOLDIR=$( go env GOTOOLDIR ) >> /home/runner/.config/go/env
27+
echo GOROOT="$( go env GOROOT )" > /home/runner/.config/go/env
28+
echo GOTOOLDIR="$( go env GOTOOLDIR )" >> /home/runner/.config/go/env
3329
sudo -E go env
3430
3531
- name: Running Harvest tests

build/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.19.10-bullseye
1+
FROM golang:1.20.5-bullseye
22

33
ARG GH_VERSION='2.0.0'
44
ARG GH_ARCH='amd64'
@@ -16,4 +16,4 @@ RUN curl -L https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_
1616
RUN dpkg -i gh_${GH_VERSION}_linux_${GH_ARCH}.deb
1717

1818
ENV GOFLAGS="-buildvcs=false"
19-
RUN git config --global --add safe.directory /go/src/github.com/newrelic/infrastructure-agent
19+
RUN git config --global --add safe.directory /go/src/github.com/newrelic/infrastructure-agent

build/ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG ANSIBLE_INVENTORY_FOLDER_ARG="/srv/runner/inventory/$REF_ARG"
55
ARG ANSIBLE_INVENTORY_FILE_ARG="inventory.ec2"
66

77
ARG ANSIBLE_VERSION="6.5.0"
8-
ARG GO_VERSION="1.19.10"
8+
ARG GO_VERSION="1.20.5"
99

1010
ENV REF=$REF_ARG
1111
ENV ANSIBLE_INVENTORY="$ANSIBLE_INVENTORY_FOLDER_ARG/$ANSIBLE_INVENTORY_FILE_ARG"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/newrelic/infrastructure-agent
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/Microsoft/go-winio v0.5.2
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM golang:1.19
1+
FROM golang:1.20
22

33
WORKDIR /go/src/github.com/newrelic/infrastructure-agent/
44

55
COPY . .
66

7-
CMD ["sleep", "1h"]
7+
CMD ["sleep", "1h"]

test/packaging/ansible/roles/repo-setup/vars/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
go_version: 1.19
2+
go_version: 1.20
33
repo_endpoint: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent"
44

55
repos_to_clean:

test/proxy/Dockerfile_agent

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.19 as builder
1+
FROM golang:1.20 as builder
22

33
ARG CGO_ENABLED=0
44
WORKDIR /go/src/github.com/newrelic/infrastructure-agent

test/proxy/Dockerfile_collector

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.19 as builder
1+
FROM golang:1.20 as builder
22
ARG CGO_ENABLED=0
33
WORKDIR /go/src/github.com/newrelic/infrastructure-agent
44
COPY . .

tools/cdn-purge/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/newrelic/infrastructure-agent/tools/cdn-purge
22

3-
go 1.19
3+
go 1.20
44

55
require github.com/aws/aws-sdk-go v1.39.0
66

tools/provision-alerts/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module provision-alerts
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/stretchr/testify v1.7.0

0 commit comments

Comments
 (0)