File tree Expand file tree Collapse file tree 7 files changed +28
-11
lines changed
Expand file tree Collapse file tree 7 files changed +28
-11
lines changed Original file line number Diff line number Diff line change 3333 ${{ runner.os }}-go
3434 - name : Smoke test Fuzzers
3535 run : make fuzz-smoketest
36+ env :
37+ SKIP_COSIGN_VERIFICATION : true
Original file line number Diff line number Diff line change 4747 uses : fluxcd/pkg/actions/helm@main
4848 - name : Run E2E tests
4949 env :
50+ SKIP_COSIGN_VERIFICATION : true
5051 CREATE_CLUSTER : false
5152 run : make e2e
5253
7677 kind create cluster --name ${{ steps.prep.outputs.CLUSTER }} --kubeconfig=/tmp/${{ steps.prep.outputs.CLUSTER }}
7778 - name : Run e2e tests
7879 env :
80+ SKIP_COSIGN_VERIFICATION : true
7981 KIND_CLUSTER_NAME : ${{ steps.prep.outputs.CLUSTER }}
8082 KUBECONFIG : /tmp/${{ steps.prep.outputs.CLUSTER }}
8183 CREATE_CLUSTER : false
Original file line number Diff line number Diff line change 3434 ${{ runner.os }}-go-
3535 - name : Run tests
3636 env :
37+ SKIP_COSIGN_VERIFICATION : true
3738 TEST_AZURE_ACCOUNT_NAME : ${{ secrets.TEST_AZURE_ACCOUNT_NAME }}
3839 TEST_AZURE_ACCOUNT_KEY : ${{ secrets.TEST_AZURE_ACCOUNT_KEY }}
3940 run : make test
5152 go-version : 1.19.x
5253 - name : Run tests
5354 env :
55+ SKIP_COSIGN_VERIFICATION : true
56+
5457 TEST_AZURE_ACCOUNT_NAME : ${{ secrets.TEST_AZURE_ACCOUNT_NAME }}
5558 TEST_AZURE_ACCOUNT_KEY : ${{ secrets.TEST_AZURE_ACCOUNT_KEY }}
5659
8790 ${{ runner.os }}-go-
8891 - name : Run tests
8992 run : make test
93+ env :
94+ SKIP_COSIGN_VERIFICATION : true
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ ARG GO_VERSION=1.19
33ARG XX_VERSION=1.1.2
44
55ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2-only
6- ARG LIBGIT2_TAG=v0.2 .0
6+ ARG LIBGIT2_TAG=v0.3 .0
77
88FROM ${LIBGIT2_IMG}:${LIBGIT2_TAG} AS libgit2-libs
99
@@ -64,11 +64,11 @@ ENV CGO_ENABLED=1
6464
6565# Instead of using xx-go, (cross) compile with vanilla go leveraging musl tool chain.
6666RUN export PKG_CONFIG_PATH="/usr/local/$(xx-info triple)/lib/pkgconfig" && \
67- export CGO_LDFLAGS="$(pkg-config --static --libs --cflags libgit2) -static -fuse-ld=lld" && \
68- xx-go build \
69- -ldflags "-s -w" \
70- -tags 'netgo,osusergo,static_build' \
71- -o /source-controller -trimpath main.go;
67+ export CGO_LDFLAGS="$(pkg-config --static --libs --cflags libgit2) -static -fuse-ld=lld" && \
68+ xx-go build \
69+ -ldflags "-s -w" \
70+ -tags 'netgo,osusergo,static_build' \
71+ -o /source-controller -trimpath main.go;
7272
7373# Ensure that the binary was cross-compiled correctly to the target platform.
7474RUN xx-verify --static /source-controller
Original file line number Diff line number Diff line change @@ -4,14 +4,17 @@ TAG ?= latest
44
55# Base image used to build the Go binary
66LIBGIT2_IMG ?= ghcr.io/fluxcd/golang-with-libgit2-only
7- LIBGIT2_TAG ?= v0.2 .0
7+ LIBGIT2_TAG ?= v0.3 .0
88
99# Allows for defining additional Go test args, e.g. '-tags integration'.
1010GO_TEST_ARGS ?= -race
1111
1212# Allows for filtering tests based on the specified prefix
1313GO_TEST_PREFIX ?=
1414
15+ # Defines whether cosign verification should be skipped.
16+ SKIP_COSIGN_VERIFICATION ?= false
17+
1518# Allows for defining additional Docker buildx arguments,
1619# e.g. '--push'.
1720BUILD_ARGS ?=
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ IMG="${IMG:-}"
66TAG=" ${TAG:- } "
77IMG_TAG=" ${IMG} :${TAG} "
88DOWNLOAD_URL=" https://github.com/fluxcd/golang-with-libgit2/releases/download/${TAG} "
9+ SKIP_COSIGN_VERIFICATION=" ${SKIP_COSIGN_VERIFICATION:- false} "
910
1011TMP_DIR=$( mktemp -d)
1112
@@ -48,9 +49,13 @@ cosign_verify(){
4849assure_provenance () {
4950 [[ $# -eq 1 ]] || fatal ' assure_provenance needs exactly 1 arguments'
5051
51- cosign_verify " ${TMP_DIR} /checksums.txt.pem" \
52- " ${TMP_DIR} /checksums.txt.sig" \
53- " ${TMP_DIR} /checksums.txt"
52+ if " ${SKIP_COSIGN_VERIFICATION} " ; then
53+ echo ' Skipping cosign verification...'
54+ else
55+ cosign_verify " ${TMP_DIR} /checksums.txt.pem" \
56+ " ${TMP_DIR} /checksums.txt.sig" \
57+ " ${TMP_DIR} /checksums.txt"
58+ fi
5459
5560 pushd " ${TMP_DIR} " || exit
5661 if command -v sha256sum; then
Original file line number Diff line number Diff line change 1616
1717set -euxo pipefail
1818
19- LIBGIT2_TAG=" ${LIBGIT2_TAG:- v0.2 .0} "
19+ LIBGIT2_TAG=" ${LIBGIT2_TAG:- v0.3 .0} "
2020GOPATH=" ${GOPATH:-/ root/ go} "
2121GO_SRC=" ${GOPATH} /src"
2222PROJECT_PATH=" github.com/fluxcd/source-controller"
You can’t perform that action at this time.
0 commit comments