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.

119 lines
3.7KB

  1. workspace:
  2. base: /media/sf_GOPATH1/src/git.openprivacy.ca/openprivacy/
  3. path: lockbox
  4. pipeline:
  5. build-linux:
  6. mem_limit: 3G
  7. image: therecipe/qt:linux_static
  8. when:
  9. repo: openprivacy/lockbox
  10. branch: master
  11. event: [ push, pull_request ]
  12. environment:
  13. - QT_DIR=/opt/Qt
  14. - QT_DOCKER='true'
  15. - QT_API=5.13.0
  16. - GO111MODULE=on
  17. commands:
  18. - export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
  19. - apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git openssh-client
  20. - go mod download
  21. - git fetch --tags
  22. - export VERSION=`git describe --tags`
  23. - export BUILDDATE=`date +%G-%m-%d-%H-%M`
  24. - go mod vendor
  25. - qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build linux
  26. - cp README.md deploy/linux
  27. - export FILENAME=lockbox-linux-$BUILDDATE.tar.gz
  28. - cd deploy
  29. - mv linux lockbox
  30. - tar -czf $FILENAME lockbox
  31. - sha256sum $FILENAME > $FILENAME.sha256
  32. - rm -r lockbox
  33. build-windows:
  34. mem_limit: 3G
  35. image: therecipe/qt:windows_64_static
  36. when:
  37. repo: openprivacy/lockbox
  38. branch: [ master, windows_build ]
  39. event: push
  40. environment:
  41. - QT_DIR=/opt/Qt
  42. - QT_DOCKER='true'
  43. - QT_API=5.13.0
  44. - GO111MODULE=on
  45. commands:
  46. - export PATH=$PATH:/home/user/work/bin:/media/sf_GOPATH1/bin
  47. - apt-get -qq update && apt-get --no-install-recommends -qq -y install ca-certificates curl git zip
  48. - rm -r vendor || true
  49. - make clean || true
  50. - go mod download
  51. - export VERSION=`git describe --tags`
  52. - export BUILDDATE=`date +%G-%m-%d-%H-%M`
  53. - go mod vendor
  54. - qtdeploy -ldflags "-X main.buildVer=$VERSION -X main.buildDate=$BUILDDATE" build windows
  55. - cp README.md deploy/windows
  56. - cd deploy
  57. - mv windows lockbox
  58. - export FILENAME=lockbox-windows-$BUILDDATE.zip
  59. - zip -r $FILENAME lockbox
  60. - sha256sum $FILENAME > $FILENAME.sha256
  61. - rm -r lockbox
  62. deploy-buildfiles:
  63. image: pivotaldata/concourse-ssh
  64. secrets: [buildfiles_key]
  65. when:
  66. repo: openprivacy/lockbox
  67. branch: master
  68. event: push
  69. status: [ success ]
  70. commands:
  71. - apk add --no-cache git
  72. - echo $BUILDFILES_KEY > ~/id_rsab64
  73. - base64 -d ~/id_rsab64 > ~/id_rsa
  74. - chmod 400 ~/id_rsa
  75. - export DIR=`date +%G.%m.%d-%H.%M`-`git describe --tags`
  76. - cd deploy
  77. - mkdir $DIR
  78. - mv lockbox* $DIR/
  79. - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
  80. deploy-windows-build:
  81. image: pivotaldata/concourse-ssh
  82. secrets: [buildfiles_key]
  83. when:
  84. repo: openprivacy/lockbox
  85. branch: windows_build
  86. event: push
  87. status: [ success ]
  88. commands:
  89. - apk add --no-cache git
  90. - echo $BUILDFILES_KEY > ~/id_rsab64
  91. - base64 -d ~/id_rsab64 > ~/id_rsa
  92. - chmod 400 ~/id_rsa
  93. - git fetch --tags
  94. - export DIR=`date +%G.%m.%d-%H.%M`-`git describe --tags`
  95. - cd deploy
  96. - mkdir -p windows_build/$DIR
  97. - mv lockbox* windows_build/$DIR/
  98. - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa windows_build buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
  99. notify-email:
  100. image: drillster/drone-email
  101. host: build.openprivacy.ca
  102. port: 25
  103. skip_verify: true
  104. from: drone@openprivacy.ca
  105. when:
  106. repo: openprivacy/lockbox
  107. branch: master
  108. status: [ failure ]
  109. notify-gogs:
  110. image: openpriv/drone-gogs
  111. when:
  112. repo: openprivacy/lockbox
  113. branch: master
  114. event: pull_request
  115. status: [ success, changed, failure ]
  116. secrets: [gogs_account_token]
  117. gogs_url: https://git.openprivacy.ca