2019-04-25 20:03:19 +02:00
|
|
|
kind: pipeline
|
|
|
|
name: testing
|
2018-09-08 17:44:29 +02:00
|
|
|
|
2019-04-25 20:03:19 +02:00
|
|
|
trigger:
|
|
|
|
branch:
|
2020-03-01 16:52:36 +01:00
|
|
|
include:
|
2019-04-25 20:03:19 +02:00
|
|
|
- master
|
|
|
|
event:
|
2020-03-01 16:52:36 +01:00
|
|
|
include:
|
|
|
|
- push
|
|
|
|
- pull_request
|
2018-09-08 17:44:29 +02:00
|
|
|
|
2019-04-25 20:03:19 +02:00
|
|
|
steps:
|
|
|
|
- name: build
|
2020-05-08 21:59:06 +02:00
|
|
|
image: node:13
|
2018-09-08 17:44:29 +02:00
|
|
|
pull: true
|
|
|
|
group: build-static
|
|
|
|
commands:
|
2020-06-23 09:18:17 +02:00
|
|
|
- yarn --frozen-lockfile --network-timeout 100000
|
2019-03-03 22:38:12 +01:00
|
|
|
- yarn run lint
|
|
|
|
- yarn run build
|
2018-09-08 17:44:29 +02:00
|
|
|
|
2019-04-25 20:03:19 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: release-latest
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
|
|
|
|
steps:
|
2020-05-09 22:09:46 +02:00
|
|
|
- name: fetch-tags
|
|
|
|
image: docker:git
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
|
|
|
|
2019-04-25 20:03:19 +02:00
|
|
|
- name: build
|
2020-05-08 21:59:06 +02:00
|
|
|
image: node:13
|
2018-09-08 17:44:29 +02:00
|
|
|
pull: true
|
2019-04-25 20:03:19 +02:00
|
|
|
group: build-static
|
2018-09-08 17:44:29 +02:00
|
|
|
commands:
|
2020-06-23 09:18:17 +02:00
|
|
|
- yarn --frozen-lockfile --network-timeout 100000
|
2019-04-25 20:03:19 +02:00
|
|
|
- yarn run lint
|
2020-05-09 21:57:59 +02:00
|
|
|
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
2019-04-25 20:03:19 +02:00
|
|
|
- yarn run build
|
2020-05-05 23:34:58 +02:00
|
|
|
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
2018-09-08 17:51:34 +02:00
|
|
|
|
2019-04-25 20:03:19 +02:00
|
|
|
- name: static
|
|
|
|
image: kolaente/zip
|
2018-09-08 17:52:06 +02:00
|
|
|
pull: true
|
|
|
|
commands:
|
|
|
|
- cd dist
|
|
|
|
- zip -r ../vikunja-frontend-master.zip *
|
|
|
|
- cd ..
|
2019-04-25 20:05:12 +02:00
|
|
|
depends_on: [ build ]
|
2018-09-08 17:44:29 +02:00
|
|
|
|
2019-04-25 20:05:12 +02:00
|
|
|
- name: release
|
2018-09-08 17:44:29 +02:00
|
|
|
image: plugins/s3:1
|
|
|
|
pull: true
|
2019-04-25 20:03:19 +02:00
|
|
|
settings:
|
2020-03-01 22:53:40 +01:00
|
|
|
bucket: vikunja
|
2019-04-25 20:03:19 +02: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 22:53:40 +01:00
|
|
|
target: /frontend/
|
2019-04-25 20:05:12 +02:00
|
|
|
depends_on: [ static ]
|
2019-04-25 20:03:19 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: release-version
|
2018-09-08 17:44:29 +02:00
|
|
|
|
2019-04-25 20:03:19 +02:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
|
|
|
|
steps:
|
2020-05-09 22:09:46 +02:00
|
|
|
- name: fetch-tags
|
|
|
|
image: docker:git
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
|
|
|
|
2019-04-25 20:03:19 +02:00
|
|
|
- name: build
|
2020-05-08 21:59:06 +02:00
|
|
|
image: node:13
|
2019-04-25 20:03:19 +02:00
|
|
|
pull: true
|
|
|
|
group: build-static
|
|
|
|
commands:
|
2020-06-23 09:18:17 +02:00
|
|
|
- yarn --frozen-lockfile --network-timeout 100000
|
2019-04-25 20:03:19 +02:00
|
|
|
- yarn run lint
|
2020-05-09 21:57:59 +02:00
|
|
|
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
2019-04-25 20:03:19 +02:00
|
|
|
- yarn run build
|
2020-05-05 23:34:58 +02:00
|
|
|
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
2019-04-25 20:03:19 +02:00
|
|
|
|
|
|
|
- name: static
|
|
|
|
image: kolaente/zip
|
|
|
|
pull: true
|
|
|
|
commands:
|
|
|
|
- cd dist
|
|
|
|
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
|
|
|
|
- cd ..
|
2019-04-25 20:05:12 +02:00
|
|
|
depends_on: [ build ]
|
2019-04-25 20:03:19 +02:00
|
|
|
|
2019-04-25 20:05:12 +02:00
|
|
|
- name: release
|
2018-09-08 17:44:29 +02:00
|
|
|
image: plugins/s3:1
|
|
|
|
pull: true
|
2019-04-25 20:03:19 +02:00
|
|
|
settings:
|
2020-03-01 22:53:40 +01:00
|
|
|
bucket: vikunja
|
2019-04-25 20:03:19 +02: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 22:53:40 +01:00
|
|
|
target: /frontend/
|
2019-04-25 20:05:12 +02:00
|
|
|
depends_on: [ static ]
|
2018-09-08 17:44:29 +02:00
|
|
|
|
2020-06-22 13:55:03 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: docker-arm-release
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: arm
|
|
|
|
|
|
|
|
trigger:
|
2020-06-22 19:13:43 +02:00
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- "refs/tags/**"
|
2020-06-22 13:55:03 +02:00
|
|
|
|
|
|
|
steps:
|
2020-06-22 16:32:36 +02:00
|
|
|
- name: fetch-tags
|
|
|
|
image: docker:git
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
2020-06-22 13:55:03 +02:00
|
|
|
- name: docker
|
2020-06-22 18:37:09 +02:00
|
|
|
image: plugins/docker:linux-arm
|
2020-06-22 13:55:03 +02:00
|
|
|
pull: true
|
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
repo: vikunja/frontend
|
|
|
|
auto_tag: true
|
2020-06-22 22:19:53 +02:00
|
|
|
auto_tag_suffix: linux-arm
|
2020-06-22 16:32:36 +02:00
|
|
|
depends_on: [ fetch-tags ]
|
2020-06-22 13:55:03 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: docker-amd64-release
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
trigger:
|
2020-06-22 19:13:43 +02:00
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- "refs/tags/**"
|
2020-04-06 21:58:49 +02:00
|
|
|
|
2020-06-22 13:55:03 +02:00
|
|
|
steps:
|
2020-06-22 16:32:36 +02:00
|
|
|
- name: fetch-tags
|
|
|
|
image: docker:git
|
|
|
|
commands:
|
|
|
|
- git fetch --tags
|
2020-06-22 13:55:03 +02:00
|
|
|
- name: docker
|
2020-06-22 18:30:02 +02:00
|
|
|
image: plugins/docker:linux-amd64
|
2020-06-22 13:55:03 +02:00
|
|
|
pull: true
|
|
|
|
settings:
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
repo: vikunja/frontend
|
|
|
|
auto_tag: true
|
2020-06-22 18:30:02 +02:00
|
|
|
auto_tag_suffix: linux-amd64
|
2020-06-22 16:32:36 +02:00
|
|
|
depends_on: [ fetch-tags ]
|
2020-06-22 18:57:20 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: docker-manifest
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- "refs/tags/**"
|
|
|
|
|
|
|
|
depends_on:
|
2020-06-22 19:13:43 +02:00
|
|
|
- docker-amd64-release
|
|
|
|
- docker-arm-release
|
2020-06-22 18:57:20 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: manifest
|
|
|
|
pull: always
|
|
|
|
image: plugins/manifest
|
|
|
|
settings:
|
|
|
|
auto_tag: true
|
|
|
|
ignore_missing: true
|
|
|
|
spec: docker-manifest.tmpl
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
|
2020-06-22 19:13:43 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: notify
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
ref:
|
|
|
|
- refs/heads/master
|
|
|
|
- "refs/tags/**"
|
|
|
|
|
|
|
|
depends_on:
|
|
|
|
- release-version
|
|
|
|
- release-latest
|
|
|
|
- docker-manifest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: telegram
|
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: TELEGRAM_TOKEN
|
|
|
|
to:
|
|
|
|
from_secret: TELEGRAM_TO
|
|
|
|
message: >
|
|
|
|
{{repo.owner}}/{{repo.name}}: \[{{build.status}}] Build {{build.number}}
|
|
|
|
{{commit.author}} pushed to {{commit.branch}} {{commit.sha}}: `{{commit.message}}`
|
|
|
|
Build started at {{datetime build.started "2006-Jan-02T15:04:05Z" "GMT+2"}} finished at {{datetime build.finished "2006-Jan-02T15:04:05Z" "GMT+2"}}.
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
|
|
|
- failure
|