Library/.drone.yml

75 lines
1.5 KiB
YAML
Raw Normal View History

workspace:
base: /srv/app
2017-11-07 15:37:43 +00:00
path: src/git.mowie.cc/konrad/Library
2018-01-10 13:58:17 +00:00
clone:
git:
image: plugins/git:1
depth: 50
tags: true
2018-01-10 13:58:17 +00:00
pipeline:
2017-11-08 20:51:53 +00:00
build-backend:
image: webhippie/golang:edge
pull: true
2017-11-09 14:14:28 +00:00
group: build
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
2017-11-07 15:29:41 +00:00
- make clean
- make lint
- make fmt-check
- make build
when:
event: [ push, tag, pull_request ]
2017-11-08 20:51:53 +00:00
build-frontend:
2017-11-08 21:02:04 +00:00
image: webhippie/nodejs:current
2017-11-08 20:51:53 +00:00
pull: true
2017-11-09 14:14:28 +00:00
group: build
2017-11-08 20:51:53 +00:00
commands:
2017-11-09 14:14:28 +00:00
- cd frontend/
2017-11-08 20:51:53 +00:00
- npm install
2018-01-10 12:11:19 +00:00
- npm run build
2017-11-08 20:51:53 +00:00
when:
event: [ push, tag, pull_request ]
2018-01-10 09:16:12 +00:00
# Build a release when tagging
static:
image: karalabe/xgo-latest:latest
pull: true
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make release
when:
2018-01-10 10:34:11 +00:00
event: [push, tag, deployment]
2018-01-10 09:16:12 +00:00
release:
image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: library-release
endpoint: https://storage.kolaente.de
path_style: true
strip_prefix: dist/release/
source: dist/release/*
2018-01-10 12:08:12 +00:00
target: /${DRONE_TAG##v}
2018-01-10 09:16:12 +00:00
when:
2018-01-10 14:03:17 +00:00
event: [ tag ]
release:
image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: library-release
endpoint: https://storage.kolaente.de
path_style: true
strip_prefix: dist/release/
source: dist/release/*
target: /master
when:
event: [ push ]
branch: [ master ]