Updated drone config for drone 1
This commit is contained in:
parent
ad6ba80021
commit
3647e93b91
1 changed files with 116 additions and 63 deletions
179
.drone.yml
179
.drone.yml
|
@ -1,14 +1,36 @@
|
||||||
workspace:
|
kind: pipeline
|
||||||
base: /srv/app
|
name: testing
|
||||||
|
|
||||||
clone:
|
trigger:
|
||||||
git:
|
branch:
|
||||||
image: plugins/git
|
exclude:
|
||||||
depth: 50
|
- master
|
||||||
tags: true
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
build:
|
- name: build
|
||||||
|
image: node:11-alpine
|
||||||
|
pull: true
|
||||||
|
group: build-static
|
||||||
|
commands:
|
||||||
|
- apk add yarn
|
||||||
|
- yarn
|
||||||
|
- yarn run lint
|
||||||
|
- yarn run build
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: release-latest
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
image: node:11-alpine
|
image: node:11-alpine
|
||||||
pull: true
|
pull: true
|
||||||
group: build-static
|
group: build-static
|
||||||
|
@ -18,72 +40,103 @@ pipeline:
|
||||||
- yarn run lint
|
- yarn run lint
|
||||||
- "echo '{\"VIKUNJA_API_BASE_URL\": \"/api/v1/\"}' > /srv/app/src/git.kolaente.de/vikunja/frontend/public/config.json" # Override config
|
- "echo '{\"VIKUNJA_API_BASE_URL\": \"/api/v1/\"}' > /srv/app/src/git.kolaente.de/vikunja/frontend/public/config.json" # Override config
|
||||||
- yarn run build
|
- yarn run build
|
||||||
when:
|
|
||||||
event: [push, tag, pull_request]
|
|
||||||
|
|
||||||
static:
|
- name: static
|
||||||
image: karalabe/xgo-latest:latest
|
image: kolaente/zip
|
||||||
pull: true
|
|
||||||
commands:
|
|
||||||
- cd dist
|
|
||||||
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
|
|
||||||
- cd ..
|
|
||||||
when:
|
|
||||||
event: [tag]
|
|
||||||
|
|
||||||
static:
|
|
||||||
image: karalabe/xgo-latest:latest
|
|
||||||
pull: true
|
pull: true
|
||||||
commands:
|
commands:
|
||||||
- cd dist
|
- cd dist
|
||||||
- zip -r ../vikunja-frontend-master.zip *
|
- zip -r ../vikunja-frontend-master.zip *
|
||||||
- cd ..
|
- cd ..
|
||||||
when:
|
|
||||||
event: [push]
|
|
||||||
branch: [ master ]
|
|
||||||
|
|
||||||
# Push the releases to our pseudo-s3-bucket
|
- name: release-latest
|
||||||
release:
|
|
||||||
image: plugins/s3:1
|
image: plugins/s3:1
|
||||||
pull: true
|
pull: true
|
||||||
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
settings:
|
||||||
bucket: vikunja-frontend
|
bucket: vikunja-frontend
|
||||||
endpoint: https://storage.kolaente.de
|
access_key:
|
||||||
path_style: true
|
from_secret: aws_access_key_id
|
||||||
source: vikunja-frontend-${DRONE_TAG##v}.zip
|
secret_key:
|
||||||
when:
|
from_secret: aws_secret_access_key
|
||||||
event: [ tag ]
|
endpoint: https://storage.kolaente.de
|
||||||
|
path_style: true
|
||||||
release:
|
source: vikunja-frontend-master.zip
|
||||||
image: plugins/s3:1
|
|
||||||
pull: true
|
|
||||||
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
|
||||||
bucket: vikunja-frontend
|
|
||||||
endpoint: https://storage.kolaente.de
|
|
||||||
path_style: true
|
|
||||||
source: vikunja-frontend-master.zip
|
|
||||||
when:
|
|
||||||
event: [ push ]
|
|
||||||
branch: [ master ]
|
|
||||||
|
|
||||||
# Build the docker image and push it to docker hub
|
# Build the docker image and push it to docker hub
|
||||||
docker:
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
pull: true
|
pull: true
|
||||||
secrets: [ docker_username, docker_password ]
|
settings:
|
||||||
repo: vikunja/frontend
|
username:
|
||||||
auto_tag: true
|
from_secret: docker_username
|
||||||
when:
|
password:
|
||||||
event: [ push, tag ]
|
from_secret: docker_password
|
||||||
branch: [ master ]
|
repo: vikunja/frontend
|
||||||
|
auto_tag: true
|
||||||
|
|
||||||
rancher:
|
# Update the instance on try.vikunja.io
|
||||||
|
- name: rancher
|
||||||
image: peloton/drone-rancher
|
image: peloton/drone-rancher
|
||||||
url: http://server01.kolaente.de:8080/v1
|
settings:
|
||||||
secrets: [ RANCHER_ACCESS_KEY, RANCHER_SECRET_KEY ]
|
url: http://server01.kolaente.de:8080/v1
|
||||||
service: vikunja-dev/frontend
|
access_key:
|
||||||
docker_image: vikunja/frontend
|
from_secret: RANCHER_ACCESS_KEY
|
||||||
confirm: true
|
secret_key:
|
||||||
when:
|
from_secret: RANCHER_SECRET_KEY
|
||||||
event: [ push, tag ]
|
service: vikunja-dev/frontend
|
||||||
branch: [ master ]
|
docker_image: vikunja/frontend
|
||||||
|
confirm: true
|
||||||
|
depends_on: [ docker ]
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: release-version
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- tag
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: node:11-alpine
|
||||||
|
pull: true
|
||||||
|
group: build-static
|
||||||
|
commands:
|
||||||
|
- apk add yarn
|
||||||
|
- yarn
|
||||||
|
- yarn run lint
|
||||||
|
- "echo '{\"VIKUNJA_API_BASE_URL\": \"/api/v1/\"}' > /srv/app/src/git.kolaente.de/vikunja/frontend/public/config.json" # Override config
|
||||||
|
- yarn run build
|
||||||
|
|
||||||
|
- name: static
|
||||||
|
image: kolaente/zip
|
||||||
|
pull: true
|
||||||
|
commands:
|
||||||
|
- cd dist
|
||||||
|
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
|
||||||
|
- cd ..
|
||||||
|
|
||||||
|
- name: release-latest
|
||||||
|
image: plugins/s3:1
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
bucket: vikunja-frontend
|
||||||
|
access_key:
|
||||||
|
from_secret: aws_access_key_id
|
||||||
|
secret_key:
|
||||||
|
from_secret: aws_secret_access_key
|
||||||
|
endpoint: https://storage.kolaente.de
|
||||||
|
path_style: true
|
||||||
|
source: vikunja-frontend-${DRONE_TAG##v}.zip
|
||||||
|
|
||||||
|
# Build the docker image and push it to docker hub
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
pull: true
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: vikunja/frontend
|
||||||
|
auto_tag: true
|
||||||
|
|
Loading…
Reference in a new issue