filebrowser/.circleci/config.yml
Henrique Dias cc6689ac3a chore: use circle ci (#725)
Former-commit-id: 3f2b9bf4d651e626e7658849fd0f1caefa4cbe1b [formerly 978d6c75dab9f724c7aff2a31cc3d3d0bb5e84d0] [formerly 4df409b8627f55ec6fee20f0698e7a2b06380f6d [formerly d60b3ebb28179b2d928e695bec7ccbd7494ef4e1]]
Former-commit-id: 24fec7fe931aaecf3fa91d9e9050c16c49909cd9 [formerly dbfae033cad45b7139de0238ea656e74e727f3e5]
Former-commit-id: a3fddbb4692b968e481ed7ffe3065b635aca2df7
2019-05-11 22:40:11 +01:00

87 lines
1.9 KiB
YAML

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: "Pull Submodules"
command: |
git submodule init
git submodule update --remote
- run:
name: "Build"
command: ./wizard.sh -a
- persist_to_workspace:
root: .
paths:
- '*'
build-go:
docker:
- image: circleci/golang
steps:
- attach_workspace:
at: '~/project'
- run:
name: "Compile"
command: ./wizard.sh -c
- persist_to_workspace:
root: .
paths:
- '*'
docker-latest:
docker:
- image: docker
steps:
- attach_workspace:
at: '~/project'
- setup_remote_docker
- run: docker build -t filebrowser/filebrowser .
- run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- run: docker push filebrowser/filebrowser
- run: docker logout
- persist_to_workspace:
root: .
paths:
- '*'
release:
docker:
- image: circleci/golang:1.10
steps:
- attach_workspace:
at: '~/project'
- run: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
build-workflow:
jobs:
- lint
- build-node
- build-go:
requires:
- build-node
- lint
- docker-latest:
context: deploy
requires:
- build-go
filters:
branches:
only: master
- release:
context: deploy
requires:
- build-go
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/