Skip to content

Commit 129224e

Browse files
weisddBaarsgaard
andauthored
chore(Makefile): pin dependencies (#2023)
* chore(Makefile): pin golangci-lint * chore(Makefile): pin kustomize * chore(Makefile): pin operator-sdk * chore(Makefile): pin kind * chore(Makefile): pin controller-gen * chore(Makefile): pin ko * chore(Makefile): pin yq * chore(Makefile): pin crdoc * chore(Makefile): pin chainsaw * chore(Makefile): pin helm-docs * chore(Makefile): pin opm * chore(Makefile): pin envtest * chore(Makefile): add set -e * chore(Makefile): deprecate LOCALBIN * chore(Makefile): reorder tools * chore(Makefile): add phony for api-docs * fix(workflows): move kustomize overlay validation to Makefile * chore(Makefile): pin envtest to 0.20 * chore(Makefile): pin kustomize in release workflow * chore(workflows): remove unused chainsaw and ko binaries from e2e * chore(Makefile): pin helm for lint step and make it part of test target * chore(Makefile): switch to bash for helm installation * chore(Makefile): rename some targets to make them appear in help target, adjust formatting * chore(Makefile): fix crdoc command * chore(Makefile): indicate when a tool is being installed * chore(Makefile): download setup-envtest as binary * chore(Makefile): download controller-gen as binary * chore(Makefile): bump kustomize to v5.6.0, so native Darwin version is used * chore(Makefile): download chainsaw as binary * fix(Makefile): make $(BIN) order-only-prerequisite and remove ifeq * fix(Makefile): make all default target * fix(Makefile): start-kind calls Co-authored-by: Steffen Baarsgaard <steff.bpoulsen@gmail.com> --------- Co-authored-by: Steffen Baarsgaard <steff.bpoulsen@gmail.com>
1 parent be66508 commit 129224e

File tree

5 files changed

+218
-257
lines changed

5 files changed

+218
-257
lines changed

.github/workflows/e2e.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@ jobs:
6363
go-version-file: "go.mod"
6464
cache: true
6565

66-
- name: Install ko
67-
uses: ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d # v0.9
68-
with:
69-
version: v0.16.0
70-
71-
- name: Install chainsaw
72-
uses: kyverno/action-install-chainsaw@f2b47b97dc889c12702113753d713f01ec268de5 # v0.2.12
73-
7466
- name: Create KinD cluster ${{ matrix.version }}
7567
id: kind
7668
env:

.github/workflows/pr-validation.yaml

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -81,48 +81,18 @@ jobs:
8181
with:
8282
go-version-file: "go.mod"
8383

84-
- name: Run helm-template
85-
run: |
86-
helm template deploy/helm/grafana-operator/
87-
88-
- name: Run helm-lint
89-
run: |
90-
helm lint deploy/helm/grafana-operator/
9184
- name: Run helm-docs
9285
run: |
93-
make helm/docs
86+
make helm-docs
9487
9588
- name: Check if working tree is dirty
9689
run: |
9790
if [[ $(git status --porcelain) ]]; then
9891
git diff
99-
echo '::error::run make helm/docs and commit changes'
92+
echo '::error::run make helm-docs and commit changes'
10093
exit 1
10194
fi
10295
103-
kustomize:
104-
runs-on: ubuntu-latest
105-
steps:
106-
- name: Clone repo
107-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
108-
with:
109-
persist-credentials: false
110-
111-
- name: Setup go
112-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
113-
with:
114-
go-version-file: "go.mod"
115-
116-
- name: Install kustomize
117-
run: |
118-
make kustomize
119-
120-
- name: Check if overlays can be successfully built
121-
run: |
122-
for d in deploy/kustomize/overlays/*/ ; do
123-
kustomize build "$d" --load-restrictor LoadRestrictionsNone > /dev/null
124-
done
125-
12696
trivy:
12797
runs-on: ubuntu-latest
12898
steps:

.github/workflows/release.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
app-id: ${{ fromJSON(steps.secrets.outputs.secrets || '{}').APP_ID }}
7474
private-key: ${{ fromJSON(steps.secrets.outputs.secrets || '{}').APP_PRIVATE_KEY }}
7575
repositories: helm-charts
76-
owner: '${{ github.event.repository.owner.login }}'
76+
owner: "${{ github.event.repository.owner.login }}"
7777

7878
- name: Set the correct token (Github App or PAT) # zizmor: ignore[template-injection] app token considered safe
7979
run: |
@@ -132,11 +132,7 @@ jobs:
132132
echo "GHCR_REPO=$GHCR_REPO" >> $GITHUB_ENV
133133
- name: update-kustomize-image
134134
run: |
135-
# Install kustomize
136-
make kustomize
137-
# Update image to match the new image and tag
138-
cd deploy/kustomize/base
139-
kustomize edit set image ghcr.io/${{ github.repository }}=${{ env.GHCR_REPO }}:${RELEASE_NAME}
135+
make kustomize-set-image
140136
- name: Login to GitHub Container Registry
141137
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
142138
with:
@@ -151,14 +147,11 @@ jobs:
151147
--path="./deploy/kustomize" \
152148
--source="${PUBLISH_SOURCE}" \
153149
--revision="${RELEASE_NAME}/${GITHUB_SHA}"
154-
- name: update-kustomize-assert
150+
- name: upload kustomize assets
155151
env:
156152
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
157153
run: |
158-
for d in deploy/kustomize/overlays/*/ ; do
159-
kustomize build "$d" --load-restrictor LoadRestrictionsNone > kustomize-$(basename "$d").yaml
160-
done
161-
kustomize build config/crd > crds.yaml
154+
make kustomize-github-assets
162155
gh release upload "${RELEASE_NAME}" kustomize-*.yaml crds.yaml
163156
164157
image:

0 commit comments

Comments
 (0)