2019-03-15 22:14:37 +00:00
kind : pipeline
name : testing
workspace :
2020-01-12 12:59:28 +00:00
base : /home/cirrus/app
2019-03-15 22:14:37 +00:00
clone :
depth : 50
2020-01-12 12:59:28 +00:00
# Only run on prs or pushes to master
trigger :
branch :
include :
- master
event :
include :
- push
- pull_request
2019-03-15 22:14:37 +00:00
steps :
- name : build
2020-01-12 12:59:28 +00:00
image : cirrusci/flutter:stable
2019-03-15 22:14:37 +00:00
pull : true
commands :
2020-01-12 12:59:28 +00:00
- sudo chown cirrus . -R # The clone step clones everything as root, this is our "fix" until we find a better solution
2019-03-15 22:14:37 +00:00
- flutter packages get
- make format-check
- make build-debug
- name : test
2020-01-15 22:38:02 +00:00
image : cirrusci/flutter:stable
2019-03-15 22:14:37 +00:00
pull : true
commands :
- flutter packages get
- make test
---
kind : pipeline
name : release-latest
depends_on :
- testing
trigger :
branch :
2020-01-12 12:59:28 +00:00
- master
2019-03-15 22:14:37 +00:00
event :
2020-01-12 12:59:28 +00:00
- push
2019-03-15 22:14:37 +00:00
2018-09-23 10:41:28 +00:00
workspace :
2020-01-12 12:59:28 +00:00
base : /home/cirrus/app
2018-09-23 10:41:28 +00:00
clone :
2019-03-15 22:14:37 +00:00
depth : 50
steps :
# Because drone separates the pipelines, we have to add the build step to this pipeline. This is double code, we should change it at some point if possible.
- name : build
2020-01-12 12:59:28 +00:00
image : cirrusci/flutter:stable
2019-03-15 22:14:37 +00:00
pull : true
commands :
2020-01-12 12:59:28 +00:00
- sudo chown cirrus . -R # The clone step clones everything as root, this is our "fix" until we find a better solution
- flutter packages get
- make build-all
- mkdir apks
- mv build/app/outputs/apk/*/*/*.apk apks
2019-03-15 22:14:37 +00:00
# Push the releases to our pseudo-s3-bucket
- name : release
2018-09-23 10:41:28 +00:00
image : plugins/s3:1
pull : true
2019-03-15 22:14:37 +00:00
settings :
bucket : vikunja-app
access_key :
from_secret : aws_access_key_id
secret_key :
from_secret : aws_secret_access_key
endpoint : https://storage.kolaente.de
path_style : true
strip_prefix : apks/
source : apks/*
target : /master
---
kind : pipeline
name : release-version
depends_on :
- testing
trigger :
event :
2020-01-12 12:59:28 +00:00
- tag
2019-03-15 22:14:37 +00:00
workspace :
2020-01-12 12:59:28 +00:00
base : /home/cirrus/app
2019-03-15 22:14:37 +00:00
clone :
depth : 50
steps :
# Because drone separates the pipelines, we have to add the build step to this pipeline. This is double code, we should change it at some point if possible.
- name : build
2020-01-12 12:59:28 +00:00
image : cirrusci/flutter:stable
2019-03-15 22:14:37 +00:00
pull : true
commands :
2020-01-12 12:59:28 +00:00
- sudo chown cirrus . -R # The clone step clones everything as root, this is our "fix" until we find a better solution
- flutter packages get
- make build-all
- mkdir apks
- mv build/app/outputs/apk/*/*/*.apk apks
2019-03-15 22:14:37 +00:00
# Push the releases to our pseudo-s3-bucket
- name : release
2018-09-23 10:41:28 +00:00
image : plugins/s3:1
pull : true
2019-03-15 22:14:37 +00:00
settings :
bucket : vikunja-app
access_key :
from_secret : aws_access_key_id
secret_key :
from_secret : aws_secret_access_key
endpoint : https://storage.kolaente.de
path_style : true
strip_prefix : apks/
source : apks/*
target : /${DRONE_TAG##v}