Library/.drone.yml

60 lines
1.2 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
pipeline:
clone:
image: plugins/git
depth: 50
tags: true
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
- npm run build --report
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 10:34:11 +00:00
event: [push, tag, deployment]