2018-11-29 00:16:11 +00:00
|
|
|
workspace:
|
|
|
|
base: /srv/app
|
|
|
|
path: src/git.kolaente.de/sofaraum/client
|
|
|
|
|
|
|
|
clone:
|
|
|
|
git:
|
|
|
|
image: plugins/git
|
|
|
|
depth: 50
|
|
|
|
tags: true
|
|
|
|
|
|
|
|
pipeline:
|
|
|
|
build:
|
|
|
|
image: vikunja/golang-build:latest
|
|
|
|
pull: true
|
|
|
|
group: build
|
|
|
|
commands:
|
|
|
|
- make lint
|
|
|
|
- make fmt-check
|
|
|
|
- make ineffassign-check
|
|
|
|
- make misspell-check
|
|
|
|
- make build
|
|
|
|
when:
|
|
|
|
event: [ push, tag, pull_request ]
|
|
|
|
|
|
|
|
test:
|
|
|
|
image: vikunja/golang-build:latest
|
|
|
|
pull: true
|
|
|
|
commands:
|
|
|
|
- make test
|
|
|
|
when:
|
|
|
|
event: [ push, tag, pull_request ]
|
|
|
|
|
|
|
|
# Build a release when tagging
|
2018-11-29 00:27:24 +00:00
|
|
|
static:
|
2018-11-29 00:16:11 +00:00
|
|
|
image: karalabe/xgo-latest:latest
|
|
|
|
pull: true
|
|
|
|
group: build-static
|
|
|
|
environment:
|
|
|
|
TAGS: bindata sqlite
|
|
|
|
GOPATH: /srv/app
|
|
|
|
commands:
|
|
|
|
- make release
|
|
|
|
when:
|
|
|
|
event: [tag, push]
|
|
|
|
|
|
|
|
|
|
|
|
# Push the releases to our pseudo-s3-bucket
|
|
|
|
release:
|
|
|
|
image: plugins/s3:1
|
|
|
|
pull: true
|
|
|
|
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
|
|
|
bucket: sofaraum-client
|
|
|
|
endpoint: https://storage.kolaente.de
|
|
|
|
path_style: true
|
2018-11-29 00:27:24 +00:00
|
|
|
strip_prefix: dist/binaries/
|
|
|
|
source: dist/binaries/*
|
2018-11-29 00:16:11 +00:00
|
|
|
target: /${DRONE_TAG##v}
|
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
|
|
|
|
release:
|
|
|
|
image: plugins/s3:1
|
|
|
|
pull: true
|
|
|
|
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
|
|
|
bucket: sofaraum-client
|
|
|
|
endpoint: https://storage.kolaente.de
|
|
|
|
path_style: true
|
2018-11-29 00:27:24 +00:00
|
|
|
strip_prefix: dist/binaries/
|
|
|
|
source: dist/binaries/*
|
2018-11-29 00:16:11 +00:00
|
|
|
target: /master
|
|
|
|
when:
|
|
|
|
event: [ push ]
|
|
|
|
branch: [ master ]
|