2017-11-07 15:23:30 +00:00
|
|
|
workspace:
|
|
|
|
base: /srv/app
|
2017-11-07 15:37:43 +00:00
|
|
|
path: src/git.mowie.cc/konrad/Library
|
2017-11-07 15:23:30 +00:00
|
|
|
|
2018-01-10 13:58:17 +00:00
|
|
|
clone:
|
|
|
|
git:
|
2018-01-10 14:04:07 +00:00
|
|
|
image: plugins/git
|
2017-11-07 15:23:30 +00:00
|
|
|
depth: 50
|
|
|
|
tags: true
|
|
|
|
|
2018-01-10 13:58:17 +00:00
|
|
|
pipeline:
|
2017-11-08 20:51:53 +00:00
|
|
|
build-backend:
|
2017-11-07 15:23:30 +00:00
|
|
|
image: webhippie/golang:edge
|
|
|
|
pull: true
|
2017-11-09 14:14:28 +00:00
|
|
|
group: build
|
2017-11-07 15:23:30 +00:00
|
|
|
environment:
|
|
|
|
TAGS: bindata sqlite
|
|
|
|
GOPATH: /srv/app
|
|
|
|
commands:
|
2017-11-07 15:29:41 +00:00
|
|
|
- make clean
|
|
|
|
- make lint
|
2017-11-07 15:23:30 +00:00
|
|
|
- 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/
|
2018-01-10 15:13:22 +00:00
|
|
|
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:
|
2018-01-10 15:13:22 +00:00
|
|
|
image: plugins/s3:1
|
2018-01-10 14:03:17 +00:00
|
|
|
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/
|
2018-01-10 15:13:22 +00:00
|
|
|
source: dist/release/**/*
|
2018-01-10 14:03:17 +00:00
|
|
|
target: /master
|
|
|
|
when:
|
|
|
|
event: [ push ]
|
|
|
|
branch: [ master ]
|