mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-22 15:41:47 +00:00
Merge pull request #1828 from fluxcd/fail-manifests-build-properly
Use a file to record successful manifests build
This commit is contained in:
commit
0133caaec4
4 changed files with 5 additions and 3 deletions
2
.github/workflows/bootstrap.yaml
vendored
2
.github/workflows/bootstrap.yaml
vendored
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
uses: fluxcd/pkg//actions/kustomize@main
|
uses: fluxcd/pkg//actions/kustomize@main
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
make cmd/flux/manifests
|
make cmd/flux/.manifests.done
|
||||||
go build -o /tmp/flux ./cmd/flux
|
go build -o /tmp/flux ./cmd/flux
|
||||||
- name: Set outputs
|
- name: Set outputs
|
||||||
id: vars
|
id: vars
|
||||||
|
|
|
||||||
2
.github/workflows/scan.yaml
vendored
2
.github/workflows/scan.yaml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
uses: fluxcd/pkg//actions/kustomize@main
|
uses: fluxcd/pkg//actions/kustomize@main
|
||||||
- name: Build manifests
|
- name: Build manifests
|
||||||
run: |
|
run: |
|
||||||
make cmd/flux/manifests
|
make cmd/flux/.manifests.done
|
||||||
- name: Run Snyk to check for vulnerabilities
|
- name: Run Snyk to check for vulnerabilities
|
||||||
uses: snyk/actions/golang@master
|
uses: snyk/actions/golang@master
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -19,6 +19,7 @@ dist/
|
||||||
bin/
|
bin/
|
||||||
output/
|
output/
|
||||||
cmd/flux/manifests/
|
cmd/flux/manifests/
|
||||||
|
cmd/flux/.manifests.done
|
||||||
|
|
||||||
# Docs
|
# Docs
|
||||||
site/
|
site/
|
||||||
|
|
|
||||||
3
Makefile
3
Makefile
|
|
@ -1,5 +1,5 @@
|
||||||
VERSION?=$(shell grep 'VERSION' cmd/flux/main.go | awk '{ print $$4 }' | head -n 1 | tr -d '"')
|
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
|
TEST_KUBECONFIG?=/tmp/flux-e2e-test-kubeconfig
|
||||||
ENVTEST_BIN_VERSION?=latest
|
ENVTEST_BIN_VERSION?=latest
|
||||||
KUBEBUILDER_ASSETS?="$(shell $(SETUP_ENVTEST) use -i $(ENVTEST_BIN_VERSION) -p path)"
|
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)
|
$(EMBEDDED_MANIFESTS_TARGET): $(call rwildcard,manifests/,*.yaml *.json)
|
||||||
./manifests/scripts/bundle.sh
|
./manifests/scripts/bundle.sh
|
||||||
|
touch $@
|
||||||
|
|
||||||
build: $(EMBEDDED_MANIFESTS_TARGET)
|
build: $(EMBEDDED_MANIFESTS_TARGET)
|
||||||
CGO_ENABLED=0 go build -ldflags="-s -w -X main.VERSION=$(VERSION)" -o ./bin/flux ./cmd/flux
|
CGO_ENABLED=0 go build -ldflags="-s -w -X main.VERSION=$(VERSION)" -o ./bin/flux ./cmd/flux
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue