From a1dfcb3480dc82dbf50f34b56a871e69ccff3b48 Mon Sep 17 00:00:00 2001 From: Quan TRAN Date: Sun, 3 Apr 2022 09:00:09 +0200 Subject: [PATCH] bump go 1.18 & remove .circleci Signed-off-by: Quan TRAN --- .circleci/config.yml | 155 ---------------------- {.circleci => .github/workflows}/Makefile | 2 +- .github/workflows/ci.yaml | 6 +- Dockerfile | 2 +- 4 files changed, 5 insertions(+), 160 deletions(-) delete mode 100644 .circleci/config.yml rename {.circleci => .github/workflows}/Makefile (99%) diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 759dba76..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,155 +0,0 @@ -version: 2.1 - -jobs: - - build: - docker: - - image: circleci/golang:1.17.3 - environment: - GOPATH: /go - working_directory: /home/circleci/workspace/helmfile - steps: - - checkout - - restore_cache: - keys: - - go-mod-cache-v1-{{ checksum "./go.sum" }} - - go-mod-cache-v1- - - run: go env - - run: make build - - run: make build-test-tools - - save_cache: - key: go-mod-cache-v1-{{ checksum "./go.sum" }} - paths: - - /go/pkg/mod - - persist_to_workspace: - root: ./ - paths: - - . - image: - docker: - - image: circleci/golang:1.17.3 - working_directory: /home/circleci/workspace/helmfile - steps: - - checkout - - restore_cache: - keys: - - go-mod-cache-v1-{{ checksum "./go.sum" }} - - go-mod-cache-v1- - - setup_remote_docker - - run: - command: | - make tools - go mod vendor - ORG=roboll BUILD_URL="$CIRCLE_BUILD_URL" make image - - image_debian: - docker: - - image: circleci/golang:1.17.3 - working_directory: /home/circleci/workspace/helmfile - steps: - - checkout - - restore_cache: - keys: - - go-mod-cache-v1-{{ checksum "./go.sum" }} - - go-mod-cache-v1- - - setup_remote_docker - - run: - command: | - make tools - go mod vendor - ORG=roboll BUILD_URL="$CIRCLE_BUILD_URL" make image/debian - - test: - environment: - GOPATH: /go - docker: - - image: circleci/golang:1.17.3 - working_directory: /home/circleci/workspace/helmfile - steps: - - checkout - - restore_cache: - keys: - - go-mod-cache-v1-{{ checksum "./go.sum" }} - - go-mod-cache-v1- - - run: make check - - run: make pristine - - run: make -C .circleci helm - - run: make test - - # thanks to https://raw.githubusercontent.com/weaveworks/launcher/master/.circleci/config.yml - integration_tests: - machine: - image: ubuntu-2004:202010-01 - parameters: - helm-version: - type: string - steps: - - checkout - - run: mkdir ~/build - - attach_workspace: - at: ~/build - - run: - name: Install test dependencies - command: | - cp ~/build/helmfile ~/project/helmfile - cp ~/build/diff-yamls ~/project/diff-yamls - cp ~/build/yamldiff ~/project/yamldiff - make -C .circleci helm - make -C .circleci vault - make -C .circleci sops - make -C .circleci kustomize - make -C .circleci minikube - - run: - name: Execute integration tests - environment: - TERM: "xterm" - command: | - export TERM=xterm - if [[ "<< parameters.helm-version >>" == v3* ]] - then - HELMFILE_HELM3=1 make integration - else - make integration - fi - -# GITHUB_TOKEN env var must be setup in circleci console - - release: - docker: - - image: circleci/golang:1.17.3 - working_directory: /home/circleci/workspace/helmfile - steps: - - checkout - - restore_cache: - keys: - - go-mod-cache-v1-{{ checksum "./go.sum" }} - - go-mod-cache-v1- - - setup_remote_docker - - run: - no_output_timeout: 30m - command: | - docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" quay.io - make tools - go mod vendor - ORG=roboll BUILD_URL="$CIRCLE_BUILD_URL" make push push/debian release - -workflows: - version: 2 - build_and_test: - jobs: - - build - - image - - image_debian - - test - - integration_tests: - requires: - - build - matrix: - parameters: - helm-version: ["v3.4.2", "v3.5.4", "v3.6.3", "v3.7.2", "v3.8.0"] - - release: - filters: - branches: - ignore: /.*/ - tags: - only: /v.*/ diff --git a/.circleci/Makefile b/.github/workflows/Makefile similarity index 99% rename from .circleci/Makefile rename to .github/workflows/Makefile index 4ad5bc23..7e2b090f 100644 --- a/.circleci/Makefile +++ b/.github/workflows/Makefile @@ -63,6 +63,6 @@ vault: sops: curl -sSLo $(tmp)/sops "https://github.com/mozilla/sops/releases/download/${SOPS_VERSION}/sops-${SOPS_VERSION}.linux" - chmod +x $(tmp)/sops + chmod +x $(tmp)/sops sudo mv ${tmp}/sops /usr/local/bin/ .PHONY: sops diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 18dda757..40a7cd95 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - name: Env run: go env - name: Build @@ -72,7 +72,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: 1.18 - name: Env run: go env @@ -88,7 +88,7 @@ jobs: - name: Install test dependencies env: HELM_VERSION: ${{ matrix.helm-version }} - run: make -C .circleci helm vault sops kustomize + run: make -C .github/workflows helm vault sops kustomize - name: Start minikube uses: medyagh/setup-minikube@master - name: Execute integration tests diff --git a/Dockerfile b/Dockerfile index 7d870dd3..efa7432f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.17.3-alpine3.13 as builder +FROM golang:1.18 as builder RUN apk add --no-cache make git WORKDIR /workspace/helmfile