Skip to content

Commit 92aca4e

Browse files
committed
BUILD/MAJOR: go: increase Go version to 1.20
1 parent 2673fff commit 92aca4e

File tree

3 files changed

+40
-37
lines changed

3 files changed

+40
-37
lines changed

.github/workflows/actions.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- name: Check out code
37-
uses: actions/checkout@v2
37+
uses: actions/checkout@v3
3838
- name: Set up Go
39-
uses: actions/setup-go@v2
39+
uses: actions/setup-go@v3
4040
with:
41-
go-version: 1.19
41+
go-version-file: 'go.mod'
4242
- uses: actions/cache@v2
4343
with:
4444
path: |
@@ -56,11 +56,11 @@ jobs:
5656
runs-on: ubuntu-latest
5757
steps:
5858
- name: Check out code
59-
uses: actions/checkout@v2
59+
uses: actions/checkout@v3
6060
- name: Set up Go
61-
uses: actions/setup-go@v2
61+
uses: actions/setup-go@v3
6262
with:
63-
go-version: 1.19
63+
go-version-file: 'go.mod'
6464
- uses: actions/cache@v2
6565
with:
6666
path: |
@@ -78,12 +78,12 @@ jobs:
7878
needs: ["generate", "tidy"]
7979
runs-on: ubuntu-latest
8080
steps:
81-
- name: Check out code into the Go module directory
82-
uses: actions/checkout@v2
81+
- name: Check out code
82+
uses: actions/checkout@v3
8383
- name: Set up Go
84-
uses: actions/setup-go@v2
84+
uses: actions/setup-go@v3
8585
with:
86-
go-version: 1.19
86+
go-version-file: 'go.mod'
8787
- uses: actions/cache@v2
8888
with:
8989
path: |
@@ -101,12 +101,11 @@ jobs:
101101
needs: ["lint"]
102102
steps:
103103
- name: Check out code
104-
uses: actions/checkout@v2
105-
- name: Set up Go 1.19
106-
uses: actions/setup-go@v2
104+
uses: actions/checkout@v3
105+
- name: Set up Go
106+
uses: actions/setup-go@v3
107107
with:
108-
go-version: 1.19
109-
id: go
108+
go-version-file: 'go.mod'
110109
- uses: actions/cache@v2
111110
with:
112111
path: |
@@ -128,10 +127,12 @@ jobs:
128127
needs: ["build"]
129128
runs-on: ubuntu-latest
130129
steps:
131-
- uses: actions/checkout@v2
132-
- uses: actions/setup-go@v2
130+
- name: Check out code
131+
uses: actions/checkout@v3
132+
- name: Set up Go
133+
uses: actions/setup-go@v3
133134
with:
134-
go-version: '^1.19' # The Go version to download (if necessary) and use.
135+
go-version-file: 'go.mod'
135136
- uses: actions/cache@v2
136137
with:
137138
path: |

