From 09a5c1213d614c501eb42e982a98a0458d1899d6 Mon Sep 17 00:00:00 2001 From: Paulo Gomes Date: Tue, 19 Apr 2022 15:21:11 +0100 Subject: [PATCH] Update dependencies - github.com/fluxcd/image-reflector-controller/api to version 0.17.2 - automatically pick up source controller and reflector versions on fuzzing. Signed-off-by: Paulo Gomes --- go.mod | 2 +- go.sum | 4 ++-- tests/fuzz/oss_fuzz_build.sh | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index 07f4111b..82504b85 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/cyphar/filepath-securejoin v0.2.3 github.com/fluxcd/image-automation-controller/api v0.21.3 // If you bump this, change REFLECTOR_VER in the Makefile to match - github.com/fluxcd/image-reflector-controller/api v0.17.1 + github.com/fluxcd/image-reflector-controller/api v0.17.2 github.com/fluxcd/pkg/apis/acl v0.0.3 github.com/fluxcd/pkg/apis/meta v0.12.2 github.com/fluxcd/pkg/gittestserver v0.5.2 diff --git a/go.sum b/go.sum index 71336ba4..212993e1 100644 --- a/go.sum +++ b/go.sum @@ -359,8 +359,8 @@ github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fluxcd/image-reflector-controller/api v0.17.1 h1:0eWE26PmCo3ZQBnDkNA6wiHhAEsTtUG4oz59enqIzsQ= -github.com/fluxcd/image-reflector-controller/api v0.17.1/go.mod h1:Lg8A+MUcke0Orp6C6UQkf9I3pc8M/B3XS3TOI+YxVBY= +github.com/fluxcd/image-reflector-controller/api v0.17.2 h1:QQl9YBhz+7lwKejG92StCa9Vxswph6+7O7TmkVNNoSw= +github.com/fluxcd/image-reflector-controller/api v0.17.2/go.mod h1:PwmjD9DeA6yBdGnMVzUB+5n2hVqsKTGroFlN/oR4RkI= github.com/fluxcd/pkg/apis/acl v0.0.3 h1:Lw0ZHdpnO4G7Zy9KjrzwwBmDZQuy4qEjaU/RvA6k1lc= github.com/fluxcd/pkg/apis/acl v0.0.3/go.mod h1:XPts6lRJ9C9fIF9xVWofmQwftvhY25n1ps7W9xw0XLU= github.com/fluxcd/pkg/apis/meta v0.12.2 h1:AiKAZxLyPtV150y63WC+mL1Qm4x5qWQmW6r4mLy1i8c= diff --git a/tests/fuzz/oss_fuzz_build.sh b/tests/fuzz/oss_fuzz_build.sh index c163b550..6c6dfde0 100755 --- a/tests/fuzz/oss_fuzz_build.sh +++ b/tests/fuzz/oss_fuzz_build.sh @@ -58,14 +58,6 @@ go get -d github.com/AdaLogics/go-fuzz-headers pushd "tests/fuzz" -# Version of the source-controller from which to get the GitRepository CRD. -# Change this if you bump the source-controller/api version in go.mod. -SOURCE_VER=v0.22.2 - -# Version of the image-reflector-controller from which to get the ImagePolicy CRD. -# Change this if you bump the image-reflector-controller/api version in go.mod. -REFLECTOR_VER=v0.17.1 - # Setup files to be embedded into controllers_fuzzer.go's testFiles variable. mkdir -p testdata/crds cp ../../config/crd/bases/*.yaml testdata/crds/ @@ -78,6 +70,14 @@ sed -i 's;module .*;module github.com/fluxcd/image-automation-controller/tests/f sed -i 's;api => ./api;api => ../../api;g' go.mod echo "replace github.com/fluxcd/image-automation-controller => ../../" >> go.mod +# Version of the source-controller from which to get the GitRepository CRD. +# Pulls source-controller/api's version set in go.mod. +SOURCE_VER=$(go list -m github.com/fluxcd/source-controller/api | awk '{print $2}') + +# Version of the image-reflector-controller from which to get the ImagePolicy CRD. +# Pulls image-reflector-controller/api's version set in go.mod. +REFLECTOR_VER=$(go list -m github.com/fluxcd/image-reflector-controller/api | awk '{print $2}') + go mod download if [ -d "../../controllers/testdata/crds" ]; then @@ -90,7 +90,7 @@ else fi go get -d github.com/AdaLogics/go-fuzz-headers -go get github.com/fluxcd/image-automation-controller +go get -d github.com/fluxcd/image-automation-controller # Using compile_go_fuzzer to compile fails when statically linking libgit2 dependencies # via CFLAGS/CXXFLAGS.