rf-testing/.drone.yml
surtur d23811d014
Some checks failed
continuous-integration/drone/push Build is failing
proper execution scheduling
2020-05-10 05:15:41 +02:00

134 lines
3.1 KiB
YAML

---
kind: pipeline
name: test-set-default
platform:
arch: amd64
steps:
- name: reveal-env
pull: always
image: immawanderer/archlinux-rf:latest
volumes:
- name: shm
path: /dev/shm
commands:
- uname -r
- python --version
- robot --version || echo "rf loves to exit with code $(robot --version 2>&1 >/dev/null; echo $?)"
- mkdir -pv /archives
- mkdir -pv /results/${DRONE_STAGE_NAME}
- name: test000
pull: if-not-exists
image: immawanderer/archlinux-rf:latest
volumes:
- name: shm
path: /dev/shm
commands:
- 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
depends_on:
- reveal-env
- name: archives
pull: if-not-exists
image: immawanderer/archlinux-rf:latest
volumes:
- name: shm
path: /dev/shm
commands:
- 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
- cp -vR /archives .
when:
status:
- success
- failure
depends_on:
- test000
---
kind: pipeline
name: upload
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: 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
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: discord
pull: always
image: appleboy/drone-discord:1.2.4
settings:
message: "{{#success build.status}} ✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.\nevent: **`{{build.event}}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{else}} ❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.\nevent: **`${DRONE_BUILD_EVENT}`**\ncommit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`\n```{{commit.message}}``` {{/success}}\n"
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token