Host a submission form on an untrusted or shared host by using public-key encryption!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.7 KiB

workspace:
base: /media/sf_GOPATH1/src/git.openprivacy.ca/openprivacy/
path: lockbox
pipeline:
build-linux:
mem_limit: 3G
image: therecipe/qt:linux_static
when:
repo: openprivacy/lockbox
branch: master
event: [ push, pull_request ]
environment:
- QT_DIR=/opt/Qt
- QT_DOCKER='true'
- QT_API=5.13.0
- GO111MODULE=on
commands:
- 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 openssh-client
- go mod download
- git fetch --tags
- export VERSION=`git describe --tags`
- export BUILDDATE=`date +%G-%m-%d-%H-%M`
- go mod vendor
- qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build linux
- cp README.md deploy/linux
- export FILENAME=lockbox-linux-$BUILDDATE.tar.gz
- cd deploy
- mv linux lockbox
- tar -czf $FILENAME lockbox
- sha256sum $FILENAME > $FILENAME.sha256
- rm -r lockbox
build-windows:
mem_limit: 3G
image: therecipe/qt:windows_64_static
when:
repo: openprivacy/lockbox
branch: [ master, windows_build ]
event: push
environment:
- QT_DIR=/opt/Qt
- QT_DOCKER='true'
- QT_API=5.13.0
- GO111MODULE=on
commands:
- 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
- rm -r vendor || true
- make clean || true
- go mod download
- export VERSION=`git describe --tags`
- export BUILDDATE=`date +%G-%m-%d-%H-%M`
- go mod vendor
- qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build windows
- cp README.md deploy/windows
- cd deploy
- mv windows lockbox
- export FILENAME=lockbox-windows-$BUILDDATE.zip
- zip -r $FILENAME lockbox
- sha256sum $FILENAME > $FILENAME.sha256
- rm -r lockbox
deploy-buildfiles:
image: pivotaldata/concourse-ssh
secrets: [buildfiles_key]
when:
repo: openprivacy/lockbox
branch: master
event: push
status: [ success ]
commands:
- apk add --no-cache git
- echo $BUILDFILES_KEY > ~/id_rsab64
- base64 -d ~/id_rsab64 > ~/id_rsa
- chmod 400 ~/id_rsa
- export DIR=`date +%G.%m.%d-%H.%M`-`git describe --tags`
- cd deploy
- mkdir $DIR
- mv lockbox* $DIR/
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
deploy-windows-build:
image: pivotaldata/concourse-ssh
secrets: [buildfiles_key]
when:
repo: openprivacy/lockbox
branch: windows_build
event: push
status: [ success ]
commands:
- apk add --no-cache git
- echo $BUILDFILES_KEY > ~/id_rsab64
- base64 -d ~/id_rsab64 > ~/id_rsa
- chmod 400 ~/id_rsa
- git fetch --tags
- export DIR=`date +%G.%m.%d-%H.%M`-`git describe --tags`
- cd deploy
- mkdir -p windows_build/$DIR
- mv lockbox* windows_build/$DIR/
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa windows_build buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
notify-email:
image: drillster/drone-email
host: build.openprivacy.ca
port: 25
skip_verify: true
from: drone@openprivacy.ca
when:
repo: openprivacy/lockbox
branch: master
status: [ failure ]
notify-gogs:
image: openpriv/drone-gogs
when:
repo: openprivacy/lockbox
branch: master
event: pull_request
status: [ success, changed, failure ]
secrets: [gogs_account_token]
gogs_url: https://git.openprivacy.ca