Skip to content

Commit c83fd4b

Browse files
committed
upgrade makefile module to the latest version
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 57d3435 commit c83fd4b

File tree

20 files changed

+177
-131
lines changed

20 files changed

+177
-131
lines changed

.github/dependabot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ updates:
99
schedule:
1010
interval: daily
1111
groups:
12-
all:
12+
all-go-deps:
1313
patterns: ["*"]
1414
- package-ecosystem: github-actions
1515
directory: /
1616
schedule:
1717
interval: daily
1818
groups:
19-
all:
19+
all-gh-actions:
2020
patterns: ["*"]

.github/workflows/govulncheck.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
# This file is MANUALLY maintained, but was originally based on the makefile-modules govulncheck workflow. See the original:
2-
# https://github.com/cert-manager/makefile-modules/blob/main/modules/go/base/.github/workflows/govulncheck.yaml
3-
4-
# This file is separated from the upstream file so we can add additional auth for pulling
5-
# private dependencies. Govulncheck doesn't seem to be able to support skipping private
6-
# dependencies.
1+
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
2+
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/go/base/.github/workflows/govulncheck.yaml instead.
73

84
# Run govulncheck at midnight every night on the main branch,
95
# to alert us to recent vulnerabilities which affect the Go code in this
@@ -21,10 +17,10 @@ jobs:
2117
govulncheck:
2218
runs-on: ubuntu-latest
2319

24-
if: github.repository_owner == 'jetstack'
20+
if: github.repository == 'jetstack/preflight'
2521

2622
steps:
27-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2824
# Adding `fetch-depth: 0` makes sure tags are also fetched. We need
2925
# the tags so `git describe` returns a valid version.
3026
# see https://github.com/actions/checkout/issues/701 for extra info about this option

.github/workflows/make-self-upgrade.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
self_upgrade:
1616
runs-on: ubuntu-latest
1717

18-
if: github.repository_owner == 'cert-manager'
18+
if: github.repository == 'jetstack/preflight'
1919

2020
permissions:
2121
contents: write
@@ -32,7 +32,7 @@ jobs:
3232
echo "This workflow should not be run on a non-branch-head."
3333
exit 1
3434
35-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3636
# Adding `fetch-depth: 0` makes sure tags are also fetched. We need
3737
# the tags so `git describe` returns a valid version.
3838
# see https://github.com/actions/checkout/issues/701 for extra info about this option

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# For details on some of these "prelude" settings, see:
4040
# https://clarkgrubb.com/makefile-style-guide
4141
MAKEFLAGS += --warn-undefined-variables --no-builtin-rules
42-
SHELL := /usr/bin/env bash
42+
SHELL := /usr/bin/env PS1="" bash
4343
.SHELLFLAGS := -uo pipefail -c
4444
.DEFAULT_GOAL := help
4545
.DELETE_ON_ERROR:

klone.yaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,63 @@
77

88
targets:
99
make/_shared:
10+
- folder_name: boilerplate
11+
repo_url: https://github.com/cert-manager/makefile-modules.git
12+
repo_ref: main
13+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
14+
repo_path: modules/boilerplate
1015
- folder_name: generate-verify
1116
repo_url: https://github.com/cert-manager/makefile-modules.git
1217
repo_ref: main
13-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
18+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
1419
repo_path: modules/generate-verify
1520
- folder_name: go
1621
repo_url: https://github.com/cert-manager/makefile-modules.git
1722
repo_ref: main
18-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
23+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
1924
repo_path: modules/go
2025
- folder_name: helm
2126
repo_url: https://github.com/cert-manager/makefile-modules.git
2227
repo_ref: main
23-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
28+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
2429
repo_path: modules/helm
2530
- folder_name: help
2631
repo_url: https://github.com/cert-manager/makefile-modules.git
2732
repo_ref: main
28-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
33+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
2934
repo_path: modules/help
3035
- folder_name: kind
3136
repo_url: https://github.com/cert-manager/makefile-modules.git
3237
repo_ref: main
33-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
38+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
3439
repo_path: modules/kind
3540
- folder_name: klone
3641
repo_url: https://github.com/cert-manager/makefile-modules.git
3742
repo_ref: main
38-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
43+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
3944
repo_path: modules/klone
4045
- folder_name: licenses
4146
repo_url: https://github.com/cert-manager/makefile-modules.git
4247
repo_ref: main
43-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
48+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
4449
repo_path: modules/licenses
4550
- folder_name: oci-build
4651
repo_url: https://github.com/cert-manager/makefile-modules.git
4752
repo_ref: main
48-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
53+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
4954
repo_path: modules/oci-build
5055
- folder_name: oci-publish
5156
repo_url: https://github.com/cert-manager/makefile-modules.git
5257
repo_ref: main
53-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
58+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
5459
repo_path: modules/oci-publish
5560
- folder_name: repository-base
5661
repo_url: https://github.com/cert-manager/makefile-modules.git
5762
repo_ref: main
58-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
63+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
5964
repo_path: modules/repository-base
6065
- folder_name: tools
6166
repo_url: https://github.com/cert-manager/makefile-modules.git
6267
repo_ref: main
63-
repo_hash: 563ddf86f3e68085fbf926eb2cc7a4ec0c6d58cd
68+
repo_hash: d2abf2fdef0a202871a1137fcb6f7b9f639b61f9
6469
repo_path: modules/tools

