filebrowser/.circleci/config.yml

79 lines
1.8 KiB
YAML
Raw Normal View History

version: 2
jobs:
lint:
docker:
- image: golangci/golangci-lint:v1.16
steps:
- checkout
- run: golangci-lint run -v -D errcheck
build-node:
docker:
- image: circleci/node
steps:
- checkout
- run:
name: "Build"
command: ./wizard.sh -a
- run:
name: "Cleanup"
command: rm -rf frontend/node_modules
- persist_to_workspace:
root: .
paths:
- '*'
build-go:
docker:
2019-05-11 22:50:17 +00:00
- image: circleci/golang:1.12
steps:
- attach_workspace:
at: '~/project'
- run:
name: "Compile"
2019-05-20 20:44:21 +00:00
command: GOOS=linux GOARCH=amd64 ./wizard.sh -c
- 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:
- '*'
release:
docker:
2019-05-11 22:50:17 +00:00
- image: circleci/golang:1.12
steps:
- attach_workspace:
at: '~/project'
2019-05-11 22:50:17 +00:00
- setup_remote_docker
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- run: curl -sL https://git.io/goreleaser | bash
2019-05-11 22:50:17 +00:00
- run: docker logout
workflows:
version: 2
build-workflow:
jobs:
2019-05-11 22:50:17 +00:00
- lint:
filters:
tags:
only: /.*/
- build-node:
filters:
tags:
only: /.*/
- build-go:
2019-05-11 22:50:17 +00:00
filters:
tags:
only: /.*/
requires:
- build-node
- lint
- release:
context: deploy
requires:
- build-go
filters:
2019-05-11 22:50:17 +00:00
tags:
only: /^v.*/
branches:
2019-05-20 21:01:30 +00:00
ignore: /.*/