Skip to content

Commit

Permalink
chore: bump golang to 1.20 (#2910)
Browse files Browse the repository at this point in the history
* bump golang to 1.20

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* use .x because of actions/setup-go#326

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* use .x because of actions/setup-go#326

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* change test to avoid loopclosure: loop variable test captured by func literal from go vet

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* ignore new govet rules for tests to pass

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* change closures

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* fix test

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* fix test

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* fix go vet by removing concurency

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* one more

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* copy var instead of removing Parallel

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

* copy var instead of removing Parallel

Signed-off-by: zachaller <zachaller@users.noreply.github.com>

---------

Signed-off-by: zachaller <zachaller@users.noreply.github.com>
  • Loading branch information
zachaller authored Jul 28, 2023
1 parent 8bed760 commit 44f9488
Show file tree
Hide file tree
Showing 22 changed files with 696 additions and 207 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
with:
quay_image_name: ${{ needs.set-vars.outputs.controller-meta-tags }}
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
go-version: 1.19
go-version: '1.20'
platforms: ${{ needs.set-vars.outputs.platforms }}
push: ${{ github.event_name != 'pull_request' }}
secrets:
Expand All @@ -84,7 +84,7 @@ jobs:
with:
quay_image_name: ${{ needs.set-vars.outputs.plugin-meta-tags }}
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
go-version: 1.19
go-version: '1.20'
platforms: ${{ needs.set-vars.outputs.platforms }}
push: ${{ github.event_name != 'pull_request' }}
target: kubectl-argo-rollouts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4.0.1
with:
go-version: 1.19
go-version: '1.20'
- uses: actions/checkout@v3.1.0
- name: Setup k3s
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4.0.1
with:
go-version: 1.19
go-version: 1.20
- name: build
run: |
pip install mkdocs mkdocs_material
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- "master"
env:
# Golang version to use across CI steps
GOLANG_VERSION: '1.19'
GOLANG_VERSION: '1.20'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0
version: v1.53.3
args: --timeout 6m
build:
name: Build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
permissions: {}

env:
GOLANG_VERSION: '1.19' # Note: go-version must also be set in job controller-image.with.go-version & plugin-image.with.go-version.
GOLANG_VERSION: '1.20' # Note: go-version must also be set in job controller-image.with.go-version & plugin-image.with.go-version.

jobs:
controller-image:
Expand All @@ -19,7 +19,7 @@ jobs:
with:
quay_image_name: quay.io/argoproj/argo-rollouts:${{ github.ref_name }}
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
go-version: 1.19
go-version: '1.20'
platforms: linux/amd64,linux/arm64
push: true
secrets:
Expand All @@ -35,7 +35,7 @@ jobs:
with:
quay_image_name: quay.io/argoproj/kubectl-argo-rollouts:${{ github.ref_name }}
# Note: cannot use env variables to set go-version (https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
go-version: 1.19
go-version: '1.20'
platforms: linux/amd64,linux/arm64
push: true
target: kubectl-argo-rollouts
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Initial stage which pulls prepares build dependencies and CLI tooling we need for our final image
# Also used as the image in CI jobs so needs all dependencies
####################################################################################################
FROM --platform=$BUILDPLATFORM golang:1.19 as builder
FROM --platform=$BUILDPLATFORM golang:1.20 as builder

RUN apt-get update && apt-get install -y \
wget \
Expand All @@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install golangci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0 && \
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3 && \
golangci-lint linters

COPY .golangci.yml ${GOPATH}/src/dummy/.golangci.yml
Expand Down Expand Up @@ -40,7 +40,7 @@ RUN NODE_ENV='production' yarn build
####################################################################################################
# Rollout Controller Build stage which performs the actual build of argo-rollouts binaries
####################################################################################################
FROM --platform=$BUILDPLATFORM golang:1.19 as argo-rollouts-build
FROM --platform=$BUILDPLATFORM golang:1.20 as argo-rollouts-build

WORKDIR /go/src/github.com/argoproj/argo-rollouts

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
####################################################################################################
# argo-rollouts-dev
####################################################################################################
FROM golang:1.19 as builder
FROM golang:1.20 as builder

RUN apt-get update && apt-get install -y \
ca-certificates && \
Expand Down
Loading

0 comments on commit 44f9488

Please sign in to comment.