Skip to content

Commit 0cf240f

Browse files
committed
makefile-modules: remove Dockerfile and old Makefile
1 parent 299aa47 commit 0cf240f

Some content is hidden

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

49 files changed

+2742
-199
lines changed

.github/dependabot.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
2+
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/.github/dependabot.yaml instead.
3+
4+
# Update Go dependencies and GitHub Actions dependencies daily.
5+
version: 2
6+
updates:
7+
- package-ecosystem: gomod
8+
directory: /
9+
schedule:
10+
interval: daily
11+
groups:
12+
all:
13+
patterns: ["*"]
14+
- package-ecosystem: github-actions
15+
directory: /
16+
schedule:
17+
interval: daily
18+
groups:
19+
all:
20+
patterns: ["*"]
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
2+
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/.github/workflows/make-self-upgrade.yaml instead.
3+
4+
name: make-self-upgrade
5+
concurrency: make-self-upgrade
6+
on:
7+
workflow_dispatch: {}
8+
schedule:
9+
- cron: '0 0 * * *'
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
self_upgrade:
16+
runs-on: ubuntu-latest
17+
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
22+
env:
23+
SOURCE_BRANCH: "${{ github.ref_name }}"
24+
SELF_UPGRADE_BRANCH: "self-upgrade-${{ github.ref_name }}"
25+
26+
steps:
27+
- name: Fail if branch is not head of branch.
28+
if: ${{ !startsWith(github.ref, 'refs/heads/') && env.SOURCE_BRANCH != '' && env.SELF_UPGRADE_BRANCH != '' }}
29+
run: |
30+
echo "This workflow should not be run on a non-branch-head."
31+
exit 1
32+
33+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
34+
35+
- id: go-version
36+
run: |
37+
make print-go-version >> "$GITHUB_OUTPUT"
38+
39+
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
40+
with:
41+
go-version: ${{ steps.go-version.outputs.result }}
42+
43+
- run: |
44+
git checkout -B "$SELF_UPGRADE_BRANCH"
45+
46+
- run: |
47+
make -j upgrade-klone
48+
make -j generate
49+
50+
- id: is-up-to-date
51+
shell: bash
52+
run: |
53+
git_status=$(git status -s)
54+
is_up_to_date="true"
55+
if [ -n "$git_status" ]; then
56+
is_up_to_date="false"
57+
echo "The following changes will be committed:"
58+
echo "$git_status"
59+
fi
60+
echo "result=$is_up_to_date" >> "$GITHUB_OUTPUT"
61+
62+
- if: ${{ steps.is-up-to-date.outputs.result != 'true' }}
63+
run: |
64+
git config --global user.name "cert-manager-bot"
65+
git config --global user.email "[email protected]"
66+
git add -A && git commit -m "BOT: run 'make upgrade-klone' and 'make generate'" --signoff
67+
git push -f origin "$SELF_UPGRADE_BRANCH"
68+
69+
- if: ${{ steps.is-up-to-date.outputs.result != 'true' }}
70+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
71+
with:
72+
script: |
73+
const { repo, owner } = context.repo;
74+
const pulls = await github.rest.pulls.list({
75+
owner: owner,
76+
repo: repo,
77+
head: owner + ':' + process.env.SELF_UPGRADE_BRANCH,
78+
base: process.env.SOURCE_BRANCH,
79+
state: 'open',
80+
});
81+
82+
if (pulls.data.length < 1) {
83+
const result = await github.rest.pulls.create({
84+
title: '[CI] Merge ' + process.env.SELF_UPGRADE_BRANCH + ' into ' + process.env.SOURCE_BRANCH,
85+
owner: owner,
86+
repo: repo,
87+
head: process.env.SELF_UPGRADE_BRANCH,
88+
base: process.env.SOURCE_BRANCH,
89+
body: [
90+
'This PR is auto-generated to bump the Makefile modules.',
91+
].join('\n'),
92+
});
93+
await github.rest.issues.addLabels({
94+
owner,
95+
repo,
96+
issue_number: result.data.number,
97+
labels: ['skip-review']
98+
});
99+
}

