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
Raw Normal View History

2018-09-23 10:41:28 +00:00
workspace:
base: /app
clone:
git:
image: plugins/git
depth: 50
tags: true
pipeline:
2018-09-23 14:18:06 +00:00
upload_to_macos:
image: appleboy/drone-scp
host: home.jonasfranz.software
secrets: [ ssh_username, ssh_key ]
2018-09-23 20:17:07 +00:00
port: 2222
2018-09-23 14:18:06 +00:00
source: ./
2018-09-23 14:40:29 +00:00
target: /tmp/drone_build_${DRONE_BUILD_NUMBER}
when:
event: [ push, tag]
2018-09-23 14:18:06 +00:00
2018-09-23 10:41:28 +00:00
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
2018-09-23 19:32:12 +00:00
group: build
2018-09-23 10:41:28 +00:00
pull: true
commands:
- flutter packages get
- make build-all
- mkdir apks
2018-09-23 16:04:00 +00:00
- mv build/app/outputs/apk/*/*/*.apk apks
2018-09-23 10:41:28 +00:00
when:
event: [ push, tag ]
2018-09-23 14:40:29 +00:00
build_ios:
image: appleboy/drone-ssh
2018-09-23 19:32:12 +00:00
group: build
2018-09-23 14:40:29 +00:00
host: home.jonasfranz.software
2018-09-23 20:17:07 +00:00
port: 2222
2018-09-23 14:40:29 +00:00
secrets: [ ssh_username, ssh_key ]
2018-09-23 20:26:07 +00:00
command_timeout: 900
2018-09-23 14:40:29 +00:00
script:
2018-09-23 20:59:03 +00:00
- source ~/.bash_profile
2018-09-23 20:26:07 +00:00
- export EXPANDED_CODE_SIGN_IDENTITY=""
2018-09-23 20:30:30 +00:00
- cd /tmp/drone_build_${DRONE_BUILD_NUMBER}/ios
2018-09-23 20:26:07 +00:00
- pod install
- cd ..
2018-09-23 14:40:29 +00:00
- flutter packages get
- make build-ios-all
when:
2018-10-08 15:57:43 +00:00
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 ]
2018-09-23 10:41:28 +00:00
# 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 ]
2018-09-23 14:45:25 +00:00
clean_ios:
image: appleboy/drone-ssh
host: home.jonasfranz.software
2018-09-23 20:17:07 +00:00
port: 2222
2018-09-23 14:45:25 +00:00
secrets: [ ssh_username, ssh_key ]
script:
- rm -rf /tmp/drone_build_${DRONE_BUILD_NUMBER}
when:
status: [ failure, success ]
event: [ push, tag]