mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
Fix/refactor CircleCI config
- Fix incorrect usage of workspaces (vendor dir in current directory no longer primary cache of go modules) - Refactor checkout, github-auth, and mod cache into a reusable command - Fix issue with dockerhub upload and github authentication
This commit is contained in:
parent
2925101b09
commit
2024228153
1 changed files with 29 additions and 38 deletions
|
|
@ -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.*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue