vikunja-api/.drone.yml

166 lines
3.8 KiB
YAML
Raw Permalink Normal View History

2018-07-25 17:28:54 +02:00
workspace:
base: /srv/app
path: src/code.vikunja.io/api
clone:
git:
image: plugins/git
depth: 50
tags: true
pipeline:
2018-07-25 17:43:38 +02:00
build:
2018-10-28 17:11:13 +01:00
image: vikunja/golang-build:latest
2018-07-25 17:28:54 +02:00
pull: true
group: build
environment:
TAGS: bindata sqlite
commands:
- make lint
- make fmt-check
# - make got-swag # Commented out until we figured out how to get this working on drone
- make ineffassign-check
- make misspell-check
2018-07-25 17:28:54 +02:00
- make build
when:
event: [ push, tag, pull_request ]
2018-07-25 17:43:38 +02:00
test:
2018-11-02 15:37:11 +01:00
image: vikunja/golang-build:latest
2018-07-25 17:28:54 +02:00
pull: true
commands:
- make test
when:
event: [ push, tag, pull_request ]
# Build a release when tagging
before-static-build:
image: karalabe/xgo-latest:latest
pull: true
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make release-dirs
when:
event: [tag, push]
static-build-windows:
image: karalabe/xgo-latest:latest
pull: true
group: build-static
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make release-windows
when:
event: [tag, push]
static-build-linux:
image: karalabe/xgo-latest:latest
pull: true
group: build-static
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make release-linux
when:
event: [tag, push]
static-build-darwin:
image: karalabe/xgo-latest:latest
pull: true
group: build-static
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make release-darwin
when:
event: [tag, push]
# static-build-frontend:
# image: webhippie/nodejs:current
# pull: true
# group: build-static
# commands:
# - make release-frontend
# when:
# event: [push, tag ]
after-build-static:
image: karalabe/xgo-latest:latest
pull: true
environment:
TAGS: bindata sqlite
GOPATH: /srv/app
commands:
- make release-copy
- make release-check
- make release-os-package
- make release-zip
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: vikunja
endpoint: https://storage.kolaente.de
path_style: true
strip_prefix: dist/zip/
source: dist/zip/*
target: /${DRONE_TAG##v}
when:
event: [ tag ]
release:
image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: vikunja
endpoint: https://storage.kolaente.de
path_style: true
strip_prefix: dist/zip/
source: dist/zip/*
target: /master
when:
event: [ push ]
2018-09-08 15:23:53 +02:00
branch: [ master ]
# Build the docker image and push it to docker hub
docker:
image: plugins/docker
pull: true
secrets: [ docker_username, docker_password ]
repo: vikunja/api
auto_tag: true
2018-09-10 19:24:17 +02:00
when:
event: [ push, tag ]
branch: [ master ]
# Update the instance on try.vikunja.io
rancher:
image: peloton/drone-rancher
url: http://server01.kolaente.de:8080/v1
secrets: [ RANCHER_ACCESS_KEY, RANCHER_SECRET_KEY ]
service: vikunja-dev/api
docker_image: vikunja/api
confirm: true
2018-09-08 15:23:53 +02:00
when:
event: [ push, tag ]
2018-09-22 22:38:25 +02:00
branch: [ master ]
# Tell people vikunja was updated
telegram:
image: appleboy/drone-telegram
2018-09-22 22:55:06 +02:00
secrets: [ TELEGRAM_TOKEN, TELEGRAM_TO ]
2018-09-22 23:52:19 +02:00
message: >
{{repo.owner}}/{{repo.name}}: \[{{build.status}}] Build {{build.number}}
{{commit.author}} pushed to {{commit.branch}} {{commit.sha}}: `{{commit.message}}`
Build started at {{datetime build.started "2006-Jan-02T15:04:05Z" "GMT+2"}} finished at {{datetime build.finished "2006-Jan-02T15:04:05Z" "GMT+2"}}.