diff --git a/.github/workflows/bootstrap.yaml b/.github/workflows/bootstrap.yaml index afe26b7b688863ce29c4097a8b3eff4094e06e9b..2d4a4f587268eb4390a0caf95767e0cd80c54fbf 100644 --- a/.github/workflows/bootstrap.yaml +++ b/.github/workflows/bootstrap.yaml @@ -33,7 +33,7 @@ jobs: uses: fluxcd/pkg//actions/kustomize@main - name: Build run: | - make cmd/flux/manifests + make cmd/flux/.manifests.done go build -o /tmp/flux ./cmd/flux - name: Set outputs id: vars diff --git a/.github/workflows/scan.yaml b/.github/workflows/scan.yaml index 029a59a64d1599e570f7d798c98123d76254c706..9e1cc45b4e80485ec5c03b94cafdf5180fbf1b25 100644 --- a/.github/workflows/scan.yaml +++ b/.github/workflows/scan.yaml @@ -31,7 +31,7 @@ jobs: uses: fluxcd/pkg//actions/kustomize@main - name: Build manifests run: | - make cmd/flux/manifests + make cmd/flux/.manifests.done - name: Run Snyk to check for vulnerabilities uses: snyk/actions/golang@master continue-on-error: true diff --git a/.gitignore b/.gitignore index 0a385d366e10ea5fa6a5bcda8e7350b6046eb785..c431bf85b3da3e3cac6e29e479c25cfbd3b6d3e6 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ dist/ bin/ output/ cmd/flux/manifests/ +cmd/flux/.manifests.done # Docs site/ diff --git a/Makefile b/Makefile index 6426e7a261b83602a3905651f8c8a988ed4dbec3..563a672bb876b4158d42fb4d4aa8d2e356441752 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VERSION?=$(shell grep 'VERSION' cmd/flux/main.go | awk '{ print $$4 }' | head -n 1 | tr -d '"') -EMBEDDED_MANIFESTS_TARGET=cmd/flux/manifests +EMBEDDED_MANIFESTS_TARGET=cmd/flux/.manifests.done TEST_KUBECONFIG?=/tmp/flux-e2e-test-kubeconfig ENVTEST_BIN_VERSION?=latest KUBEBUILDER_ASSETS?="$(shell $(SETUP_ENVTEST) use -i $(ENVTEST_BIN_VERSION) -p path)" @@ -46,6 +46,7 @@ test-with-kind: setup-envtest $(EMBEDDED_MANIFESTS_TARGET): $(call rwildcard,manifests/,*.yaml *.json) ./manifests/scripts/bundle.sh + touch $@ build: $(EMBEDDED_MANIFESTS_TARGET) CGO_ENABLED=0 go build -ldflags="-s -w -X main.VERSION=$(VERSION)" -o ./bin/flux ./cmd/flux