From 3b70b7ea1ff74e001c5b31983da8a8df996c628b Mon Sep 17 00:00:00 2001 From: Marc Paquette Date: Tue, 6 Sep 2022 16:10:34 +0000 Subject: [PATCH] Working around --buildvcs issues introduced in Go 1.18+ --- ci/scripts/garden | 3 +++ ci/scripts/gdn-linux | 3 +++ ci/scripts/gdn-linux-standalone | 3 +++ ci/scripts/guardian | 3 +++ ci/scripts/guardian-windows.ps1 | 3 +++ scripts/remote-fly | 2 +- 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ci/scripts/garden b/ci/scripts/garden index 1a2ca02b7..a998f0397 100755 --- a/ci/scripts/garden +++ b/ci/scripts/garden @@ -1,6 +1,9 @@ #!/usr/bin/env bash set -ex +# This is work around --buildvcs issues in Go 1.18+ +git config --global --add safe.directory '*' + cd "$( dirname "$0" )/../.." cd src/garden diff --git a/ci/scripts/gdn-linux b/ci/scripts/gdn-linux index a861a85ac..705af6755 100755 --- a/ci/scripts/gdn-linux +++ b/ci/scripts/gdn-linux @@ -6,6 +6,9 @@ grreleasedevelopdir="$basedir"/gr-release-develop go install github.com/onsi/ginkgo/ginkgo@latest +# This is work around --buildvcs issues in Go 1.18+ +git config --global --add safe.directory '*' + # shellcheck source=../helpers/device-control source "$( dirname "$0" )/../helpers/device-control" diff --git a/ci/scripts/gdn-linux-standalone b/ci/scripts/gdn-linux-standalone index 7c243cf15..6e075299c 100755 --- a/ci/scripts/gdn-linux-standalone +++ b/ci/scripts/gdn-linux-standalone @@ -20,6 +20,9 @@ export PATH=$PATH:$GOPATH/bin basedir=$PWD +# This is work around --buildvcs issues in Go 1.18+ +git config --global --add safe.directory '*' + # If you want to fly execute this, you will have to pass DEV_MODE=true if [ -z "$DEV_MODE" ]; then gdn_version=$(cd gr-release-develop/src/guardian && git rev-parse HEAD) diff --git a/ci/scripts/guardian b/ci/scripts/guardian index af7a72872..d5fb572b2 100755 --- a/ci/scripts/guardian +++ b/ci/scripts/guardian @@ -17,6 +17,9 @@ export PATH=$GOROOT/bin:$PATH export GOPATH="${grr_base}/src/gopath" export PATH=$HOME/go/bin:$GOPATH/bin:$PATH +# This is work around --buildvcs issues in Go 1.18+ +git config --global --add safe.directory '*' + if [ -n "${PATCH_RUNC:-}" ]; then ( # Using patch instead of `git apply` to keep this path working with `fly diff --git a/ci/scripts/guardian-windows.ps1 b/ci/scripts/guardian-windows.ps1 index 94bb7e1e3..43cb33070 100755 --- a/ci/scripts/guardian-windows.ps1 +++ b/ci/scripts/guardian-windows.ps1 @@ -8,6 +8,9 @@ $env:GOPATH = ${env:PWD} + "\src\gopath" $env:PATH = $env:GOPATH + "/bin;C:/go/bin;" + $env:PATH $env:GO111MODULE = "off" +# This is work around --buildvcs issues in Go 1.18+ +git config --global --add safe.directory '*' + Write-Host "Installing Ginkgo" go.exe get ./src/gopath/src/github.com/onsi/ginkgo/ginkgo if ($LastExitCode -ne 0) { diff --git a/scripts/remote-fly b/scripts/remote-fly index 792289c6a..24a12073b 100755 --- a/scripts/remote-fly +++ b/scripts/remote-fly @@ -17,4 +17,4 @@ if [[ "$build_yml" == *"windows"* ]]; then image_args=() fi -fly --target "$GARDEN_REMOTE_ATC_URL" e $tag -p ${image_args[@]} -i gr-release-develop=$HOME/workspace/garden-runc-release -c "$build_yml" "$@" +fly --target "$GARDEN_REMOTE_ATC_URL" e --include-ignored $tag -p ${image_args[@]} -i gr-release-develop=$HOME/workspace/garden-runc-release -c "$build_yml" "$@"