Skip to content

Commit 0eec37b

Browse files
author
Paulo Gomes
authored
Merge pull request #440 from fluxcd/build-go1.19
Build with Go 1.19
2 parents ffd00ad + 79ca3ce commit 0eec37b

File tree

8 files changed

+30
-32
lines changed

8 files changed

+30
-32
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup Go
1818
uses: actions/setup-go@v3
1919
with:
20-
go-version: 1.18.x
20+
go-version: 1.19.x
2121
- name: Restore go cache
2222
uses: actions/cache@v3
2323
with:
@@ -41,7 +41,7 @@ jobs:
4141
- name: Setup Go
4242
uses: actions/setup-go@v3
4343
with:
44-
go-version: 1.18.x
44+
go-version: 1.19.x
4545
- name: Run tests
4646
run: make test
4747
env:
@@ -64,7 +64,7 @@ jobs:
6464
- name: Setup Go
6565
uses: actions/setup-go@v3
6666
with:
67-
go-version: 1.18.x
67+
go-version: 1.19.x
6868
- name: Restore Go cache
6969
uses: actions/cache@v3
7070
with:

.github/workflows/cifuzz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Go
1717
uses: actions/setup-go@v3
1818
with:
19-
go-version: 1.18.x
19+
go-version: 1.19.x
2020
- name: Restore Go cache
2121
uses: actions/cache@v3
2222
with:

.github/workflows/scan.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
steps:
3232
- name: Checkout repository
3333
uses: actions/checkout@v3
34+
- name: Set up Go
35+
uses: actions/setup-go@v2
36+
with:
37+
go-version: 1.19.x
3438
- name: Initialize CodeQL
3539
uses: github/codeql-action/init@v2
3640
with:

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG BASE_VARIANT=alpine
2-
ARG GO_VERSION=1.18
2+
ARG GO_VERSION=1.19
33
ARG XX_VERSION=1.1.2
44

55
ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2-only
@@ -72,7 +72,7 @@ RUN export LIBRARY_PATH="/usr/local/$(xx-info triple)" && \
7272
# Ensure that the binary was cross-compiled correctly to the target platform.
7373
RUN xx-verify --static /image-automation-controller
7474

75-
FROM alpine:3.15
75+
FROM alpine:3.16
7676

7777
ARG TARGETPLATFORM
7878
RUN apk --no-cache add ca-certificates \

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ docker-deploy: ## Set the Docker image in-cluster
195195
CONTROLLER_GEN = $(GOBIN)/controller-gen
196196
.PHONY: controller-gen
197197
controller-gen: ## Download controller-gen locally if necessary.
198-
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
198+
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
199199

200200
libgit2: $(LIBGIT2) ## Detect or download libgit2 library
201201

config/crd/bases/image.toolkit.fluxcd.io_imageupdateautomations.yaml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.7.0
6+
controller-gen.kubebuilder.io/version: v0.8.0
87
creationTimestamp: null
98
name: imageupdateautomations.image.toolkit.fluxcd.io
109
spec:
@@ -156,14 +155,12 @@ spec:
156155
description: "Condition contains details for one aspect of the current
157156
state of this API Resource. --- This struct is intended for direct
158157
use as an array at the field path .status.conditions. For example,
159-
\n \ttype FooStatus struct{ \t // Represents the observations
160-
of a foo's current state. \t // Known .status.conditions.type
161-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
162-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
163-
\t // +listMapKey=type \t Conditions []metav1.Condition
158+
\n type FooStatus struct{ // Represents the observations of a
159+
foo's current state. // Known .status.conditions.type are: \"Available\",
160+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
161+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
164162
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
165-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
166-
\t}"
163+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
167164
properties:
168165
lastTransitionTime:
169166
description: lastTransitionTime is the last time the condition
@@ -429,14 +426,12 @@ spec:
429426
description: "Condition contains details for one aspect of the current
430427
state of this API Resource. --- This struct is intended for direct
431428
use as an array at the field path .status.conditions. For example,
432-
\n \ttype FooStatus struct{ \t // Represents the observations
433-
of a foo's current state. \t // Known .status.conditions.type
434-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
435-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
436-
\t // +listMapKey=type \t Conditions []metav1.Condition
429+
\n type FooStatus struct{ // Represents the observations of a
430+
foo's current state. // Known .status.conditions.type are: \"Available\",
431+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
432+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
437433
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
438-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
439-
\t}"
434+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
440435
properties:
441436
lastTransitionTime:
442437
description: lastTransitionTime is the last time the condition
@@ -714,14 +709,12 @@ spec:
714709
description: "Condition contains details for one aspect of the current
715710
state of this API Resource. --- This struct is intended for direct
716711
use as an array at the field path .status.conditions. For example,
717-
\n \ttype FooStatus struct{ \t // Represents the observations
718-
of a foo's current state. \t // Known .status.conditions.type
719-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
720-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
721-
\t // +listMapKey=type \t Conditions []metav1.Condition
712+
\n type FooStatus struct{ // Represents the observations of a
713+
foo's current state. // Known .status.conditions.type are: \"Available\",
714+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
715+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
722716
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
723-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
724-
\t}"
717+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
725718
properties:
726719
lastTransitionTime:
727720
description: lastTransitionTime is the last time the condition

controllers/controllers_fuzzer_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ var testFiles embed.FS
7777
// This fuzzer randomized 2 things:
7878
// 1: The files in the git repository
7979
// 2: The values of ImageUpdateAutomationSpec
80-
// and ImagePolicy resources
80+
//
81+
// and ImagePolicy resources
8182
func Fuzz_ImageUpdateReconciler(f *testing.F) {
8283
f.Fuzz(func(t *testing.T, seed []byte) {
8384
initter.Do(func() {

pkg/test/files.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ func (d dirfile) FailedExpectation(g *WithT) {
7676
// DiffDirectories walks the two given directories, recursively, and
7777
// reports relative paths for any files that are:
7878
//
79-
// (in actual but not expected, in expected but not actual, in both but different)
79+
// (in actual but not expected, in expected but not actual, in both but different)
8080
//
8181
// It ignores dot directories (e.g., `.git/`) and Emacs backups (e.g.,
8282
// `foo.yaml~`). It panics if it encounters any error apart from a

0 commit comments

Comments
 (0)