frontend/.drone.yml

136 lines
2.7 KiB
YAML
Raw Normal View History

2019-04-25 18:03:19 +00:00
kind: pipeline
name: testing
2018-09-08 15:44:29 +00:00
2019-04-25 18:03:19 +00:00
trigger:
branch:
include:
2019-04-25 18:03:19 +00:00
- master
event:
include:
- push
- pull_request
2018-09-08 15:44:29 +00:00
2019-04-25 18:03:19 +00:00
steps:
- name: build
image: kolaente/yarn
2018-09-08 15:44:29 +00:00
pull: true
group: build-static
commands:
2019-12-15 20:42:40 +00:00
- yarn --frozen-lockfile
2019-03-03 21:38:12 +00:00
- yarn run lint
- yarn run build
2018-09-08 15:44:29 +00:00
2019-04-25 18:03:19 +00:00
---
kind: pipeline
name: release-latest
trigger:
branch:
- master
event:
- push
steps:
- name: build
image: kolaente/yarn
2018-09-08 15:44:29 +00:00
pull: true
2019-04-25 18:03:19 +00:00
group: build-static
2018-09-08 15:44:29 +00:00
commands:
2019-12-15 20:42:40 +00:00
- yarn --frozen-lockfile
2019-04-25 18:03:19 +00:00
- yarn run lint
2019-04-25 18:08:12 +00:00
- "echo '{\"VIKUNJA_API_BASE_URL\": \"/api/v1/\"}' > /drone/src/public/config.json" # Override config
2019-04-25 18:03:19 +00:00
- yarn run build
2019-04-25 18:03:19 +00:00
- name: static
image: kolaente/zip
2018-09-08 15:52:06 +00:00
pull: true
commands:
- cd dist
- zip -r ../vikunja-frontend-master.zip *
- cd ..
2019-04-25 18:05:12 +00:00
depends_on: [ build ]
2018-09-08 15:44:29 +00:00
2019-04-25 18:05:12 +00:00
- name: release
2018-09-08 15:44:29 +00:00
image: plugins/s3:1
pull: true
2019-04-25 18:03:19 +00:00
settings:
2020-03-01 21:53:40 +00:00
bucket: vikunja
2019-04-25 18:03:19 +00:00
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-master.zip
2020-03-01 21:53:40 +00:00
target: /frontend/
2019-04-25 18:05:12 +00:00
depends_on: [ static ]
2019-04-25 18:03:19 +00:00
# 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
2019-04-25 18:05:12 +00:00
depends_on: [ static ]
2019-04-25 18:03:19 +00:00
---
kind: pipeline
name: release-version
2018-09-08 15:44:29 +00:00
2019-04-25 18:03:19 +00:00
trigger:
event:
- tag
steps:
- name: build
image: kolaente/yarn
2019-04-25 18:03:19 +00:00
pull: true
group: build-static
commands:
2019-12-15 20:42:40 +00:00
- yarn --frozen-lockfile
2019-04-25 18:03:19 +00:00
- yarn run lint
2019-04-25 18:08:12 +00:00
- "echo '{\"VIKUNJA_API_BASE_URL\": \"/api/v1/\"}' > /drone/src/public/config.json" # Override config
2019-04-25 18:03:19 +00:00
- yarn run build
- name: static
image: kolaente/zip
pull: true
commands:
- cd dist
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
- cd ..
2019-04-25 18:05:12 +00:00
depends_on: [ build ]
2019-04-25 18:03:19 +00:00
2019-04-25 18:05:12 +00:00
- name: release
2018-09-08 15:44:29 +00:00
image: plugins/s3:1
pull: true
2019-04-25 18:03:19 +00:00
settings:
2020-03-01 21:53:40 +00:00
bucket: vikunja
2019-04-25 18:03:19 +00:00
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
2020-03-01 21:53:40 +00:00
target: /frontend/
2019-04-25 18:05:12 +00:00
depends_on: [ static ]
2018-09-08 15:44:29 +00:00
2018-09-08 15:56:45 +00:00
# Build the docker image and push it to docker hub
2019-04-25 18:03:19 +00:00
- name: docker
2018-09-08 15:56:45 +00:00
image: plugins/docker
pull: true
2019-04-25 18:03:19 +00:00
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: vikunja/frontend
auto_tag: true
2019-04-25 18:05:12 +00:00
depends_on: [ static ]