.golangci.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
issues:
2+
exclude-rules:
3+
- linters:
4+
- staticcheck
5+
- errcheck
6+
- unconvert
7+
- unparam
8+
- dupword
9+
- gosimple
10+
- nilerr
11+
- nilnil
12+
13+
# TODO(mael): add the following linters one by one and fix the issues
14+
# they report. I didn't have time to do that when I migrated to
15+
# makefile-modules.
16+
- asasalint
17+
- asciicheck
18+
- bidichk
19+
- bodyclose
20+
- contextcheck
21+
- decorder
22+
- dogsled
23+
- dupword
24+
- durationcheck
25+
- errcheck
26+
- errchkjson
27+
- errname
28+
- execinquery
29+
- exhaustive
30+
- exportloopref
31+
- forbidigo
32+
- gci
33+
- ginkgolinter
34+
- gocheckcompilerdirectives
35+
- gochecksumtype
36+
- gocritic
37+
- gofmt
38+
- goheader
39+
- goprintffuncname
40+
- gosec
41+
- gosimple
42+
- gosmopolitan
43+
- govet
44+
- grouper
45+
- importas
46+
- ineffassign
47+
- interfacebloat
48+
- loggercheck
49+
- makezero
50+
- mirror
51+
- misspell
52+
- musttag
53+
- nakedret
54+
- nilerr
55+
- nilnil
56+
- noctx
57+
- nosprintfhostport
58+
- predeclared
59+
- promlinter
60+
- protogetter
61+
- reassign
62+
- sloglint
63+
- staticcheck
64+
- tagalign
65+
- tenv
66+
- testableexamples
67+
- typecheck
68+
- unconvert
69+
- unparam
70+
- unused
71+
- usestdlibvars
72+
- wastedassign
73+
text: ".*"
74+
linters:
75+
# Explicitly define all enabled linters
76+
disable-all: true
77+
enable: []
78+
linters-settings:
79+
gci:
80+
sections:
81+
- standard # Standard section: captures all standard packages.
82+
- default # Default section: contains all imports that could not be matched to another section type.
83+
- prefix(github.com/jetstack/jetstack-secure) # Custom section: groups all imports with the specified Prefix.
84+
- blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled.
85+
- dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled.

Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ clean:
113113
-include make/_shared/*/00_mod.mk
114114
-include make/_shared/*/01_mod.mk
115115
-include make/02_mod.mk
116-
-include make/_shared/*/02_mod.mk
116+
-include make/_shared/*/02_mod.mk

OWNERS_ALIASES

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
2+
# Edit https://github.com/cert-manager/makefile-modules/blob/main/modules/repository-base/base/OWNERS_ALIASES instead.
3+
4+
aliases:
5+
cm-maintainers:
6+
- munnerz
7+
- joshvanl
8+
- wallrj
9+
- jakexks
10+
- maelvls
11+
- irbekrm
12+
- sgtcodfish
13+
- inteon
14+
- thatsmrtalbot

builder.dockerfile

Lines changed: 0 additions & 30 deletions
This file was deleted.

cmd/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func printVersion(verbose bool) {
1313
if verbose {
1414
fmt.Println(" Commit: ", version.Commit)
1515
fmt.Println(" Built: ", version.BuildDate)
16-
fmt.Println(" Go: ", version.GoVersion)
16+
fmt.Println(" Go: ", runtime.Version())
1717
}
1818
}
1919

klone.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,53 @@
77

