This repository has been archived on 2022-04-20. You can view files and clone it, but cannot push or open issues or pull requests.
app/.drone.yml

118 lines
2.6 KiB
YAML

kind: pipeline
name: testing
workspace:
base: /app
clone:
depth: 50
steps:
- name: build
image: adamantium/flutter
pull: true
commands:
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
- flutter packages get
- make format-check
- make build-debug
- name: test
image: adamantium/flutter
pull: true
commands:
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
- flutter packages get
- make test
---
kind: pipeline
name: release-latest
depends_on:
- testing
trigger:
branch:
- master
event:
- push
workspace:
base: /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: adamantium/flutter
pull: true
commands:
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
- 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-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:
- tag
workspace:
base: /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: adamantium/flutter
pull: true
commands:
- apt-get update && apt-get install make # We do this here to not have to deal with updating the image itself
- 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-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}