From e1c6319b6c649df2b9a386792e753372fb634755 Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 27 Apr 2019 17:16:28 +0200 Subject: [PATCH] Made the build config work with drone 1 --- .drone.yml | 54 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/.drone.yml b/.drone.yml index 19517f1..ce9ea9d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,31 +1,51 @@ +kind: pipeline +name: default + workspace: - base: /srv/app - path: src/git.mowie.cc/konrad/Konfi-Castle-Kasino + base: /go + path: src/git.kolaente.de/konrad/Konfi-Castle-Kasino -pipeline: - clone: - image: plugins/git - depth: 50 - tags: true +steps: + # Needed to get the versions right as they depend on tags + - name: fetch-tags + image: docker:git + commands: + - git fetch --tags - build: - image: webhippie/golang:edge + - name: build + image: vikunja/golang-build:latest pull: true - environment: - TAGS: bindata sqlite - GOPATH: /srv/app commands: - make build when: event: [ push, tag, pull_request ] + depends_on: [ fetch-tags ] - static: - image: karalabe/xgo-latest:latest + - name: static + image: techknowlogick/xgo:latest pull: true environment: - TAGS: bindata sqlite + # This path does not exist. However, when we set the gopath to /go, the build fails. Not sure why. + # Leaving this here until we know how to resolve this properly. GOPATH: /srv/app commands: + - export PATH=$PATH:$GOPATH/bin - make release - when: - event: [ push, tag ] \ No newline at end of file + depends_on: [ fetch-tags ] + + # Push the releases to our pseudo-s3-bucket + - name: release + image: plugins/s3:1 + pull: true + settings: + bucket: konfi-castle-casino + 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 ] \ No newline at end of file