284 lines
5.8 KiB
YAML
284 lines
5.8 KiB
YAML
kind: pipeline
|
|
name: testing
|
|
|
|
trigger:
|
|
branch:
|
|
include:
|
|
- master
|
|
event:
|
|
include:
|
|
- push
|
|
- pull_request
|
|
|
|
steps:
|
|
- name: build
|
|
image: node:13
|
|
pull: true
|
|
group: build-static
|
|
commands:
|
|
- yarn --frozen-lockfile
|
|
- yarn run lint
|
|
- yarn run build
|
|
|
|
---
|
|
kind: pipeline
|
|
name: release-latest
|
|
|
|
trigger:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: fetch-tags
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
|
|
- name: build
|
|
image: node:13
|
|
pull: true
|
|
group: build-static
|
|
commands:
|
|
- yarn --frozen-lockfile
|
|
- yarn run lint
|
|
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
|
- yarn run build
|
|
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
|
|
|
- name: static
|
|
image: kolaente/zip
|
|
pull: true
|
|
commands:
|
|
- cd dist
|
|
- zip -r ../vikunja-frontend-master.zip *
|
|
- cd ..
|
|
depends_on: [ build ]
|
|
|
|
- name: release
|
|
image: plugins/s3:1
|
|
pull: true
|
|
settings:
|
|
bucket: vikunja
|
|
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
|
|
target: /frontend/
|
|
depends_on: [ static ]
|
|
|
|
- name: telegram
|
|
image: appleboy/drone-telegram
|
|
depends_on:
|
|
- release
|
|
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
|
|
|
|
---
|
|
kind: pipeline
|
|
name: release-version
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
|
|
steps:
|
|
- name: fetch-tags
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
|
|
- name: build
|
|
image: node:13
|
|
pull: true
|
|
group: build-static
|
|
commands:
|
|
- yarn --frozen-lockfile
|
|
- yarn run lint
|
|
- "echo '{\"VERSION\": \"'$(git describe --tags --always --abbrev=10 | sed 's/-/+/' | sed 's/^v//' | sed 's/-g/-/')'\"}' > src/version.json"
|
|
- yarn run build
|
|
- sed -i 's/http\:\\/\\/localhost\\:3456\\/api\\/v1/\\/api\\/v1/g' dist/index.html # Override the default api url used for developing
|
|
|
|
- name: static
|
|
image: kolaente/zip
|
|
pull: true
|
|
commands:
|
|
- cd dist
|
|
- zip -r ../vikunja-frontend-${DRONE_TAG##v}.zip *
|
|
- cd ..
|
|
depends_on: [ build ]
|
|
|
|
- name: release
|
|
image: plugins/s3:1
|
|
pull: true
|
|
settings:
|
|
bucket: vikunja
|
|
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
|
|
target: /frontend/
|
|
depends_on: [ static ]
|
|
|
|
- name: telegram
|
|
image: appleboy/drone-telegram
|
|
depends_on:
|
|
- release
|
|
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
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: docker-arm-latest
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm
|
|
|
|
trigger:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: fetch-tags
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
- name: docker
|
|
image: plugins/docker:linux-arm
|
|
pull: true
|
|
settings:
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
repo: vikunja/frontend
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-arm64
|
|
depends_on: [ fetch-tags ]
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: docker-arm-release
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
|
|
steps:
|
|
- name: fetch-tags
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
- name: docker
|
|
image: plugins/docker:linux-arm
|
|
pull: true
|
|
settings:
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
repo: vikunja/frontend
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-arm64
|
|
depends_on: [ fetch-tags ]
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: docker-amd64-latest
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: fetch-tags
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
- name: docker
|
|
image: plugins/docker:linux-amd64
|
|
pull: true
|
|
settings:
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
repo: vikunja/frontend
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-amd64
|
|
depends_on: [ fetch-tags ]
|
|
|
|
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: docker-amd64-release
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
|
|
steps:
|
|
- name: fetch-tags
|
|
image: docker:git
|
|
commands:
|
|
- git fetch --tags
|
|
- name: docker
|
|
image: plugins/docker:linux-amd64
|
|
pull: true
|
|
settings:
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
repo: vikunja/frontend
|
|
auto_tag: true
|
|
auto_tag_suffix: linux-amd64
|
|
depends_on: [ fetch-tags ]
|