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

105 lines
2.5 KiB
YAML

workspace:
base: /app
clone:
git:
image: plugins/git
depth: 50
tags: true
pipeline:
upload_to_macos:
image: appleboy/drone-scp
host: home.jonasfranz.software
secrets: [ ssh_username, ssh_key ]
port: 2222
source: ./
target: /tmp/drone_build_${DRONE_BUILD_NUMBER}
when:
event: [ push, tag]
test:
image: nathansamson/flutter-builder-docker:v0.6.0
pull: true
commands:
- make test
when:
event: [ push, tag, pull_request ]
build:
image: nathansamson/flutter-builder-docker:v0.6.0
group: build
pull: true
commands:
- flutter packages get
- make build-all
- mkdir apks
- mv build/app/outputs/apk/*/*/*.apk apks
when:
event: [ push, tag ]
build_ios:
image: appleboy/drone-ssh
group: build
host: home.jonasfranz.software
port: 2222
secrets: [ ssh_username, ssh_key ]
command_timeout: 900
script:
- source ~/.bash_profile
- export EXPANDED_CODE_SIGN_IDENTITY=""
- cd /tmp/drone_build_${DRONE_BUILD_NUMBER}/ios
- pod install
- cd ..
- flutter packages get
- make build-ios-all
when:
event: [ push, tag ]
download_ios_artifacts:
image: vikunja/scp
secrets: [ ssh_username, ssh_key ]
commands:
- echo $ssh_key | scp -P 2222 -i /dev/stdin ${ssh_username}@home.jonasfranz.software:/tmp/drone_build_${DRONE_BUILD_NUMBER}/build/ios/iphoneos/* apks/
when:
event: [ push, tag ]
# Push the releases to our pseudo-s3-bucket
release:
image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: vikunja-app
endpoint: https://storage.kolaente.de
path_style: true
strip_prefix: apks/
source: apks/*
target: /${DRONE_TAG##v}
when:
event: [ tag ]
# Push the releases to our pseudo-s3-bucket
release:
image: plugins/s3:1
pull: true
secrets: [ aws_access_key_id, aws_secret_access_key ]
bucket: vikunja-app
endpoint: https://storage.kolaente.de
path_style: true
strip_prefix: apks/
source: apks/*
target: /master
when:
event: [ push ]
branch: [ master ]
clean_ios:
image: appleboy/drone-ssh
host: home.jonasfranz.software
port: 2222
secrets: [ ssh_username, ssh_key ]
script:
- rm -rf /tmp/drone_build_${DRONE_BUILD_NUMBER}
when:
status: [ failure, success ]
event: [ push, tag]