Skip to content

Commit

Permalink
Merge pull request #44 from cert-manager/self-upgrade-main
Browse files Browse the repository at this point in the history
[CI] Self-upgrade merging self-upgrade-main into main
  • Loading branch information
cert-manager-prow[bot] authored Oct 7, 2024
2 parents 44d9065 + 2a82848 commit 76de24e
Show file tree
Hide file tree
Showing 17 changed files with 174 additions and 141 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/.github/dependabot.yaml instead.
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base-dependabot/.github/dependabot.yaml instead.

# Update Go dependencies and GitHub Actions dependencies daily.
version: 2
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/govulncheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
govulncheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- id: go-version
run: |
make print-go-version >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ steps.go-version.outputs.result }}

Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/make-self-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
self_upgrade:
runs-on: ubuntu-latest

if: github.repository_owner == 'cert-manager'

permissions:
contents: write
pull-requests: write
Expand All @@ -27,13 +32,13 @@ jobs:
echo "This workflow should not be run on a non-branch-head."
exit 1
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- id: go-version
run: |
make print-go-version >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ steps.go-version.outputs.result }}

Expand Down Expand Up @@ -64,7 +69,7 @@ jobs:
git push -f origin "$SELF_UPGRADE_BRANCH"
- if: ${{ steps.is-up-to-date.outputs.result != 'true' }}
uses: actions/github-script@v7
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const { repo, owner } = context.repo;
Expand All @@ -77,7 +82,7 @@ jobs:
});
if (pulls.data.length < 1) {
await github.rest.pulls.create({
const result = await github.rest.pulls.create({
title: '[CI] Merge ' + process.env.SELF_UPGRADE_BRANCH + ' into ' + process.env.SOURCE_BRANCH,
owner: owner,
repo: repo,
Expand All @@ -87,4 +92,10 @@ jobs:
'This PR is auto-generated to bump the Makefile modules.',
].join('\n'),
});
await github.rest.issues.addLabels({
owner,
repo,
issue_number: result.data.number,
labels: ['skip-review']
});
}
3 changes: 1 addition & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ linters:
- bidichk
- bodyclose
- contextcheck
- copyloopvar
- decorder
- dogsled
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- execinquery
- exhaustive
- exportloopref
- forbidigo
- gci
- ginkgolinter
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
##################################

# Some modules build their dependencies from variables, we want these to be
# evalutated at the last possible moment. For this we use second expansion to
# evaluated at the last possible moment. For this we use second expansion to
# re-evaluate the generate and verify targets a second time.
#
# See https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html
Expand Down
18 changes: 9 additions & 9 deletions klone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,45 @@ targets:
- folder_name: boilerplate
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/boilerplate
- folder_name: cert-manager
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/cert-manager
- folder_name: executable
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/executable
- folder_name: generate-verify
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/generate-verify
- folder_name: go
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/go
- folder_name: help
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/help
- folder_name: klone
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/klone
- folder_name: repository-base
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/repository-base
- folder_name: tools
repo_url: https://github.com/cert-manager/makefile-modules.git
repo_ref: main
repo_hash: 652f41ca2a789690977902191af89b423482853f
repo_hash: 43af254fa25ae30453a9ffe63cd37feab130917c
repo_path: modules/tools
18 changes: 9 additions & 9 deletions make/_shared/cert-manager/00_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
images_amd64 ?=
images_arm64 ?=

cert_manager_version := v1.15.0
cert_manager_version := v1.16.0

images_amd64 += quay.io/jetstack/cert-manager-controller:$(cert_manager_version)@sha256:9b5d5e9c0fd4944221d059921cc05f388c9a5fc0b02a60b47f0eccfcd8243331
images_amd64 += quay.io/jetstack/cert-manager-cainjector:$(cert_manager_version)@sha256:edb1c1e0083ee4cd8e2ccb296ee0f436d2e465ecf90159f9d03141fc19bd3c23
images_amd64 += quay.io/jetstack/cert-manager-webhook:$(cert_manager_version)@sha256:85df7b64a3d66de3cd7995ae0f2151b54fd18db424cb7cf84d3bd6d4a39d975f
images_amd64 += quay.io/jetstack/cert-manager-startupapicheck:$(cert_manager_version)@sha256:6365e940a5a913a3aeca0ea519102236d9bec5f0e8f0011fa3498c26d18348e5
images_amd64 += quay.io/jetstack/cert-manager-controller:$(cert_manager_version)@sha256:b45df0d537a7a8ef2d968bd2621547dd43d93230a5b12a89cf496a081db2edd3
images_amd64 += quay.io/jetstack/cert-manager-cainjector:$(cert_manager_version)@sha256:13d60b82759fec353c5c35280b902bf3f3c8680b471501792b62a7db2ef706e1
images_amd64 += quay.io/jetstack/cert-manager-webhook:$(cert_manager_version)@sha256:a98cc73669ed5e3220a064732649c541b4d2c272327271f63f9129a6f234ca63
images_amd64 += quay.io/jetstack/cert-manager-startupapicheck:$(cert_manager_version)@sha256:42b5c24cdf9fb68ccc4de4854e0336ac9e05bfacbd4c6ad9b85787db2e73c646

images_arm64 += quay.io/jetstack/cert-manager-controller:$(cert_manager_version)@sha256:716c154f0eecb381d5f63ba78ee1dd0cce4b57dbe15cbbc121f7e8b1071e6268
images_arm64 += quay.io/jetstack/cert-manager-cainjector:$(cert_manager_version)@sha256:59cbf06f489a7bb2c859296fa32ac7fcfd315c3f2e802be7805b598303b6cef5
images_arm64 += quay.io/jetstack/cert-manager-webhook:$(cert_manager_version)@sha256:039c83b5b081d519e9152c19aedd1c7c17daa09187d1ad21df6689da342bb5b7
images_arm64 += quay.io/jetstack/cert-manager-startupapicheck:$(cert_manager_version)@sha256:b2d5b00de8b1de6051c02a3f82cfa4ee617210ef1db5c295440e9a2d2069e547
images_arm64 += quay.io/jetstack/cert-manager-controller:$(cert_manager_version)@sha256:af089c67364f0ed282cb11b3994bea7bfa485d75a7b019c2c532ea118455f49b
images_arm64 += quay.io/jetstack/cert-manager-cainjector:$(cert_manager_version)@sha256:53a5206399898f2f754d45943211a38bdd82a23beb7f3ce33c30950117c95ebc
images_arm64 += quay.io/jetstack/cert-manager-webhook:$(cert_manager_version)@sha256:f8f633a1fe9089375e1c0debd5e7b1672ac740f2294453a37863a3d0b6d0a1cc
images_arm64 += quay.io/jetstack/cert-manager-startupapicheck:$(cert_manager_version)@sha256:9ab84f036989c71d531882acb3549799265e7f04b5fb719f4fd1bce6f9e2c9b0
2 changes: 1 addition & 1 deletion make/_shared/generate-verify/02_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
## Generate all generate targets.
## @category [shared] Generate/ Verify
generate: $$(shared_generate_targets)
@echo "The following targets cannot be run simultaniously with each other or other generate scripts:"
@echo "The following targets cannot be run simultaneously with each other or other generate scripts:"
$(foreach TARGET,$(shared_generate_targets_dirty), $(MAKE) $(TARGET))

verify_script := $(dir $(lastword $(MAKEFILE_LIST)))/util/verify.sh
Expand Down
2 changes: 1 addition & 1 deletion make/_shared/generate-verify/util/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ if ! diff \
then
echo
echo "Project '${projectdir}' is out of date."
echo "Please run '${*}'"
echo "Please run '${*}' or apply the above diffs"
exit 1
fi
3 changes: 1 addition & 2 deletions make/_shared/go/.golangci.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ linters:
- bidichk
- bodyclose
- contextcheck
- copyloopvar
- decorder
- dogsled
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- execinquery
- exhaustive
- exportloopref
- forbidigo
- gci
- ginkgolinter
Expand Down
2 changes: 2 additions & 0 deletions make/_shared/go/01_mod.mk
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ shared_verify_targets_dirty += verify-golangci-lint
## @category [shared] Generate/ Verify
fix-golangci-lint: | $(NEEDS_GOLANGCI-LINT) $(NEEDS_YQ) $(NEEDS_GCI) $(bin_dir)/scratch
$(GCI) write \
--skip-generated \
--skip-vendor \
-s "standard" \
-s "default" \
-s "prefix($(repo_name))" \
Expand Down
7 changes: 5 additions & 2 deletions make/_shared/go/base/.github/workflows/govulncheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@ on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
govulncheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- id: go-version
run: |
make print-go-version >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ steps.go-version.outputs.result }}

