Merge pull request #490 from codysoyland/ci-fixes

Fix/refactor CircleCI config
This commit is contained in:
Cody Soyland 2020-06-24 13:52:45 -05:00 committed by GitHub
commit bc9d13206f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,48 +20,48 @@ commands:
add-github-auth:
steps:
- run: git config --global url."https://moleculacorp:${GITHUB_PERSONAL_ACCESS_TOKEN}@github.com".insteadOf "https://github.com"
restore-mod-cache:
steps:
- restore_cache:
key: mod-cache-{{ checksum "go.sum" }}
save-mod-cache:
steps:
- save_cache:
key: mod-cache-{{ checksum "go.sum" }}
paths:
- /go/pkg/mod/
checkout-plus:
steps:
- add-github-auth
- checkout
- restore-mod-cache
jobs:
setup:
executor:
name: golang
steps:
- add-github-auth
- checkout
- restore_cache:
keys:
- mod-cache-{{ checksum "go.sum" }}
- run: "go mod download"
- save_cache:
key: mod-cache-{{ checksum "go.sum" }}
paths:
- /go/pkg/mod/
- persist_to_workspace:
root: .
paths: "*"
- checkout-plus
- run: go mod download
- save-mod-cache
check-license-headers:
executor:
name: golang
steps:
- attach_workspace:
at: .
- checkout-plus
- run: make check-license-headers
linter:
executor:
name: golang
steps:
- attach_workspace:
at: .
- add-github-auth
- checkout-plus
- run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b /usr/local/bin v1.23.8
- run: make golangci-lint
test-build-arm:
executor:
name: golang
steps:
- attach_workspace:
at: .
- add-github-auth
- checkout-plus
- run: make build GOOS=linux GOARCH=arm GOARM=5
- run: make build GOOS=linux GOARCH=arm GOARM=6
- run: make build GOOS=linux GOARCH=arm GOARM=7
@ -91,9 +91,7 @@ jobs:
version: << parameters.golang_version >>
resource_class: << parameters.resource_class >>
steps:
- attach_workspace:
at: .
- add-github-auth
- checkout-plus
- run: sudo apt-get install lsof
- run:
command: make << parameters.test_make_target >> SHARD_WIDTH=<< parameters.shard_width >> GOARCH=<< parameters.goarch >>
@ -102,18 +100,14 @@ jobs:
executor:
name: golang
steps:
- attach_workspace:
at: .
- add-github-auth
- checkout-plus
- setup_remote_docker
- run: make clustertests-build
prerelease:
executor:
name: golang
steps:
- attach_workspace:
at: .
- add-github-auth
- checkout-plus
- run: make prerelease
- store_artifacts:
path: build
@ -124,6 +118,7 @@ jobs:
executor:
name: golang
steps:
- checkout-plus
- attach_workspace:
at: .
- run: make release
@ -136,6 +131,7 @@ jobs:
docker:
- image: circleci/python:2.7-jessie
steps:
- checkout-plus
- attach_workspace:
at: .
- run: sudo pip install awscli
@ -144,10 +140,7 @@ jobs:
executor:
name: golang
steps:
- checkout
- attach_workspace:
at: .
- add-github-auth
- checkout-plus
- setup_remote_docker
- run: make docker
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
@ -156,10 +149,7 @@ jobs:
executor:
name: golang
steps:
- checkout
- attach_workspace:
at: .
- add-github-auth
- checkout-plus
- setup_remote_docker
- run: make docker
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
@ -170,6 +160,7 @@ workflows:
build:
jobs:
- setup:
context: molecula
filters:
tags:
only: /^v.*/