Skip to content

Commit ae7522d

Browse files
Merge pull request #104 from cert-manager/self-upgrade-main
[CI] Merge self-upgrade-main into main
2 parents 8d39f43 + cb65cda commit ae7522d

File tree

8 files changed

+25
-28
lines changed

8 files changed

+25
-28
lines changed

.golangci.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ formatters:
7373
sections:
7474
- standard # Standard section: captures all standard packages.
7575
- default # Default section: contains all imports that could not be matched to another section type.
76-
- prefix(github.com/cert-manager/webhook-cert-lib) # Custom section: groups all imports with the specified Prefix.
76+
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
7777
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
7878
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
79+
custom-order: true
7980
exclusions:
8081
generated: lax
8182
paths: [third_party, builtin$, examples$]

klone.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,35 @@ targets:
99
- folder_name: boilerplate
1010
repo_url: https://github.com/cert-manager/makefile-modules.git
1111
repo_ref: main
12-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
12+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
1313
repo_path: modules/boilerplate
1414
- folder_name: generate-verify
1515
repo_url: https://github.com/cert-manager/makefile-modules.git
1616
repo_ref: main
17-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
17+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
1818
repo_path: modules/generate-verify
1919
- folder_name: go
2020
repo_url: https://github.com/cert-manager/makefile-modules.git
2121
repo_ref: main
22-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
22+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
2323
repo_path: modules/go
2424
- folder_name: help
2525
repo_url: https://github.com/cert-manager/makefile-modules.git
2626
repo_ref: main
27-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
27+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
2828
repo_path: modules/help
2929
- folder_name: klone
3030
repo_url: https://github.com/cert-manager/makefile-modules.git
3131
repo_ref: main
32-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
32+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
3333
repo_path: modules/klone
3434
- folder_name: repository-base
3535
repo_url: https://github.com/cert-manager/makefile-modules.git
3636
repo_ref: main
37-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
37+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
3838
repo_path: modules/repository-base
3939
- folder_name: tools
4040
repo_url: https://github.com/cert-manager/makefile-modules.git
4141
repo_ref: main
42-
repo_hash: a0b43109b7ada33a472a12af4332a6148464b1ab
42+
repo_hash: 2121d6bf1ec6440011bc03021015af1c18ec0eba
4343
repo_path: modules/tools

make/_shared/go/.golangci.override.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,11 @@ formatters:
7070
enable: [ gci, gofmt ]
7171
settings:
7272
gci:
73+
custom-order: true
7374
sections:
7475
- standard # Standard section: captures all standard packages.
7576
- default # Default section: contains all imports that could not be matched to another section type.
76-
- prefix({{REPO-NAME}}) # Custom section: groups all imports with the specified Prefix.
77+
- localmodule # Local module section: contains all local packages. This section is not present unless explicitly enabled.
7778
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
7879
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.
7980
exclusions:

make/_shared/go/01_mod.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ generate-golangci-lint-config: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(bin_dir)/s
117117
cp $(golangci_lint_config) $(bin_dir)/scratch/golangci-lint.yaml.tmp
118118
$(YQ) -i 'del(.linters.enable)' $(bin_dir)/scratch/golangci-lint.yaml.tmp
119119
$(YQ) eval-all -i '. as $$item ireduce ({}; . * $$item)' $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_override)
120-
$(YQ) -i '(.. | select(tag == "!!str")) |= sub("{{REPO-NAME}}", "$(repo_name)")' $(bin_dir)/scratch/golangci-lint.yaml.tmp
121120
mv $(bin_dir)/scratch/golangci-lint.yaml.tmp $(golangci_lint_config)
122121

