Skip to content

Commit 497839a

Browse files
committed
*: update to go 1.23
* go.mod use go 1.22 minimum version semantics. * ci: use the current last two go versions: 1.22 and 1.23 * Dockerfile: use go 1.23 image * Also update golangci-lint to v1.61.0
1 parent 7612495 commit 497839a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.agola/config.jsonnet

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ local task_build_go(version, arch) = {
3939
{ type: 'run', command: 'make' },
4040
{ type: 'save_cache', key: 'cache-sum-{{ md5sum "go.sum" }}', contents: [{ source_dir: '/go/pkg/mod/cache' }] },
4141
{ type: 'save_cache', key: 'cache-date-{{ year }}-{{ month }}-{{ day }}', contents: [{ source_dir: '/go/pkg/mod/cache' }] },
42-
{ type: 'run', name: 'install golangci-lint', command: 'curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2' },
43-
{ type: 'run', command: 'golangci-lint run --deadline 5m' },
42+
{ type: 'run', name: 'install golangci-lint', command: 'curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0' },
43+
{ type: 'run', command: 'golangci-lint run --timeout 10m' },
4444
{ type: 'run', name: 'build docker/k8s drivers tests binary', command: 'CGO_ENABLED=0 go test -c ./internal/services/executor/driver -o ./bin/docker-tests' },
4545
{ type: 'run', name: 'build integration tests binary', command: 'go test -tags "sqlite_unlock_notify" -c ./tests -o ./bin/integration-tests' },
4646
{ type: 'run', name: 'run tests (sqlite3)',
@@ -128,7 +128,7 @@ local task_build_push_images(name, target, push) =
128128
[
129129
task_build_go(version, arch),
130130
]
131-
for version in ['1.21', '1.22']
131+
for version in ['1.22', '1.23']
132132
for arch in ['amd64' /*, 'arm64' */]
133133
]) + [
134134
{
@@ -139,7 +139,7 @@ local task_build_push_images(name, target, push) =
139139
{ type: 'run', command: 'SKIP_K8S_TESTS=1 AGOLA_TOOLBOX_PATH="./bin" ./bin/docker-tests -test.parallel 5 -test.v' },
140140
],
141141
depends: [
142-
'build go 1.22 amd64',
142+
'build go 1.23 amd64',
143143
],
144144
},
145145
{
@@ -162,7 +162,7 @@ local task_build_push_images(name, target, push) =
162162
{ type: 'run', name: 'integration tests', command: 'AGOLA_BIN_DIR="./bin" GITEA_PATH=${PWD}/bin/gitea DOCKER_BRIDGE_ADDRESS="172.18.0.1" ./bin/integration-tests -test.parallel 3 -test.v' },
163163
],
164164
depends: [
165-
'build go 1.22 amd64',
165+
'build go 1.23 amd64',
166166
],
167167
},
168168
{

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FROM $AGOLAWEB_IMAGE as agola-web
77
#######
88

99
# base build image
10-
FROM golang:1.22-bookworm AS build_base
10+
FROM golang:1.23-bookworm AS build_base
1111

1212
WORKDIR /agola
1313

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module agola.io/agola
22

3-
go 1.21
3+
go 1.22
44

55
require (
66
ariga.io/atlas v0.12.0

internal/util/dump.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type dump struct {
3232
}
3333

3434
func (d *dump) Format(f fmt.State, c rune) {
35-
f.Write([]byte(litter.Sdump(d.data)))
35+
_, _ = f.Write([]byte(litter.Sdump(d.data)))
3636
}
3737

3838
func Dump(data interface{}) *dump {

0 commit comments

Comments
 (0)