From c5d23a0130f6970d0b275dad0c28adc8aab7dd40 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Arango Gutierrez Date: Fri, 26 Jan 2024 15:16:50 +0100 Subject: [PATCH] Add point releases Signed-off-by: Carlos Eduardo Arango Gutierrez --- .github/workflows/images.yaml | 10 +++++++++- images/devel/Dockerfile | 18 +++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml index e613a1e6..901856c2 100644 --- a/.github/workflows/images.yaml +++ b/.github/workflows/images.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: ["1.21","1.20","1.19"] + go-version: ["1.21"," 1.21.5","1.20",""1.20".4","1.20.5"] steps: - uses: actions/checkout@v4 - name: Calculate build vars @@ -60,8 +60,16 @@ jobs: - name: Build image env: GOLANG_VERSION: ${{ matrix.go-version }} + GOLANGCI_LINT_VERSION: "v1.42.1" + MOQ_VERSION: "v0.3.3" + CONTROLLER_GEN_VERSION: "v0.9.2" + CLIENT_GEN_VERSION: "v0.26.1" run: | docker build --build-arg GOLANG_VERSION=${GOLANG_VERSION} \ + --build-arg GOLANGCI_LINT_VERSION=${GOLANGCI_LINT_VERSION} \ + --build-arg MOQ_VERSION=${MOQ_VERSION} \ + --build-arg CONTROLLER_GEN_VERSION=${CONTROLLER_GEN_VERSION} \ + --build-arg CLIENT_GEN_VERSION=${CLIENT_GEN_VERSION} \ -f ./images/devel/Dockerfile \ --tag ghcr.io/${LOWERCASE_REPO_OWNER}/k8s-test-infra:devel-go${GOLANG_VERSION} \ . diff --git a/images/devel/Dockerfile b/images/devel/Dockerfile index d1e74c6e..53acfec8 100644 --- a/images/devel/Dockerfile +++ b/images/devel/Dockerfile @@ -12,10 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG GOLANG_VERSION=x.x +ARG GOLANG_VERSION=x.x.x +ARG GOLANGCI_LINT_VERSION=v1.52.0 +ARG MOQ_VERSION=latest +ARG CONTROLLER_GEN_VERSION=v0.9.2 +ARG CLIENT_GEN_VERSION=v0.26.1 FROM golang:${GOLANG_VERSION} -RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.0 \ - && go install github.com/matryer/moq@latest \ - && go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.2 \ - && go install k8s.io/code-generator/cmd/client-gen@v0.26.1 +RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION} \ + && go install github.com/matryer/moq@${MOQ_VERSION} \ + && go install sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION} \ + && go install k8s.io/code-generator/cmd/client-gen@${CLIENT_GEN_VERSION} + +# We need to set the /work directory as a safe directory. +# This allows git commands to run in the container. +RUN git config --file=/.gitconfig --add safe.directory /work \ No newline at end of file