From b1bfee3fd97f761da9719efdaf6452fe3949c9cf Mon Sep 17 00:00:00 2001 From: surtur Date: Sun, 10 May 2020 04:09:42 +0200 Subject: [PATCH] completely reworked pipelines + added b2 support --- .drone.yml | 92 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 78 insertions(+), 14 deletions(-) diff --git a/.drone.yml b/.drone.yml index 03c33c5..5ea141f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,10 +16,8 @@ steps: - uname -r - python --version - robot --version || echo "rf loves to exit with code $(robot --version 2>&1 >/dev/null; echo $?)" - - pwd - - ls -la - - ls -la / - - export test=justatestvar + - mkdir -pv /archives + - mkdir -pv /results/${DRONE_STAGE_NAME} - name: test000 pull: if-not-exists @@ -28,31 +26,98 @@ steps: - name: shm path: /dev/shm commands: - - robot test000.robot + - mkdir -pv /results/${DRONE_STAGE_NAME}/${DRONE_STEP_NAME} + - robot -T -d /results/${DRONE_STAGE_NAME}/${DRONE_STEP_NAME} test000.robot when: status: - success - failure -- name: report000 + +--- +kind: pipeline +name: prepare-ul + +platform: + os: linux + arch: amd64 + +clone: + disable: true + +trigger: + branch: + - master + - dev + event: + - push + - tag + status: + - success + - failure + +depends_on: + - test-set-default + +steps: +- name: archives pull: if-not-exists image: immawanderer/archlinux-rf:latest volumes: - name: shm path: /dev/shm commands: - - cat log.html - - cat output.xml - - cat report.html - - pwd - - ls -la - - echo $test - - ls -la / + - tar cfv /archives/$(date +%Y-%m-%dT%H-%M-%S)-results-${DRONE_COMMIT_SHA:0:7}.tar.zstd /results --zstd + - sha512sum /archives/*results*zstd > /archives/$(ls /archives/*results*zstd)-SHA512SUM + - curl -sS https://dotya.ml/store/0x28bd2388.asc | gpg --quiet --import - + - gpg -eR 28bd2388 /archives/$(ls /archives/*results*zstd) || gpg --s2k-mode 3 --s2k-count 65011712 --s2k-digest-algo SHA512 --s2k-cipher-algo AES256 /archives/$(ls /archives/*results*zstd) + - sha512sum /archives/*zstd.gpg > /archives/$(ls /archives/*zstd.gpg)-SHA512SUM + - rm /archives/*results*zstd /archives/*results*zstd-SHA512SUM + - ls -la /archives when: status: - success - failure +--- +kind: pipeline +name: upload + +platform: + os: linux + arch: amd64 + +clone: + disable: true + +trigger: + branch: + - master + - dev + event: + - push + - tag + status: + - success + - failure + +depends_on: + - prepare-ul + +steps: + - name: b2 + pull: always + image: techknowlogick/drone-b2:latest + bucket: robot-test + account: + from_secret: b2_account + key: + from_secret: b2_key + source: /archives/* + target: results + strip_prefix: /archives/ + + --- kind: pipeline name: notifications @@ -68,7 +133,6 @@ trigger: branch: - master - dev - - "release/*" event: - push - tag