Skip to content

Commit f46e510

Browse files
committed
UPSTREAM: <carry>: Upgrade go version to 1.21 and go.mod package versions
1 parent ea68150 commit f46e510

16 files changed

+181
-667
lines changed

.github/workflows/unit-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Go
2222
uses: actions/setup-go@v4
2323
with:
24-
go-version: '1.20.x'
24+
go-version: '1.21.x'
2525
- name: Run Unit Test
2626
working-directory: ${{ github.workspace }}/backend/src
2727
env:

backend/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
# Build arguments
1616
ARG SOURCE_CODE=.
1717

18-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
19-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
18+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2019

2120
## Build args to be used at this step
2221
ARG SOURCE_CODE
@@ -34,7 +33,6 @@ COPY ${SOURCE_CODE}/ ./
3433
RUN GO111MODULE=on go build -o /bin/apiserver ./backend/src/apiserver/ && \
3534
dnf clean all
3635

37-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
3836
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
3937

4038
WORKDIR /bin

backend/Dockerfile.cacheserver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Dockerfile for building the source code of cache_server
16-
FROM golang:1.20.4-alpine3.17 as builder
16+
FROM golang:1.21.4-alpine3.17 as builder
1717

1818
RUN apk update && apk upgrade && \
1919
apk add --no-cache bash git openssh gcc musl-dev

backend/Dockerfile.conformance

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Dockerfile for building the source code of conformance tests
16-
FROM golang:1.20.4-alpine3.17 as builder
16+
FROM golang:1.21.4-alpine3.17 as builder
1717

1818
RUN apk update && apk upgrade && \
1919
apk add --no-cache bash git openssh gcc musl-dev

backend/Dockerfile.driver

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
ARG SOURCE_CODE=.
1717

1818
# Use ubi8/nodejs-14 as base image
19-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
20-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
19+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2120

2221

2322
## Build args to be used at this step
@@ -34,7 +33,6 @@ COPY ${SOURCE_CODE}/ ./
3433

3534
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/driver ./backend/src/v2/cmd/driver/*.go
3635

37-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
3836
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
3937

4038
WORKDIR /bin

backend/Dockerfile.launcher

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ ARG CI_CONTAINER_VERSION="unknown"
1818

1919

2020
# Use ubi8/nodejs-14 as base image
21-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
22-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
21+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2322

2423

2524
## Build args to be used at this step
@@ -36,7 +35,6 @@ COPY ${SOURCE_CODE}/ ./
3635

3736
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/launcher-v2 ./backend/src/v2/cmd/launcher-v2/*.go
3837

39-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
4038
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
4139

4240
WORKDIR /bin

backend/Dockerfile.persistenceagent

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ ARG CI_CONTAINER_VERSION="unknown"
1818

1919

2020
# Use ubi8/go-toolset as base image
21-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
22-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
21+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2322

2423
## Build args to be used at this step
2524
ARG SOURCE_CODE
@@ -36,7 +35,6 @@ COPY ${SOURCE_CODE}/ ./
3635

3736
RUN GO111MODULE=on go build -o /bin/persistence_agent backend/src/agent/persistence/*.go
3837

39-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
4038
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
4139
WORKDIR /bin
4240

backend/Dockerfile.scheduledworkflow

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
ARG SOURCE_CODE=.
1717

1818
# Use ubi8/nodejs-14 as base image
19-
#@follow_tag(registry.access.redhat.com/ubi8/go-toolset:1.20)
20-
FROM registry.access.redhat.com/ubi8/go-toolset:1.20 as builder
19+
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 as builder
2120

2221
## Build args to be used at this step
2322
ARG SOURCE_CODE
@@ -41,7 +40,6 @@ COPY ${SOURCE_CODE}/ ./
4140

4241
RUN GO111MODULE=on go build -o /bin/controller backend/src/crd/controller/scheduledworkflow/*.go
4342

44-
#@follow_tag(registry.access.redhat.com/ubi8/ubi-minimal:latest)
4543
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
4644
WORKDIR /bin
4745

backend/Dockerfile.viewercontroller

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM golang:1.20.4-alpine3.17 as builder
15+
FROM golang:1.21.4-alpine3.17 as builder
1616

1717
RUN apk update && apk upgrade
1818
RUN apk add --no-cache git gcc musl-dev

backend/src/v2/test/components/build_go.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ metadata:
2828
author: Yuan Gong <[email protected]>
2929
implementation:
3030
container:
31-
image: golang:1.20-alpine
31+
image: golang:1.21-alpine
3232
command:
3333
- sh
3434
- -exc

0 commit comments

Comments
 (0)