bump go 1.18 & remove .circleci

Signed-off-by: Quan TRAN <account@itscaro.me>
This commit is contained in:
Quan TRAN 2022-04-03 09:00:09 +02:00
parent 4a52ce0ac2
commit a1dfcb3480
4 changed files with 5 additions and 160 deletions

View File

@ -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.*/

View File

@ -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

View File

@ -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

View File

@ -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