From 387f11d44a225f340f703623395c6648258a34b8 Mon Sep 17 00:00:00 2001 From: Marc Sluiter Date: Thu, 25 Jan 2024 15:34:49 +0100 Subject: [PATCH 1/2] Some fixes - do not vendor in dockerized make targets - add some ignored files --- .gitignore | 6 ++++++ Makefile | 5 ++++- hack/verify-diff.sh | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b456ebb..b023b3a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,9 @@ bin *.swo *~ /testbin/ + +# we never want vendor +/vendor/ + +# personal env files +.envrc diff --git a/Makefile b/Makefile index b2d8432..c7beb94 100755 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +# SHELL defines bash so all the inline scripts here will work as expected. +SHELL := /bin/bash + # GO_VERSION refers to the version of Golang to be downloaded when running dockerized version GO_VERSION = 1.20 GOIMPORTS_VERSION = v0.11.0 @@ -12,7 +15,7 @@ SORT_IMPORTS_VERSION = v0.2.1 # --entrypoint /bin bash ... -c = run bash -c on start; that means the actual command(s) need be wrapped in double quotes, see e.g. check target which will run: bash -c "make test" export DOCKER_GO=docker run --rm -v $$(pwd):/home/go/src/github.com/medik8s/common \ -u $$(id -u) -w /home/go/src/github.com/medik8s/common \ - -e "GOPATH=/go" -e "GOFLAGS=-mod=vendor" -e "XDG_CACHE_HOME=/tmp/.cache" \ + -e "GOPATH=/go" -e "XDG_CACHE_HOME=/tmp/.cache" \ --entrypoint /bin/bash golang:$(GO_VERSION) -c # go-install-tool will 'go install' any package $2 and install it to $1. diff --git a/hack/verify-diff.sh b/hack/verify-diff.sh index ab9de9d..0f15f65 100755 --- a/hack/verify-diff.sh +++ b/hack/verify-diff.sh @@ -1,3 +1,4 @@ +#/bin/bash FILE_DIFF=$(git ls-files -o --exclude-standard) if [ "$FILE_DIFF" != "" ]; then From 8ae469ac1a10f2b63150a5c57fb088093c8eeec8 Mon Sep 17 00:00:00 2001 From: Marc Sluiter Date: Fri, 26 Jan 2024 09:47:58 +0100 Subject: [PATCH 2/2] Use more generic build root image --- .ci-operator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci-operator.yaml b/.ci-operator.yaml index 83e291a..5ccdf43 100644 --- a/.ci-operator.yaml +++ b/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: namespace: openshift name: release - tag: rhel-8-release-golang-1.20-openshift-4.14 + tag: golang-1.20