-
Notifications
You must be signed in to change notification settings - Fork 25
🔥 Migrating to Makefile Modules ALL AT ONCE 🔥 #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
5750c18
replace ldflag version.Platform with runtime.GOOS and runtime.GOARCH
maelvls 2aeaa9b
makefile-modules: migrate the Makefile to makefile-modules
maelvls 5664ceb
make: add the "make generate-crds-venconn" target
maelvls 54c0ebe
dependabot.yaml: link to the upstream file was broken
maelvls 89630f3
make upgrade-klone
maelvls d2e2b6a
make: date -uR produced a comma that was misinterpreted in go_$*_ldflags
maelvls 3c98fb5
make: fix go_preflight_ldflags and helm_values_mutation_function
maelvls 4115285
fix bug in Makefile
inteon 9e153ac
helm: config.period was ineffective; make it work
maelvls 0849c60
fix errors from "make verify"
maelvls b6963ca
helm: remove useless "+docs:property" markers
maelvls 29515dc
helm: remove useless "+docs:property" markers, and reformat values.yaml
maelvls 83a24f1
add GH actions
inteon 99896db
make: jetstack.io_venaficonnections.yaml: recreate file instead of ap…
maelvls f20e5fb
forgot to run "make generate"
maelvls 97e44a5
regenerate CRD
inteon 458cab4
helm: push to oci://quay.io/jetstack/charts for now
maelvls File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'Setup repo access' | ||
description: 'Setups authenticate to GitHub repos' | ||
inputs: | ||
DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB: | ||
required: true | ||
description: "DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB secret" | ||
outputs: {} | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Configure jetstack/venafi-connection-lib repo pull access | ||
shell: bash | ||
run: | | ||
mkdir ~/.ssh | ||
chmod 700 ~/.ssh | ||
|
||
echo "${{ inputs.DEPLOY_KEY_READ_VENAFI_CONNECTION_LIB }}" > ~/.ssh/venafi_connection_lib_id | ||
chmod 600 ~/.ssh/venafi_connection_lib_id | ||
|
||
cat <<EOT >> ~/.ssh/config | ||
Host venafi-connection-lib.github.com | ||
HostName github.com | ||
IdentityFile ~/.ssh/venafi_connection_lib_id | ||
IdentitiesOnly yes | ||
EOT | ||
|
||
cat <<EOT >> ~/.gitconfig | ||
[url "git@venafi-connection-lib.github.com:jetstack/venafi-connection-lib"] | ||
insteadOf = https://github.com/jetstack/venafi-connection-lib | ||
EOT | ||
|
||
echo "GOPRIVATE=github.com/jetstack/venafi-connection-lib" >> $GITHUB_ENV |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. | ||
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/go/base/.github/workflows/govulncheck.yaml instead. | ||
|
||
# Run govulncheck at midnight every night on the main branch, | ||
# to alert us to recent vulnerabilities which affect the Go code in this | ||
# project. | ||
name: govulncheck | ||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
govulncheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- id: go-version | ||
run: | | ||
make print-go-version >> "$GITHUB_OUTPUT" | ||
|
||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: ${{ steps.go-version.outputs.result }} | ||
|
||
- run: make verify-govulncheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. | ||
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/.github/workflows/make-self-upgrade.yaml instead. | ||
|
||
name: make-self-upgrade | ||
concurrency: make-self-upgrade | ||
on: | ||
workflow_dispatch: {} | ||
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 | ||
|
||
env: | ||
SOURCE_BRANCH: "${{ github.ref_name }}" | ||
SELF_UPGRADE_BRANCH: "self-upgrade-${{ github.ref_name }}" | ||
|
||
steps: | ||
- name: Fail if branch is not head of branch. | ||
if: ${{ !startsWith(github.ref, 'refs/heads/') && env.SOURCE_BRANCH != '' && env.SELF_UPGRADE_BRANCH != '' }} | ||
run: | | ||
echo "This workflow should not be run on a non-branch-head." | ||
exit 1 | ||
|
||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
||
- id: go-version | ||
run: | | ||
make print-go-version >> "$GITHUB_OUTPUT" | ||
|
||
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | ||
with: | ||
go-version: ${{ steps.go-version.outputs.result }} | ||
|
||
- run: | | ||
git checkout -B "$SELF_UPGRADE_BRANCH" | ||
|
||
- run: | | ||
make -j upgrade-klone | ||
make -j generate | ||
|
||
- id: is-up-to-date | ||
shell: bash | ||
run: | | ||
git_status=$(git status -s) | ||
is_up_to_date="true" | ||
if [ -n "$git_status" ]; then | ||
is_up_to_date="false" | ||
echo "The following changes will be committed:" | ||
echo "$git_status" | ||
fi | ||
echo "result=$is_up_to_date" >> "$GITHUB_OUTPUT" | ||
|
||
- if: ${{ steps.is-up-to-date.outputs.result != 'true' }} | ||
run: | | ||
git config --global user.name "cert-manager-bot" | ||
git config --global user.email "cert-manager-bot@users.noreply.github.com" | ||
git add -A && git commit -m "BOT: run 'make upgrade-klone' and 'make generate'" --signoff | ||
git push -f origin "$SELF_UPGRADE_BRANCH" | ||
|
||
- if: ${{ steps.is-up-to-date.outputs.result != 'true' }} | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
with: | ||
script: | | ||
const { repo, owner } = context.repo; | ||
const pulls = await github.rest.pulls.list({ | ||
owner: owner, | ||
repo: repo, | ||
head: owner + ':' + process.env.SELF_UPGRADE_BRANCH, | ||
base: process.env.SOURCE_BRANCH, | ||
state: 'open', | ||
}); | ||
|
||
if (pulls.data.length < 1) { | ||
const result = await github.rest.pulls.create({ | ||
title: '[CI] Merge ' + process.env.SELF_UPGRADE_BRANCH + ' into ' + process.env.SOURCE_BRANCH, | ||
owner: owner, | ||
repo: repo, | ||
head: process.env.SELF_UPGRADE_BRANCH, | ||
base: process.env.SOURCE_BRANCH, | ||
body: [ | ||
'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'] | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken link, I've fixed this upstream: cert-manager/makefile-modules#196