Skip to content
This repository has been archived by the owner on Feb 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #183 from thaJeztah/update_golang
Browse files Browse the repository at this point in the history
Update to Go 1.16
  • Loading branch information
thaJeztah authored Jan 28, 2022
2 parents 68fc5dc + 6c50f0c commit fd960f1
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 15 deletions.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ aliases:
- image: dockereng/kube-compose-ci-golang
auth: *docker-login
public-golang: &public-golang
- image: circleci/golang:1.13.0
- image: circleci/golang:1.16
user: root

e2e-kind-steps: &e2e-kind-steps
- attach_workspace:
at: /root
- setup_remote_docker:
version: 18.09.3
version: 20.10.11
- run:
name: "Prepare Kind and run e2e tests"
command: |
Expand All @@ -49,7 +49,7 @@ aliases:
- attach_workspace:
at: /root
- setup_remote_docker:
version: 18.09.3
version: 20.10.11
- run:
name: "Prepare Kind and run e2e benchmark"
command: |
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 18.09.3
version: 20.10.11
- run:
name: Login to docker hub
command: echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
- attach_workspace:
at: /root
- setup_remote_docker:
version: 18.09.3
version: 20.10.11
- run: make -f docker.Makefile validate
validate-vendor:
docker: *public-golang
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- attach_workspace:
at: /root
- setup_remote_docker:
version: 18.09.3
version: 20.10.11
- run:
name: Build images
command: |
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
- attach_workspace:
at: /root
- setup_remote_docker:
version: 18.09.3
version: 20.10.11
- run:
name: Run unit tests
command: make -f docker.Makefile test-unit
Expand All @@ -261,7 +261,7 @@ jobs:
- attach_workspace:
at: /root
- setup_remote_docker:
version: 18.09.3
version: 20.10.11
- deploy:
name: push-to-hub
command: |
Expand Down Expand Up @@ -292,7 +292,7 @@ jobs:
- attach_workspace:
at: /root
- setup_remote_docker:
version: 18.09.3
version: 20.10.11
- deploy:
name: push-to-hub
command: |
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ WORKDIR /home/compose


FROM ${BUILD_BASE} AS build
ENV GO111MODULE=off

RUN apk add --no-cache \
coreutils \
Expand All @@ -31,7 +32,7 @@ ARG KUBERNETES_VERSION
ENV GITCOMMIT=$GITCOMMIT VERSION=$VERSION BUILDTIME=$BUILDTIME IMAGE_REPO_PREFIX=$IMAGE_REPO_PREFIX KUBERNETES_VERSION=$KUBERNETES_VERSION
ENV CGO_ENABLED=0
RUN make bin/compose-controller bin/compose-controller.test e2e-binary bin/installer bin/api-server bin/api-server.test bin/e2e_benchmark
RUN go get github.com/onsi/ginkgo/ginkgo
RUN GO111MODULE=on go install github.com/onsi/ginkgo/ginkgo@v1.16.5
RUN curl -fLO https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /bin/kubectl
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.buildkit
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ USER compose
WORKDIR /home/compose

FROM ${BUILD_BASE} AS build
ENV GO111MODULE=off

RUN apk add --no-cache \
coreutils \
Expand All @@ -31,7 +32,7 @@ ARG KUBERNETES_VERSION
ENV GITCOMMIT=$GITCOMMIT VERSION=$VERSION BUILDTIME=$BUILDTIME IMAGE_REPO_PREFIX=$IMAGE_REPO_PREFIX KUBERNETES_VERSION=$KUBERNETES_VERSION
ENV CGO_ENABLED=0
RUN --mount=target=/root/.cache,type=cache make bin/compose-controller bin/compose-controller.test e2e-binary bin/installer bin/api-server bin/api-server.test bin/e2e_benchmark
RUN go get github.com/onsi/ginkgo/ginkgo
RUN GO111MODULE=on go install github.com/onsi/ginkgo/ginkgo@v1.16.5
RUN curl -fLO https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /bin/kubectl
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.debuggable
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG BUILD_BASE
ARG RUN_BASE

FROM ${BUILD_BASE} AS build
ENV GO111MODULE=off
RUN apk add --no-cache \
coreutils \
make \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ check-licenses: ## Check the licenses for our dependencies
$(GOPATH)/bin/wwhrd check

install-ginkgo:
go get -u github.com/onsi/ginkgo/ginkgo
GO111MODULE=on go install github.com/onsi/ginkgo/ginkgo@v1.16.5
go get -u github.com/onsi/gomega/...

e2e: ## Run the e2e tests
Expand Down
6 changes: 3 additions & 3 deletions docker.Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
include common.mk

export BUILD_BASE_IMAGE = golang:1.13.0-alpine3.10
export TEST_BASE_IMAGE = golang:1.13.0
export RUN_BASE_IMAGE = alpine:3.10.2
export BUILD_BASE_IMAGE = golang:1.16.13-alpine3.14
export TEST_BASE_IMAGE = golang:1.16.13
export RUN_BASE_IMAGE = alpine:3.14
export KUBERNETES_VERSION ?= 1.16.1
KIND_VERSION ?= 0.5.1
IMAGES = ${IMAGE_REPO_PREFIX}controller ${IMAGE_REPO_PREFIX}controller-coverage ${IMAGE_REPO_PREFIX}e2e-tests ${IMAGE_REPO_PREFIX}e2e-benchmark ${IMAGE_REPO_PREFIX}api-server ${IMAGE_REPO_PREFIX}api-server-coverage ${IMAGE_REPO_PREFIX}installer
Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG BUILD_BASE

FROM ${BUILD_BASE} as dev
ENV GO111MODULE=off

RUN apk add --no-cache \
bash \
Expand Down
1 change: 1 addition & 0 deletions dockerfiles/Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG TEST_BASE
FROM ${TEST_BASE}
ENV GO111MODULE=off
WORKDIR /go/src/github.com/docker/compose-on-kubernetes
RUN apt update && apt install -y build-essential && rm -rf /var/lib/apt/lists/*
RUN go get -u github.com/wadey/gocovmerge
Expand Down

0 comments on commit fd960f1

Please sign in to comment.