2018-09-08 17:44:29 +02:00
|
|
|
workspace:
|
|
|
|
base: /srv/app
|
|
|
|
|
|
|
|
clone:
|
|
|
|
git:
|
|
|
|
image: plugins/git
|
|
|
|
depth: 50
|
|
|
|
tags: true
|
|
|
|
|
2018-09-08 17:45:01 +02:00
|
|
|
pipeline:
|
2018-09-08 17:44:29 +02:00
|
|
|
build:
|
|
|
|
image: node
|
|
|
|
pull: true
|
|
|
|
group: build-static
|
|
|
|
commands:
|
|
|
|
- npm install
|
|
|
|
- npm run lint
|
2018-11-06 10:26:41 +01:00
|
|
|
- "echo '{\"VIKUNJA_API_BASE_URL\": \"/api/v1/\"}' > /srv/app/src/git.kolaente.de/vikunja/frontend/public/config.json" # Override config
|
2018-09-08 17:44:29 +02:00
|
|
|
- npm run build
|
|
|
|
when:
|
|
|
|
event: [push, tag, pull_request]
|
|
|
|
|
|
|
|
static:
|
|
|
|
image: karalabe/xgo-latest:latest
|
|
|
|
pull: true
|
|
|
|
commands:
|
|
|
|
- cd dist
|
2018-09-08 17:51:34 +02:00
|
|
|
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
|
2018-09-08 17:44:29 +02:00
|
|
|
- cd ..
|
|
|
|
when:
|
2018-09-08 17:51:34 +02:00
|
|
|
event: [tag]
|
|
|
|
|
2018-09-08 17:52:06 +02:00
|
|
|
static:
|
|
|
|
image: karalabe/xgo-latest:latest
|
|
|
|
pull: true
|
|
|
|
commands:
|
|
|
|
- cd dist
|
|
|
|
- zip -r ../vikunja-frontend-master.zip *
|
|
|
|
- cd ..
|
|
|
|
when:
|
|
|
|
event: [push]
|
2018-09-08 17:52:24 +02:00
|
|
|
branch: [ master ]
|
2018-09-08 17:44:29 +02:00
|
|
|
|
|
|
|
# Push the releases to our pseudo-s3-bucket
|
|
|
|
release:
|
|
|
|
image: plugins/s3:1
|
|
|
|
pull: true
|
|
|
|
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
2018-09-08 17:51:34 +02:00
|
|
|
bucket: vikunja-frontend
|
2018-09-08 17:44:29 +02:00
|
|
|
endpoint: https://storage.kolaente.de
|
|
|
|
path_style: true
|
2018-09-08 17:51:34 +02:00
|
|
|
source: vikunja-frontend-${DRONE_TAG##v}.zip
|
2018-09-08 17:44:29 +02:00
|
|
|
when:
|
|
|
|
event: [ tag ]
|
|
|
|
|
|
|
|
release:
|
|
|
|
image: plugins/s3:1
|
|
|
|
pull: true
|
|
|
|
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
2018-09-08 17:51:34 +02:00
|
|
|
bucket: vikunja-frontend
|
2018-09-08 17:44:29 +02:00
|
|
|
endpoint: https://storage.kolaente.de
|
|
|
|
path_style: true
|
2018-09-08 17:51:34 +02:00
|
|
|
source: vikunja-frontend-master.zip
|
2018-09-08 17:44:29 +02:00
|
|
|
when:
|
|
|
|
event: [ push ]
|
|
|
|
branch: [ master ]
|
|
|
|
|
2018-09-08 17:56:45 +02:00
|
|
|
# Build the docker image and push it to docker hub
|
|
|
|
docker:
|
|
|
|
image: plugins/docker
|
|
|
|
pull: true
|
|
|
|
secrets: [ docker_username, docker_password ]
|
|
|
|
repo: vikunja/frontend
|
|
|
|
auto_tag: true
|
2018-09-09 19:57:27 +02:00
|
|
|
when:
|
|
|
|
event: [ push, tag ]
|
|
|
|
branch: [ master ]
|
|
|
|
|
|
|
|
rancher:
|
|
|
|
image: peloton/drone-rancher
|
|
|
|
url: http://server01.kolaente.de:8080/v1
|
|
|
|
secrets: [ RANCHER_ACCESS_KEY, RANCHER_SECRET_KEY ]
|
|
|
|
service: vikunja-dev/frontend
|
|
|
|
docker_image: vikunja/frontend
|
|
|
|
confirm: true
|
2018-09-08 17:56:45 +02:00
|
|
|
when:
|
|
|
|
event: [ push, tag ]
|
2018-11-28 21:31:32 +01:00
|
|
|
branch: [ master ]
|
|
|
|
|
|
|
|
# Update the mirror on github
|
|
|
|
github_mirror:
|
|
|
|
image: appleboy/drone-git-push
|
|
|
|
branch: master
|
|
|
|
remote: git@github.com:go-vikunja/frontend.git
|
|
|
|
remote_name: github
|
|
|
|
local_branch: master
|
|
|
|
followtags: true
|
|
|
|
force: false
|
|
|
|
commit: false
|
|
|
|
when:
|
|
|
|
event: [ push, tag ]
|
|
|
|
branch: [ master ]
|