2019-05-11 21:40:11 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
docker:
|
2021-03-02 11:00:18 +00:00
|
|
|
- image: golangci/golangci-lint:v1.31.0
|
2019-05-11 21:40:11 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2020-05-31 23:12:36 +00:00
|
|
|
- run: golangci-lint run -v
|
2019-05-11 21:40:11 +00:00
|
|
|
build-node:
|
|
|
|
docker:
|
|
|
|
- image: circleci/node
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: "Build"
|
|
|
|
command: ./wizard.sh -a
|
2019-05-11 21:56:25 +00:00
|
|
|
- run:
|
|
|
|
name: "Cleanup"
|
|
|
|
command: rm -rf frontend/node_modules
|
2019-05-11 21:40:11 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- '*'
|
2020-07-24 18:12:21 +00:00
|
|
|
test:
|
|
|
|
docker:
|
2020-09-11 16:07:01 +00:00
|
|
|
- image: circleci/golang:1.15.2
|
2020-07-24 18:12:21 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: "Test"
|
|
|
|
command: go test ./...
|
2019-05-11 21:40:11 +00:00
|
|
|
build-go:
|
|
|
|
docker:
|
2020-09-11 16:07:01 +00:00
|
|
|
- image: circleci/golang:1.15.2
|
2019-05-11 21:40:11 +00:00
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: '~/project'
|
|
|
|
- run:
|
|
|
|
name: "Compile"
|
2019-05-20 20:44:21 +00:00
|
|
|
command: GOOS=linux GOARCH=amd64 ./wizard.sh -c
|
2019-05-11 21:56:25 +00:00
|
|
|
- run:
|
|
|
|
name: "Cleanup"
|
2019-05-11 22:50:17 +00:00
|
|
|
command: |
|
|
|
|
rm -rf frontend/build
|
|
|
|
git checkout -- go.sum # TODO: why is it being changed?
|
2019-05-21 09:59:05 +00:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- '*'
|
2019-05-11 21:40:11 +00:00
|
|
|
release:
|
|
|
|
docker:
|
2020-09-11 16:07:01 +00:00
|
|
|
- image: circleci/golang:1.15.2
|
2019-05-11 21:40:11 +00:00
|
|
|
steps:
|
|
|
|
- attach_workspace:
|
|
|
|
at: '~/project'
|
2019-05-11 22:50:17 +00:00
|
|
|
- setup_remote_docker
|
2020-09-11 16:57:14 +00:00
|
|
|
- run: echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin
|
2019-05-11 21:40:11 +00:00
|
|
|
- run: curl -sL https://git.io/goreleaser | bash
|
2019-05-11 22:50:17 +00:00
|
|
|
- run: docker logout
|
2019-05-11 21:40:11 +00:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build-workflow:
|
|
|
|
jobs:
|
2019-05-11 22:50:17 +00:00
|
|
|
- lint:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2020-07-24 18:12:21 +00:00
|
|
|
- test:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2019-05-11 22:50:17 +00:00
|
|
|
- build-node:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2019-05-11 21:40:11 +00:00
|
|
|
- build-go:
|
2019-05-11 22:50:17 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2019-05-11 21:40:11 +00:00
|
|
|
requires:
|
|
|
|
- build-node
|
|
|
|
- lint
|
2020-07-24 18:12:21 +00:00
|
|
|
- test
|
2019-05-11 22:49:16 +00:00
|
|
|
- release:
|
2019-05-11 21:40:11 +00:00
|
|
|
context: deploy
|
|
|
|
requires:
|
|
|
|
- build-go
|
|
|
|
filters:
|
2019-05-11 22:50:17 +00:00
|
|
|
tags:
|
|
|
|
only: /^v.*/
|
2019-05-11 21:40:11 +00:00
|
|
|
branches:
|
2021-03-02 11:00:18 +00:00
|
|
|
ignore: /.*/
|