Skip to content

Commit

Permalink
Update Go to 1.21 (#3698)
Browse files Browse the repository at this point in the history
* Update ci-go

* Update go toolset

* Update prepare shared rp dev

* Update prepare your dev

* More 1.21 updates

* more changes

* save work

* test

* tidy up

* Add license to typealker test
  • Loading branch information
niontive authored Jul 18, 2024
1 parent f1fbd0f commit ce31826
Show file tree
Hide file tree
Showing 21 changed files with 271 additions and 126 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
ci-from-docker:
runs-on: ubuntu-latest
container:
image: registry.access.redhat.com/ubi8/go-toolset:1.20.12-5
image: registry.access.redhat.com/ubi8/go-toolset:1.21.11-1.1720406008
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -32,7 +32,7 @@ jobs:
vendor-check:
runs-on: ubuntu-latest
container:
image: registry.access.redhat.com/ubi8/go-toolset:1.20.12-5
image: registry.access.redhat.com/ubi8/go-toolset:1.21.11-1.1720406008
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -43,7 +43,7 @@ jobs:
generate-check:
runs-on: ubuntu-latest
container:
image: registry.access.redhat.com/ubi8/go-toolset:1.20.12-5
image: registry.access.redhat.com/ubi8/go-toolset:1.21.11-1.1720406008
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ run:
- "containers_image_openpgp"
- "exclude_graphdriver_devicemapper"
- "exclude_graphdriver_btrfs"
go: "1.20"
go: "1.21"

output:
format: github-actions
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pr:
resources:
containers:
- container: golang
image: registry.access.redhat.com/ubi8/go-toolset:1.20.12-5
image: registry.access.redhat.com/ubi8/go-toolset:1.21.11-1.1720406008
options: --user=0
- container: python
image: registry.access.redhat.com/ubi8/python-39:latest
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/clean-subscription.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
resources:
containers:
- container: golang
image: registry.access.redhat.com/ubi8/go-toolset:1.20
image: registry.access.redhat.com/ubi8/go-toolset:1.21.11-1.1720406008
options: --user=0

variables:
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/onebranch/pipeline.buildrp.official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pr: none
variables:
Cdp_Definition_Build_Count: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
ONEBRANCH_AME_ACR_LOGIN: cdpxb8e9ef87cd634085ab141c637806568c00.azurecr.io
LinuxContainerImage: $(ONEBRANCH_AME_ACR_LOGIN)/b8e9ef87-cd63-4085-ab14-1c637806568c/official/ubi8/go-toolset:1.20.12-5 # Docker image which is used to build the project https://aka.ms/obpipelines/containers
LinuxContainerImage: $(ONEBRANCH_AME_ACR_LOGIN)/b8e9ef87-cd63-4085-ab14-1c637806568c/official/ubi8/go-toolset:1.21.11-1.1720406008 # Docker image which is used to build the project https://aka.ms/obpipelines/containers
Debian_Frontend: noninteractive

resources:
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/onebranch/pipeline.buildrp.pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pr: none
variables:
Cdp_Definition_Build_Count: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
ONEBRANCH_AME_ACR_LOGIN: cdpxb8e9ef87cd634085ab141c637806568c00.azurecr.io
LinuxContainerImage: $(ONEBRANCH_AME_ACR_LOGIN)/b8e9ef87-cd63-4085-ab14-1c637806568c/official/ubi8/go-toolset:1.20.12-5 # Docker image which is used to build the project https://aka.ms/obpipelines/containers
LinuxContainerImage: $(ONEBRANCH_AME_ACR_LOGIN)/b8e9ef87-cd63-4085-ab14-1c637806568c/official/ubi8/go-toolset:1.21.11-1.1720406008 # Docker image which is used to build the project https://aka.ms/obpipelines/containers
Debian_Frontend: noninteractive

resources:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aro-e2e
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Uses a multi-stage container build to build the RP & E2E components.
#
ARG REGISTRY
FROM ${REGISTRY}/ubi8/go-toolset:1.20.12-5 AS builder
FROM ${REGISTRY}/ubi8/go-toolset:1.21.11-1.1720406008 AS builder

USER root
ENV GOPATH=/root/go
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aro-multistage
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Uses a multi-stage container build to build the RP.
#
ARG REGISTRY
FROM ${REGISTRY}/ubi8/go-toolset:1.20.12-5 AS builder
FROM ${REGISTRY}/ubi8/go-toolset:1.21.11-1.1720406008 AS builder

USER root
ENV GOPATH=/root/go
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci-rp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN npm run lint && npm run build
###############################################################################
# Stage 2: Compile the Golang RP code
###############################################################################
FROM ${REGISTRY}/ubi8/go-toolset:1.20.12-5 AS builder
FROM ${REGISTRY}/ubi8/go-toolset:1.21.11-1.1720406008 AS builder
ARG ARO_VERSION
LABEL aro-builder=true
USER root
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci-tunnel
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG REGISTRY
ARG ARO_VERSION

FROM ${REGISTRY}/ubi8/go-toolset:1.20.12-5 AS builder
FROM ${REGISTRY}/ubi8/go-toolset:1.21.11-1.1720406008 AS builder
ARG ARO_VERSION
USER root
WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.gatekeeper
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG REGISTRY
FROM ${REGISTRY}/ubi8/go-toolset:1.20.12-5 AS builder
FROM ${REGISTRY}/ubi8/go-toolset:1.21.11-1.1720406008 AS builder
ARG GATEKEEPER_VERSION
ENV DOWNLOAD_URL=https://github.com/open-policy-agent/gatekeeper/archive/${GATEKEEPER_VERSION}.tar.gz

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.proxy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Uses a multi-stage container build to build the proxy
#
ARG REGISTRY
FROM ${REGISTRY}/ubi8/go-toolset:1.20.12-5 AS builder
FROM ${REGISTRY}/ubi8/go-toolset:1.21.11-1.1720406008 AS builder
USER root
ENV GOPATH=/root/go
RUN mkdir -p /app
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GATEKEEPER_VERSION = v3.15.1
GOTESTSUM = gotest.tools/[email protected]

# Golang version go mod tidy compatibility
GOLANG_VERSION ?= 1.20
GOLANG_VERSION ?= 1.21

ifneq ($(shell uname -s),Darwin)
export CGO_CFLAGS=-Dgpgme_off_t=off_t
Expand Down
2 changes: 1 addition & 1 deletion cmd/aro/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func mirror(ctx context.Context, log *logrus.Entry) error {
"registry.access.redhat.com/ubi8/nodejs-18:latest",

// https://catalog.redhat.com/software/containers/ubi8/go-toolset/5ce8713aac3db925c03774d1
"registry.access.redhat.com/ubi8/go-toolset:1.20.12-5",
"registry.access.redhat.com/ubi8/go-toolset:1.21.11-1.1720406008",

// https://quay.io/repository/app-sre/managed-upgrade-operator?tab=tags
// https://gitlab.cee.redhat.com/service/app-interface/-/blob/master/data/services/osd-operators/cicd/saas/saas-managed-upgrade-operator.yaml?ref_type=heads
Expand Down
2 changes: 1 addition & 1 deletion docs/prepare-a-shared-rp-development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Data Reader` or `Storage Blob Data Contributor` role on the storage account.
PULL_SECRET=...
```

1. Install [Go 1.20](https://golang.org/dl) or later, if you haven't already.
1. Install [Go 1.21](https://golang.org/dl) or later, if you haven't already.

1. Install the [Azure
CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli), if you
Expand Down
2 changes: 1 addition & 1 deletion docs/prepare-your-dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document goes through the development dependencies one requires in order to

## Software Required

1. Install [Go 1.20](https://golang.org/dl) or later, if you haven't already.
1. Install [Go 1.21](https://golang.org/dl) or later, if you haven't already.
1. After downloading follow the [Install instructions](https://go.dev/doc/install), replacing the tar archive with your download.
1. Append `export PATH="${PATH}:/usr/local/go/bin"` to your shell's profile file.

Expand Down
Loading

0 comments on commit ce31826

Please sign in to comment.