client/.drone.yml

121 lines
2.3 KiB
YAML
Raw Normal View History

kind: pipeline
name: testing
2018-11-29 00:16:11 +00:00
workspace:
base: /go
2018-11-29 00:16:11 +00:00
path: src/git.kolaente.de/sofaraum/client
steps:
- name: build
2018-11-29 00:16:11 +00:00
image: vikunja/golang-build:latest
pull: true
commands:
- make lint
- make fmt-check
- make ineffassign-check
- make misspell-check
- make build
when:
event: [ push, tag, pull_request ]
- name: test
image: vikunja/golang-build:latest
2018-11-29 00:16:11 +00:00
pull: true
commands:
- make test
depends_on: [ build ]
2018-11-29 00:16:11 +00:00
when:
event: [ push, tag, pull_request ]
2018-11-29 00:16:11 +00:00
---
kind: pipeline
name: deploy-master
depends_on:
- testing
2018-11-29 00:16:11 +00:00
workspace:
base: /go
path: src/git.kolaente.de/sofaraum/client
trigger:
branch:
- master
event:
- push
steps:
# Needed to get the versions right as they depend on tags
- name: fetch-tags
image: docker:git
commands:
- git fetch --tags
- name: static
image: techknowlogick/xgo:latest
pull: true
commands:
- export PATH=$PATH:$GOPATH/bin
- make release
# Push the releases to our pseudo-s3-bucket
2019-04-27 09:07:55 +00:00
- name: release
2018-11-29 00:16:11 +00:00
image: plugins/s3:1
pull: true
settings:
bucket: sofaraum-client
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://storage.kolaente.de
path_style: true
strip_prefix: dist/binaries/
source: dist/binaries/*
target: /master/
depends_on: [ static ]
---
kind: pipeline
name: deploy-version
depends_on:
- testing
workspace:
base: /go
path: src/git.kolaente.de/sofaraum/client
trigger:
event:
2019-04-27 09:05:33 +00:00
- tag
2018-11-29 00:16:11 +00:00
steps:
# Needed to get the versions right as they depend on tags
- name: fetch-tags
image: docker:git
commands:
- git fetch --tags
- name: static
image: techknowlogick/xgo:latest
pull: true
commands:
- export PATH=$PATH:$GOPATH/bin
- make release
# Push the releases to our pseudo-s3-bucket
2019-04-27 09:07:55 +00:00
- name: release
2018-11-29 00:16:11 +00:00
image: plugins/s3:1
pull: true
settings:
bucket: sofaraum-client
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
endpoint: https://storage.kolaente.de
path_style: true
strip_prefix: dist/binaries/
source: dist/binaries/*
target: /${DRONE_TAG##v}
depends_on: [ static ]