.gitlab-ci.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ variables:
1616
KIND: v0.16.0
1717
DOCKER_HOST: tcp://docker:2375
1818
DOCKER_DRIVER: overlay2
19+
GO_VERSION: "1.20"
20+
DOCKER_VERSION: "20.10"
1921
diff:
2022
stage: diff
2123
rules:
2224
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
2325
- if: $CI_PIPELINE_SOURCE == 'push'
2426
image:
25-
name: $CI_REGISTRY_GO/golang:1.19
27+
name: $CI_REGISTRY_GO/golang:$GO_VERSION
2628
entrypoint: [ "" ]
2729
tags:
2830
- go
@@ -38,7 +40,7 @@ tidy:
3840
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
3941
- if: $CI_PIPELINE_SOURCE == 'push'
4042
image:
41-
name: $CI_REGISTRY_GO/golang:1.19
43+
name: $CI_REGISTRY_GO/golang:$GO_VERSION
4244
entrypoint: [""]
4345
tags:
4446
- go
@@ -52,7 +54,7 @@ gofumpt:
5254
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
5355
- if: $CI_PIPELINE_SOURCE == 'push'
5456
image:
55-
name: $CI_REGISTRY_GO/golang:1.19
57+
name: $CI_REGISTRY_GO/golang:$GO_VERSION
5658
entrypoint: [""]
5759
tags:
5860
- go
@@ -66,7 +68,7 @@ golangci_lint:
6668
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
6769
- if: $CI_PIPELINE_SOURCE == 'push'
6870
image:
69-
name: $CI_REGISTRY_GO/golang:1.19
71+
name: $CI_REGISTRY_GO/golang:$GO_VERSION
7072
entrypoint: [""]
7173
tags:
7274
- go
@@ -78,7 +80,7 @@ lint-commit-msg:
7880
rules:
7981
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
8082
image:
81-
name: $CI_REGISTRY_GO/check-commit:v2.1.0
83+
name: $CI_REGISTRY_GO/commit-check:3.0.0
8284
entrypoint: [""]
8385
tags:
8486
- go
@@ -91,7 +93,7 @@ unit-tests:
9193
- if: $CI_PIPELINE_SOURCE == 'push'
9294
stage: unit-tests
9395
image:
94-
name: $CI_REGISTRY_GO/haproxy-alpine:2.5-go1.19
96+
name: $CI_REGISTRY_GO/haproxy-alpine:2.6-go$GO_VERSION
9597
entrypoint: [""]
9698
tags:
9799
- go
@@ -104,9 +106,9 @@ docker-build:
104106
rules:
105107
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
106108
- if: $CI_PIPELINE_SOURCE == 'push'
107-
image: $CI_REGISTRY_GO/docker:stable-go1.19
109+
image: $CI_REGISTRY_GO/docker:stable-go$GO_VERSION
108110
services:
109-
- name: $CI_REGISTRY_GO/docker:20.10-dind
111+
- name: $CI_REGISTRY_GO/docker:$DOCKER_VERSION-dind
110112
alias: docker
111113
tags:
112114
- go
@@ -115,8 +117,8 @@ docker-build:
115117
- go version
116118
- docker pull -q $CI_REGISTRY_GO/alpine:3
117119
- docker image tag $CI_REGISTRY_GO/alpine:3 alpine:3
118-
- docker pull -q $CI_REGISTRY_GO/golang:1.19-alpine
119-
- docker image tag $CI_REGISTRY_GO/golang:1.19-alpine golang:1.19-alpine
120+
- docker pull -q $CI_REGISTRY_GO/golang:$GO_VERSION-alpine
121+
- docker image tag $CI_REGISTRY_GO/golang:$GO_VERSION-alpine golang:$GO_VERSION-alpine
120122
- sed -i "s~FROM golang~FROM $CI_REGISTRY_GO/golang~g" "build/Dockerfile"
121123
- sed -i "s~FROM haproxytech/haproxy-alpine~FROM $CI_REGISTRY_GO/haproxy-alpine~g" "build/Dockerfile"
122124
script:
@@ -133,9 +135,9 @@ docker-build-sch:
133135
needs: []
134136
rules:
135137
- if: $CI_PIPELINE_SOURCE == 'schedule'
136-
image: $CI_REGISTRY_GO/docker:stable-go1.19
138+
image: $CI_REGISTRY_GO/docker:stable-go$GO_VERSION
137139
services:
138-
- name: $CI_REGISTRY_GO/docker:20.10-dind
140+
- name: $CI_REGISTRY_GO/docker:$DOCKER_VERSION-dind
139141
alias: docker
140142
tags:
141143
- go
@@ -144,8 +146,8 @@ docker-build-sch:
144146
- go version
145147
- docker pull -q $CI_REGISTRY_GO/alpine:3
146148
- docker image tag $CI_REGISTRY_GO/alpine:3 alpine:3
147-
- docker pull -q $CI_REGISTRY_GO/golang:1.19-alpine
148-
- docker image tag $CI_REGISTRY_GO/golang:1.19-alpine golang:1.19-alpine
149+
- docker pull -q $CI_REGISTRY_GO/golang:$GO_VERSION-alpine
150+
- docker image tag $CI_REGISTRY_GO/golang:$GO_VERSION-alpine golang:$GO_VERSION-alpine
149151
- sed -i "s~FROM golang~FROM $CI_REGISTRY_GO/golang~g" "build/Dockerfile"
150152
- sed -i "s~FROM haproxytech/haproxy-alpine~FROM $CI_REGISTRY_GO/haproxy-alpine~g" "build/Dockerfile"
151153
script:
@@ -163,9 +165,9 @@ docker-build-sch:
163165
rules:
164166
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
165167
- if: $CI_PIPELINE_SOURCE == 'push'
166-
image: $CI_REGISTRY_GO/docker:stable-go1.19
168+
image: $CI_REGISTRY_GO/docker:stable-go$GO_VERSION
167169
services:
168-
- name: $CI_REGISTRY_GO/docker:20.10-dind
170+
- name: $CI_REGISTRY_GO/docker:$DOCKER_VERSION-dind
169171
alias: docker
170172
tags:
171173
- go
@@ -182,8 +184,8 @@ docker-build-sch:
182184
- go mod download &
183185
#- docker pull -q $CI_REGISTRY_GO/alpine:3
184186
#- docker image tag $CI_REGISTRY_GO/alpine:3 alpine:3
185-
#- docker pull -q $CI_REGISTRY_GO/golang:1.19-alpine
186-
#- docker image tag $CI_REGISTRY_GO/golang:1.19-alpine golang:1.19-alpine
187+
#- docker pull -q $CI_REGISTRY_GO/golang:$GO_VERSION-alpine
188+
#- docker image tag $CI_REGISTRY_GO/golang:$GO_VERSION-alpine golang:$GO_VERSION-alpine
187189
- docker pull -q $CI_REGISTRY_GO/haproxytech/http-echo:latest
188190
- docker image tag $CI_REGISTRY_GO/haproxytech/http-echo:latest haproxytech/http-echo:latest
189191
- wget -nv -O /usr/local/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND}/kind-linux-amd64

go.mod

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

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/fasthttp/router v1.4.12

0 commit comments

Comments
 (0)