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-08-02 20:05:51 +00:00
|
|
|
image: therecipe/qt:linux_static
|
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:
|
2019-02-22 00:59:07 +00:00
|
|
|
- QT_DIR=/opt/Qt
|
|
|
|
- QT_DOCKER='true'
|
2019-08-02 18:06:48 +00:00
|
|
|
- QT_API=5.13.0
|
2019-02-20 20:59:37 +00:00
|
|
|
commands:
|
2019-02-22 21:49:59 +00:00
|
|
|
- export GOPATH=$GOPATH:/media/sf_GOPATH1/
|
2019-02-22 00:59:07 +00:00
|
|
|
- export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
|
2019-03-14 23:42:42 +00:00
|
|
|
- apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git openssh-client
|
2019-08-13 21:38:05 +00:00
|
|
|
- export GO111MODULE=on
|
2019-08-13 21:56:54 +00:00
|
|
|
- go mod download
|
2019-08-13 22:17:18 +00:00
|
|
|
- export GO111MODULE=off
|
2019-08-13 21:38:05 +00:00
|
|
|
- go mod vendor
|
2019-08-13 22:13:47 +00:00
|
|
|
- rm -rf vendor/github.com/therecipe
|
2019-08-02 18:06:48 +00:00
|
|
|
- $QT_DIR/$QT_API/gcc_64/bin/lrelease ui.pro
|
2019-03-29 20:01:43 +00:00
|
|
|
- git fetch --tags
|
2019-03-29 19:43:48 +00:00
|
|
|
- export VERSION=`git describe --tags`
|
|
|
|
- export BUILDDATE=`date +%G-%m-%d-%H-%M`
|
2019-03-29 20:01:43 +00:00
|
|
|
- qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build linux
|
2019-03-29 19:43:48 +00:00
|
|
|
- export FILENAME=cwtch-linux-$BUILDDATE.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'
|
2019-08-02 18:06:48 +00:00
|
|
|
- QT_API=5.13.0
|
2019-02-27 21:52:11 +00:00
|
|
|
- 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
|
2019-08-13 21:17:09 +00:00
|
|
|
- export GO111MODULE=on
|
2019-02-27 21:52:11 +00:00
|
|
|
- go get -d
|
2019-03-29 21:51:35 +00:00
|
|
|
- export VERSION=`git describe --tags`
|
|
|
|
- export BUILDDATE=`date +%G-%m-%d-%H-%M`
|
|
|
|
- qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build android
|
2019-03-04 21:26:12 +00:00
|
|
|
- cd deploy
|
2019-03-29 21:51:35 +00:00
|
|
|
- export FILENAME=cwtch-android-$BUILDDATE.apk
|
2019-03-04 21:26:12 +00:00
|
|
|
- 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-08-02 20:05:51 +00:00
|
|
|
image: therecipe/qt:windows_64_static
|
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'
|
2019-08-02 18:06:48 +00:00
|
|
|
- QT_API=5.13.0
|
2019-03-02 20:10:32 +00:00
|
|
|
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
|
2019-08-13 21:17:09 +00:00
|
|
|
- export GO111MODULE=on
|
2019-03-02 20:10:32 +00:00
|
|
|
- go get -d
|
2019-03-29 21:51:35 +00:00
|
|
|
- export VERSION=`git describe --tags`
|
|
|
|
- export BUILDDATE=`date +%G-%m-%d-%H-%M`
|
|
|
|
- qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" 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-29 21:51:35 +00:00
|
|
|
- export FILENAME=cwtch-windows-$BUILDDATE.zip
|
2019-03-04 21:26:12 +00:00
|
|
|
- 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-08-09 20:28:17 +00:00
|
|
|
- export DIR=`date +%G.%m.%d-%H.%M`-`git describe --tags`
|
2019-03-04 20:25:31 +00:00
|
|
|
- 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
|