Skip to content

Commit 3855a18

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-latest-release
2 parents 489d495 + d73c233 commit 3855a18

File tree

782 files changed

+58863
-15002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

782 files changed

+58863
-15002
lines changed

.builder-image-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.19
1+
1.1.20

.github/actions/setup-go/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ runs:
66
- name: Install go
77
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
88
with:
9+
go-version: "1.22"
910
go-version-file: "go.mod"
1011
cache: true
1112
cache-dependency-path: go.sum

.github/renovate/golang.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
},
55
// https://docs.renovatebot.com/configuration-options/#constraints
66
"constraints": {
7-
"go": "1.21"
7+
"go": "1.22"
88
},
99
packageRules: [
1010
{

.github/workflows/pr-lint.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
2222
runs-on: ubuntu-latest
2323
container:
24-
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.19
24+
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.20
2525
credentials:
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.github_token }}
@@ -31,6 +31,8 @@ jobs:
3131
with:
3232
ref: ${{ github.event.pull_request.head.sha }}
3333

34+
- uses: ./.github/actions/setup-go
35+
3436
- name: Fixup git permissions
3537
# https://github.com/actions/checkout/issues/766
3638
shell: bash

.github/workflows/release.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,8 @@ jobs:
139139
with:
140140
fetch-depth: 0
141141

142-
- name: Install go
143-
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
144-
with:
145-
go-version-file: "go.mod"
146-
cache: true
147-
cache-dependency-path: go.sum
142+
143+
- uses: ./.github/actions/setup-go
148144

149145
- name: install kustomize
150146
run: |

.github/workflows/schedule-scan-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Trivy
1010
runs-on: ubuntu-latest
1111
container:
12-
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.19
12+
image: ghcr.io/sovereigncloudstack/cso-builder:1.1.20
1313
credentials:
1414
username: ${{ github.actor }}
1515
password: ${{ secrets.github_token }}

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,19 @@ jobs:
6969
GO111MODULE: "on"
7070
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
7171
run: make test-integration-workloadcluster
72+
73+
- name: Running integration tests github
74+
env:
75+
GIT_PROVIDER: github
76+
GIT_ORG_NAME: SovereignCloudStack
77+
GIT_REPOSITORY_NAME: cluster-stacks
78+
GO111MODULE: "on"
79+
GIT_ACCESS_TOKEN: ${{ secrets.GIT_ACCESS_TOKEN }}
80+
run: make test-integration-github
81+
82+
# - name: Running integration tests oci
83+
# env:
84+
# OCI_REGISTRY: registry.scs.community
85+
# OCI_REPOSITORY: registry.scs.community/csctl-oci/docker
86+
# GO111MODULE: "on"
87+
# run: make test-integration-oci

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,6 @@ main
8282
*.tgz.yaml
8383
*.build.yaml
8484
.release
85+
86+
# .config/go/telemetry/local/
87+
.config

