mirror of
https://github.com/go-vikunja/app
synced 2025-02-08 07:42:20 +00:00
128 lines
2.8 KiB
YAML
128 lines
2.8 KiB
YAML
kind: pipeline
|
|
name: testing
|
|
|
|
workspace:
|
|
base: /home/cirrus/app
|
|
|
|
clone:
|
|
depth: 50
|
|
|
|
# Only run on prs or pushes to master
|
|
trigger:
|
|
branch:
|
|
include:
|
|
- master
|
|
event:
|
|
include:
|
|
- push
|
|
- pull_request
|
|
|
|
steps:
|
|
- name: build
|
|
image: cirrusci/flutter:stable
|
|
pull: true
|
|
commands:
|
|
- 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 format-check
|
|
- make build-debug
|
|
|
|
# Don't run tests until we have to not break the pipeline
|
|
# - name: test
|
|
# image: cirrusci/flutter:stable
|
|
# pull: true
|
|
# commands:
|
|
# - flutter packages get
|
|
# - make test
|
|
|
|
---
|
|
kind: pipeline
|
|
name: release-latest
|
|
|
|
depends_on:
|
|
- testing
|
|
|
|
trigger:
|
|
branch:
|
|
- master
|
|
event:
|
|
- push
|
|
|
|
workspace:
|
|
base: /home/cirrus/app
|
|
|
|
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
|
|
image: cirrusci/flutter:stable
|
|
pull: true
|
|
commands:
|
|
- 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
|
|
|
|
# Push the releases to our pseudo-s3-bucket
|
|
- 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
|
|
strip_prefix: apks/
|
|
source: apks/*
|
|
target: /app/master
|
|
|
|
---
|
|
kind: pipeline
|
|
name: release-version
|
|
|
|
depends_on:
|
|
- testing
|
|
|
|
trigger:
|
|
event:
|
|
- tag
|
|
|
|
workspace:
|
|
base: /home/cirrus/app
|
|
|
|
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
|
|
image: cirrusci/flutter:stable
|
|
pull: true
|
|
commands:
|
|
- 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
|
|
# Push the releases to our pseudo-s3-bucket
|
|
- 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
|
|
strip_prefix: apks/
|
|
source: apks/*
|
|
target: /app/${DRONE_TAG##v}
|