Expand Down
8 changes: 4 additions & 4 deletions make/_shared/help/help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ done <<< "$raw_expansions"

## 3. Sort and print the extracted line items

RULE_COLOR="$(tput setaf 6)"
CATEGORY_COLOR="$(tput setaf 3)"
CLEAR_STYLE="$(tput sgr0)"
PURPLE=$(tput setaf 125)
RULE_COLOR="$(TERM=xterm tput setaf 6)"
CATEGORY_COLOR="$(TERM=xterm tput setaf 3)"
CLEAR_STYLE="$(TERM=xterm tput sgr0)"
PURPLE=$(TERM=xterm tput setaf 125)

extracted_lines=$(echo -e "$extracted_lines" | LC_ALL=C sort -r)
current_category=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/.github/dependabot.yaml instead.
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base-dependabot/.github/dependabot.yaml instead.

# Update Go dependencies and GitHub Actions dependencies daily.
version: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:
schedule:
- cron: '0 0 * * *'

permissions:
contents: read

jobs:
self_upgrade:
runs-on: ubuntu-latest

if: github.repository_owner == 'cert-manager'

permissions:
contents: write
pull-requests: write
Expand All @@ -27,13 +32,13 @@ jobs:
echo "This workflow should not be run on a non-branch-head."
exit 1
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- id: go-version
run: |
make print-go-version >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ steps.go-version.outputs.result }}

Expand Down Expand Up @@ -64,7 +69,7 @@ jobs:
git push -f origin "$SELF_UPGRADE_BRANCH"
- if: ${{ steps.is-up-to-date.outputs.result != 'true' }}
uses: actions/github-script@v7
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const { repo, owner } = context.repo;
Expand All @@ -77,7 +82,7 @@ jobs:
});
if (pulls.data.length < 1) {
await github.rest.pulls.create({
const result = await github.rest.pulls.create({
title: '[CI] Merge ' + process.env.SELF_UPGRADE_BRANCH + ' into ' + process.env.SOURCE_BRANCH,
owner: owner,
repo: repo,
Expand All @@ -87,4 +92,10 @@ jobs:
'This PR is auto-generated to bump the Makefile modules.',
].join('\n'),
});
await github.rest.issues.addLabels({
owner,
repo,
issue_number: result.data.number,
labels: ['skip-review']
});
}
2 changes: 1 addition & 1 deletion make/_shared/repository-base/base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
##################################

# Some modules build their dependencies from variables, we want these to be
# evalutated at the last possible moment. For this we use second expansion to
# evaluated at the last possible moment. For this we use second expansion to
# re-evaluate the generate and verify targets a second time.
#
# See https://www.gnu.org/software/make/manual/html_node/Secondary-Expansion.html
Expand Down
Loading

0 comments on commit 76de24e

Please sign in to comment.