.golangci.yaml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ linters:
1212
- errname
1313
- errorlint
1414
- exhaustive
15-
- exportloopref
15+
- copyloopvar
1616
- forcetypeassert
1717
- gci
1818
- goconst
@@ -86,10 +86,7 @@ linters-settings:
8686
allow-unused: false
8787
allow-leading-space: false
8888
require-specific: true
89-
staticcheck:
90-
go: "1.21"
9189
stylecheck:
92-
go: "1.21"
9390
checks: ["all", "-ST1006"]
9491
dot-import-whitelist:
9592
- "github.com/onsi/gomega"
@@ -101,6 +98,9 @@ linters-settings:
10198
- performance
10299
- experimental
103100
- opinionated
101+
settings:
102+
hugeParam:
103+
sizeThreshold: 120
104104
revive:
105105
enable-all-rules: true
106106
rules:
@@ -223,8 +223,6 @@ linters-settings:
223223
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#struct-tag
224224
- name: struct-tag
225225
disabled: true
226-
unused:
227-
go: "1.21"
228226
usestdlibvars:
229227
# Suggest the use of http.MethodXX.
230228
# Default: true
@@ -247,9 +245,6 @@ linters-settings:
247245
# Suggest the use of rpc.DefaultXXPath.
248246
# Default: false
249247
default-rpc-path: true
250-
# Suggest the use of os.DevNull.
251-
# Default: false
252-
os-dev-null: true
253248
# Suggest the use of sql.LevelXX.String().
254249
# Default: false
255250
sql-isolation-level: true
@@ -259,9 +254,6 @@ linters-settings:
259254
# Suggest the use of constant.Kind.String().
260255
# Default: false
261256
constant-kind: true
262-
# Suggest the use of syslog.Priority.
263-
# Default: false
264-
syslog-priority: true
265257
wrapcheck:
266258
ignoreSigs:
267259
- status.Error(
@@ -285,11 +277,10 @@ issues:
285277
- linters:
286278
- wrapcheck
287279
path: _test\.go
280+
exclude-dirs:
281+
- vendor$
288282
run:
289283
timeout: 10m
290-
go: "1.21"
284+
go: "1.22"
291285
allow-parallel-runners: true
292286
modules-download-mode: vendor
293-
skip-dirs:
294-
- vendor$
295-
- test/vendor$

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ MGT_CLUSTER_KUBECONFIG ?= ".mgt-cluster-kubeconfig.yaml"
8181

8282
# Kubebuilder.
8383
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.29.3
84-
# versions
84+
# versions
8585
CTLPTL_VERSION := 0.8.25
8686

8787
##@ Binaries
@@ -91,7 +91,7 @@ CTLPTL_VERSION := 0.8.25
9191
# need in CI for releasing
9292
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/controller-gen)
9393
$(CONTROLLER_GEN): # Build controller-gen from tools folder.
94-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.14.0
94+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.2
9595

9696
# need this in CI for releasing
9797
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/kustomize)
@@ -304,7 +304,7 @@ $(WORKER_CLUSTER_KUBECONFIG):
304304
KUBEBUILDER_ASSETS ?= $(shell $(SETUP_ENVTEST) use --use-env --bin-dir $(abspath $(TOOLS_BIN_DIR)) -p path $(KUBEBUILDER_ENVTEST_KUBERNETES_VERSION))
305305

306306
.PHONY: test-integration
307-
test-integration: test-integration-workloadcluster test-integration-github
307+
test-integration: test-integration-workloadcluster test-integration-github test-integration-oci
308308
echo done
309309

310310
.PHONY: test-unit
@@ -325,6 +325,12 @@ test-integration-github: $(SETUP_ENVTEST) $(GOTESTSUM)
325325
CREATE_KIND_CLUSTER=false KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" $(GOTESTSUM) --junitfile=.coverage/junit.xml --format testname -- -mod=vendor \
326326
-covermode=atomic -coverprofile=.coverage/cover.out -p=1 ./internal/test/integration/github/...
327327

328+
.PHONY: test-integration-oci
329+
test-integration-oci: $(SETUP_ENVTEST) $(GOTESTSUM)
330+
@mkdir -p $(shell pwd)/.coverage
331+
CREATE_KIND_CLUSTER=false KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" $(GOTESTSUM) --junitfile=.coverage/junit.xml --format testname -- -mod=vendor \
332+
-covermode=atomic -coverprofile=.coverage/cover.out -p=1 ./internal/test/integration/oci/...
333+
328334
##@ Verify
329335
##########
330336
# Verify #
@@ -445,7 +451,7 @@ ifeq ($(BUILD_IN_CONTAINER),true)
445451
else
446452
go version
447453
golangci-lint version
448-
GO111MODULE=on golangci-lint run -v --out-format=github-actions
454+
GO111MODULE=on golangci-lint run -v --out-format=colored-line-number
449455
endif
450456

451457
.PHONY: lint-yaml

0 commit comments

Comments
 (0)