From c2353a7fe65e9ced15498f819fb15c8004f08f63 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Tue, 23 Aug 2022 08:40:01 +0100 Subject: [PATCH] fuzz: Ensure Go 1.18 for fuzz image - Upgrade fuzz container to Go 1.18. - Upgrade worker to Go 1.18. - The mod replace in tests/fuzz was pointing to the wrong controller. Signed-off-by: Paulo Gomes --- .github/workflows/cifuzz.yaml | 4 ++++ tests/fuzz/Dockerfile.builder | 5 +++++ tests/fuzz/go.mod | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cifuzz.yaml b/.github/workflows/cifuzz.yaml index d13d0a24..1e0ace73 100644 --- a/.github/workflows/cifuzz.yaml +++ b/.github/workflows/cifuzz.yaml @@ -17,6 +17,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.18.x - name: Restore Go cache uses: actions/cache@v3 with: diff --git a/tests/fuzz/Dockerfile.builder b/tests/fuzz/Dockerfile.builder index 2c010408..ad90ee08 100644 --- a/tests/fuzz/Dockerfile.builder +++ b/tests/fuzz/Dockerfile.builder @@ -1,5 +1,10 @@ +FROM golang:1.18 AS go + FROM gcr.io/oss-fuzz-base/base-builder-go +# ensures golang 1.18 to enable go native fuzzing. +COPY --from=go /usr/local/go /usr/local/ + COPY ./ $GOPATH/src/github.com/fluxcd/source-controller/ COPY ./tests/fuzz/oss_fuzz_build.sh $SRC/build.sh diff --git a/tests/fuzz/go.mod b/tests/fuzz/go.mod index 638f6fdd..c018fb37 100644 --- a/tests/fuzz/go.mod +++ b/tests/fuzz/go.mod @@ -2,6 +2,6 @@ module github.com/fluxcd/source-controller/tests/fuzz go 1.18 -replace github.com/fluxcd/kustomize-controller/api => ../../api +replace github.com/fluxcd/source-controller/api => ../../api -replace github.com/fluxcd/kustomize-controller => ../../ +replace github.com/fluxcd/source-controller => ../../