ui/.drone.yml

119 lines
3.6 KiB
YAML
Raw Permalink Normal View History

2019-02-20 20:36:16 +00:00
workspace:
2019-02-25 19:47:48 +00:00
base: /media/sf_GOPATH1/src/cwtch.im
path: ui
2019-02-20 20:36:16 +00:00
pipeline:
2019-02-20 21:02:07 +00:00
build-linux:
2019-03-04 20:31:17 +00:00
mem_limit: 3G
2019-02-20 20:59:37 +00:00
image: therecipe/qt:linux
2019-03-04 22:00:40 +00:00
when:
2019-03-04 22:15:07 +00:00
repo: cwtch.im/ui
2019-03-05 20:22:11 +00:00
branch: master
2019-03-04 22:00:40 +00:00
event: [ push, pull_request ]
2019-02-20 21:39:54 +00:00
environment:
- QT_DIR=/opt/Qt
- QT_DOCKER='true'
- QT_API=5.12.0
2019-02-20 20:59:37 +00:00
commands:
2019-02-22 21:49:59 +00:00
- export GOPATH=$GOPATH:/media/sf_GOPATH1/
- export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
2019-02-27 20:24:39 +00:00
- apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git openssh-client
2019-02-24 03:52:37 +00:00
- go get -d
2019-02-20 20:36:16 +00:00
- qtdeploy build linux
2019-02-27 20:24:39 +00:00
- export FILENAME=cwtch-linux-`date +%G-%m-%d-%H-%M`.tar.gz
2019-03-04 20:25:31 +00:00
- cd deploy
- mv linux cwtch
- tar -czf $FILENAME cwtch
2019-03-04 21:26:12 +00:00
- sha256sum $FILENAME > $FILENAME.sha256
2019-03-04 20:25:31 +00:00
- rm -r cwtch
2019-02-27 21:52:11 +00:00
build-android:
2019-03-04 20:31:17 +00:00
mem_limit: 3G
2019-02-27 21:52:11 +00:00
image: therecipe/qt:android
2019-03-04 22:00:40 +00:00
when:
2019-03-04 22:15:07 +00:00
repo: cwtch.im/ui
2019-03-05 20:22:11 +00:00
branch: master
2019-03-04 22:00:40 +00:00
event: push
2019-02-27 21:52:11 +00:00
environment:
- QT_DIR=/opt/Qt
- QT_DOCKER='true'
- QT_API=5.12.0
- ANDROID_NDK_DIR=/home/user/android-ndk-r18b
- ANDROID_SDK_DIR=/home/user/android-sdk-linux
commands:
- export GOPATH=$GOPATH:/media/sf_GOPATH1/
- export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
2019-03-02 20:10:32 +00:00
- apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git
2019-02-27 21:52:11 +00:00
- find -iname 'moc*' | xargs rm
- find -iname 'rcc*' | xargs rm
- go get -d
- qtdeploy build android
2019-03-04 21:26:12 +00:00
- cd deploy
- export FILENAME=cwtch-android-`date +%G-%m-%d-%H-%M`.apk
- cp android/build-debug.apk $FILENAME
- sha256sum $FILENAME > $FILENAME.sha256
2019-03-02 20:10:32 +00:00
build-windows:
2019-03-04 20:31:17 +00:00
mem_limit: 3G
2019-03-02 20:10:32 +00:00
image: therecipe/qt:windows_64_shared
2019-03-04 22:00:40 +00:00
when:
2019-03-04 22:15:07 +00:00
repo: cwtch.im/ui
2019-03-05 20:22:11 +00:00
branch: master
2019-03-04 22:00:40 +00:00
event: push
2019-03-02 20:10:32 +00:00
environment:
- QT_DIR=/opt/Qt
- QT_DOCKER='true'
- QT_API=5.12.0
- ANDROID_NDK_DIR=/home/user/android-ndk-r18b
- ANDROID_SDK_DIR=/home/user/android-sdk-linux
commands:
- export GOPATH=$GOPATH:/media/sf_GOPATH1/
- export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
- apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git zip
- find -iname 'moc*' | xargs rm
- find -iname 'rcc*' | xargs rm
- go get -d
- qtdeploy build windows
2019-03-04 20:31:17 +00:00
- cp -r windows/* deploy/windows
2019-03-04 20:25:31 +00:00
- cd deploy
- mv windows cwtch
2019-03-04 21:26:12 +00:00
- export FILENAME=cwtch-windows-`date +%G-%m-%d-%H-%M`.zip
- zip -r $FILENAME cwtch
- sha256sum $FILENAME > $FILENAME.sha256
2019-03-04 20:25:31 +00:00
- rm -r cwtch
2019-02-27 21:52:11 +00:00
deploy-buildfiles:
image: pivotaldata/concourse-ssh
2019-02-27 22:17:49 +00:00
secrets: [buildfiles_key]
2019-02-27 21:52:11 +00:00
when:
2019-03-04 22:15:07 +00:00
repo: cwtch.im/ui
2019-03-05 20:22:11 +00:00
branch: master
2019-02-27 21:52:11 +00:00
event: push
status: [ success ]
commands:
2019-03-04 21:09:18 +00:00
- apk add --no-cache git
2019-02-27 21:52:11 +00:00
- echo $BUILDFILES_KEY > ~/id_rsab64
- base64 -d ~/id_rsab64 > ~/id_rsa
- chmod 400 ~/id_rsa
2019-03-04 20:25:31 +00:00
- export DIR=`date +%G.%m.%d-%H.%M`-`git rev-parse --short HEAD`
- cd deploy
- mkdir $DIR
- mv cwtch* $DIR/
2019-03-04 21:09:18 +00:00
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
2019-02-20 20:36:16 +00:00
notify-email:
image: drillster/drone-email
host: build.openprivacy.ca
port: 25
skip_verify: true
from: drone@openprivacy.ca
when:
2019-03-05 20:22:11 +00:00
repo: cwtch.im/ui
branch: master
2019-02-20 20:36:16 +00:00
status: [ failure ]
notify-gogs:
image: openpriv/drone-gogs
when:
2019-03-05 20:22:11 +00:00
repo: cwtch.im/ui
branch: master
2019-02-20 20:36:16 +00:00
event: pull_request
status: [ success, changed, failure ]
secrets: [gogs_account_token]
gogs_url: https://git.openprivacy.ca