123122
shared_generate_targets += generate-golangci-lint-config
@@ -147,9 +146,9 @@ fix-golangci-lint: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(NEEDS_GCI) $(bin_dir)/
147146
@find . -name go.mod -not \( -path "./$(bin_dir)/*" -or -path "./make/_shared/*" \) \
148147
| while read d; do \
149148
target=$$(dirname $${d}); \
150-
echo "Running 'GOVERSION=$(VENDORED_GO_VERSION) $(bin_dir)/tools/golangci-lint fmt -c $(CURDIR)/$(golangci_lint_config)' in directory '$${target}'"; \
149+
echo "Running 'GOVERSION=$(VENDORED_GO_VERSION) $(bin_dir)/tools/golangci-lint run --fix -c $(CURDIR)/$(golangci_lint_config) --timeout $(golangci_lint_timeout)' in directory '$${target}'"; \
151150
pushd "$${target}" >/dev/null; \
152-
GOVERSION=$(VENDORED_GO_VERSION) $(GOLANGCI-LINT) fmt -c $(CURDIR)/$(golangci_lint_config) || exit; \
151+
GOVERSION=$(VENDORED_GO_VERSION) $(GOLANGCI-LINT) run --fix -c $(CURDIR)/$(golangci_lint_config) --timeout $(golangci_lint_timeout) || exit; \
153152
popd >/dev/null; \
154153
echo ""; \
155154
done

test/ca_secret_controller_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ package test
1919
import (
2020
"time"
2121

22+
"github.com/cert-manager/webhook-cert-lib/internal/pki"
23+
"github.com/cert-manager/webhook-cert-lib/pkg/authority"
24+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
2225
corev1 "k8s.io/api/core/v1"
2326
"k8s.io/apimachinery/pkg/types"
2427
"k8s.io/client-go/kubernetes/scheme"
2528
ctrl "sigs.k8s.io/controller-runtime"
2629
"sigs.k8s.io/controller-runtime/pkg/envtest/komega"
2730
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
2831

29-
"github.com/cert-manager/webhook-cert-lib/internal/pki"
30-
"github.com/cert-manager/webhook-cert-lib/pkg/authority"
31-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
32-
3332
. "github.com/onsi/ginkgo/v2"
3433
. "github.com/onsi/gomega"
3534
)

test/injectable_controller_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ limitations under the License.
1717
package test
1818

1919
import (
20+
"github.com/cert-manager/webhook-cert-lib/pkg/authority"
21+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
22+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/injectable"
2023
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
2124
corev1 "k8s.io/api/core/v1"
2225
"k8s.io/apimachinery/pkg/types"
@@ -26,10 +29,6 @@ import (
2629
"sigs.k8s.io/controller-runtime/pkg/envtest/komega"
2730
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
2831

29-
"github.com/cert-manager/webhook-cert-lib/pkg/authority"
30-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
31-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/injectable"
32-
3332
. "github.com/onsi/ginkgo/v2"
3433
. "github.com/onsi/gomega"
3534
)

test/leaf_cert_controller_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@ import (
2020
"crypto/tls"
2121
"time"
2222

23+
"github.com/cert-manager/webhook-cert-lib/internal/pki"
24+
"github.com/cert-manager/webhook-cert-lib/pkg/authority"
25+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
26+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/certificate"
2327
corev1 "k8s.io/api/core/v1"
2428
"k8s.io/apimachinery/pkg/types"
2529
"k8s.io/client-go/kubernetes/scheme"
2630
ctrl "sigs.k8s.io/controller-runtime"
2731
"sigs.k8s.io/controller-runtime/pkg/client"
2832
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
2933

30-
"github.com/cert-manager/webhook-cert-lib/internal/pki"
31-
"github.com/cert-manager/webhook-cert-lib/pkg/authority"
32-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
33-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/certificate"
34-
3534
. "github.com/onsi/ginkgo/v2"
3635
. "github.com/onsi/gomega"
3736
)

test/util_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ import (
2020
"errors"
2121
"fmt"
2222

23+
"github.com/cert-manager/webhook-cert-lib/internal/pki"
24+
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
2325
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
2426
corev1 "k8s.io/api/core/v1"
2527
"k8s.io/apimachinery/pkg/types"
2628
"k8s.io/utils/ptr"
2729
"sigs.k8s.io/controller-runtime/pkg/envtest/komega"
2830

29-
"github.com/cert-manager/webhook-cert-lib/internal/pki"
30-
"github.com/cert-manager/webhook-cert-lib/pkg/authority/api"
31-
3231
. "github.com/onsi/gomega"
3332
)
3433

0 commit comments

Comments
 (0)