88
targets:
99
make/_shared:
10+
- folder_name: generate-verify
11+
repo_url: https://github.com/cert-manager/makefile-modules.git
12+
repo_ref: main
13+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
14+
repo_path: modules/generate-verify
15+
- folder_name: go
16+
repo_url: https://github.com/cert-manager/makefile-modules.git
17+
repo_ref: main
18+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
19+
repo_path: modules/go
20+
- folder_name: helm
21+
repo_url: https://github.com/cert-manager/makefile-modules.git
22+
repo_ref: main
23+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
24+
repo_path: modules/helm
25+
- folder_name: help
26+
repo_url: https://github.com/cert-manager/makefile-modules.git
27+
repo_ref: main
28+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
29+
repo_path: modules/help
30+
- folder_name: kind
31+
repo_url: https://github.com/cert-manager/makefile-modules.git
32+
repo_ref: main
33+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
34+
repo_path: modules/kind
1035
- folder_name: klone
1136
repo_url: https://github.com/cert-manager/makefile-modules.git
1237
repo_ref: main
1338
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
1439
repo_path: modules/klone
40+
- folder_name: oci-build
41+
repo_url: https://github.com/cert-manager/makefile-modules.git
42+
repo_ref: main
43+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
44+
repo_path: modules/oci-build
45+
- folder_name: oci-publish
46+
repo_url: https://github.com/cert-manager/makefile-modules.git
47+
repo_ref: main
48+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
49+
repo_path: modules/oci-publish
50+
- folder_name: repository-base
51+
repo_url: https://github.com/cert-manager/makefile-modules.git
52+
repo_ref: main
53+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
54+
repo_path: modules/repository-base
55+
- folder_name: tools
56+
repo_url: https://github.com/cert-manager/makefile-modules.git
57+
repo_ref: main
58+
repo_hash: 2547c81aaa2ff4aeefdda53988191b5cbe929985
59+
repo_path: modules/tools

make/00_mod.mk

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
repo_name := github.com/jetstack/preflight
2+
3+
kind_cluster_name := preflight
4+
kind_cluster_config := $(bin_dir)/scratch/kind_cluster.yaml
5+
6+
build_names := preflight
7+
8+
goos:=
9+
GOARCH:=$(shell go env GOARCH)
10+
11+
go_preflight_main_dir := .
12+
go_preflight_mod_dir := .
13+
go_preflight_ldflags := \
14+
-X $(repo_name)/pkg/version.PreflightVersion=$(VERSION) \
15+
-X $(repo_name)/pkg/version.Commit=$(GITCOMMIT) \
16+
-X $(repo_name)/pkg/version.BuildDate="$(shell date -uR)" \
17+
-X $(repo_name)/pkg/client.ClientID="k3TrDbfLhCgnpAbOiiT2kIE1AbovKzjo" \
18+
-X $(repo_name)/pkg/client.ClientSecret="f39w_3KT9Vp0VhzcPzvh-uVbudzqCFmHER3Huj0dvHgJwVrjxsoOQPIw_1SDiCfa" \
19+
-X $(repo_name)/pkg/client.AuthServerDomain="auth.jetstack.io"
20+
21+
oci_preflight_base_image_flavor := static
22+
oci_preflight_image_name := quay.io/jetstack/preflight
23+
oci_preflight_image_tag := $(VERSION)
24+
oci_preflight_image_name_development := jetstack.local/preflight
25+
26+
deploy_name := venafi-kubernetes-agent
27+
deploy_namespace := venafi
28+
29+
helm_chart_source_dir := deploy/charts/venafi-kubernetes-agent
30+
helm_chart_name := venafi-kubernetes-agent
31+
helm_chart_version := $(VERSION:v%=%)
32+
helm_labels_template_name := preflight.labels
33+
helm_docs_use_helm_tool := 1
34+
helm_generate_schema := 1
35+
helm_verify_values := 1
36+
37+
golangci_lint_config := .golangci.yaml
38+
39+
define helm_values_mutation_function
40+
$(YQ) \
41+
'( .image.repository = "$(oci_preflight_image_name)" ) | \
42+
( .image.tag = "$(oci_preflight_image_tag)" )' \
43+
$1 --inplace
44+
endef
45+
46+
go_header_file := /dev/null

0 commit comments

Comments
 (0)