make/00_mod.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ helm_chart_image_name := quay.io/jetstack/charts/venafi-kubernetes-agent
4242
helm_chart_version := $(VERSION)
4343
helm_labels_template_name := preflight.labels
4444

45-
# We skip using the upstream govulncheck targets because we need to customise the workflow YAML
45+
# We skip using the upstream govulncheck generate target because we need to customise the workflow YAML
4646
# locally. We provide the targets in this repo instead, and manually maintain the workflow.
47-
govulncheck_skip := true
47+
dont_generate_govulncheck := true
4848

4949
# Allows us to replace the Helm values.yaml's image.repository and image.tag
5050
# with the right values.

make/02_mod.mk

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,3 @@ test-helm: | $(NEEDS_HELM-UNITTEST)
6464
## @category Testing
6565
test-helm-snapshot: | $(NEEDS_HELM-UNITTEST)
6666
$(HELM-UNITTEST) ./deploy/charts/venafi-kubernetes-agent/ -u
67-
68-
69-
.PHONY: verify-govulncheck
70-
## Verify all Go modules for vulnerabilities using govulncheck Copied from makefile-modules
71-
## @category [shared] Generate/ Verify
72-
#
73-
# Runs `govulncheck` on all Go modules related to the project.
74-
# Ignores Go modules among the temporary build artifacts in _bin, to avoid
75-
# scanning the code of the vendored Go, after running make vendor-go.
76-
# Ignores Go modules in make/_shared, because those will be checked in centrally
77-
# in the makefile_modules repository.
78-
verify-govulncheck: | $(NEEDS_GOVULNCHECK)
79-
@find . -name go.mod -not \( -path "./$(bin_dir)/*" -or -path "./make/_shared/*" \) \
80-
| while read d; do \
81-
target=$$(dirname $${d}); \
82-
echo "Running 'GOTOOLCHAIN=go$(VENDORED_GO_VERSION) $(bin_dir)/tools/govulncheck ./...' in directory '$${target}'"; \
83-
pushd "$${target}" >/dev/null; \
84-
GOTOOLCHAIN=go$(VENDORED_GO_VERSION) $(GOVULNCHECK) ./... || exit; \
85-
popd >/dev/null; \
86-
echo ""; \
87-
done

make/_shared/boilerplate/00_mod.mk

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2023 The cert-manager Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
default_go_header_file := $(dir $(lastword $(MAKEFILE_LIST)))/template/boilerplate.go.txt
16+
17+
go_header_file ?= $(default_go_header_file)

make/_shared/boilerplate/01_mod.mk

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright 2023 The cert-manager Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
base_dir := $(dir $(lastword $(MAKEFILE_LIST)))/base/
16+
17+
.PHONY: verify-boilerplate
18+
## Verify that all files have the correct boilerplate.
19+
## @category [shared] Generate/ Verify
20+
verify-boilerplate: | $(NEEDS_BOILERSUITE)
21+
$(BOILERSUITE) .
22+
23+
shared_verify_targets += verify-boilerplate
24+
25+
.PHONY: generate-license
26+
## Generate LICENSE file in the repository
27+
## @category [shared] Generate/ Verify
28+
generate-license:
29+
cp -r $(base_dir)/. ./
30+
31+
shared_generate_targets += generate-base
File renamed without changes.

0 commit comments

Comments
 (0)