This repository has been archived on 2021-07-03. You can view files and clone it, but cannot push or open issues or pull requests.
abra/.drone.yml
2021-07-05 23:48:03 +02:00

89 lines
2.0 KiB
YAML

---
kind: pipeline
name: linters
steps:
- name: run shellcheck
image: koalaman/shellcheck-alpine
commands:
- shellcheck abra
- shellcheck bin/*.sh
- shellcheck deploy/install.abra.coopcloud.tech/installer
- name: run flake8
image: alpine/flake8
commands:
- flake8 --max-line-length 100 bin/*.py
- name: run unit tests
image: decentral1se/docker-dind-bats-kcov
commands:
- bats tests
- name: test installation script
image: debian:buster
commands:
- apt update && apt install -yqq sudo lsb-release
- deploy/install.abra.coopcloud.tech/installer --no-prompt
- ~/.local/bin/abra version
- name: publish image
image: plugins/docker
settings:
auto_tag: true
username: thecoopcloud
password:
from_secret: thecoopcloud_password
repo: thecoopcloud/abra
tags: latest
depends_on:
- run shellcheck
- run flake8
- run unit tests
- test installation script
when:
event:
exclude:
- pull_request
- name: trigger downstream builds
image: plugins/downstream
settings:
server: https://drone.autonomic.zone
token:
from_secret: decentral1se_token
fork: true
repositories:
- coop-cloud/drone-abra
depends_on:
- run shellcheck
- run flake8
- run unit tests
- test installation script
- publish image
when:
event:
exclude:
- pull_request
- name: notify on failure
image: plugins/matrix
settings:
homeserver: https://matrix.autonomic.zone
roomid: "IFazIpLtxiScqbHqoa:autonomic.zone"
userid: "@autono-bot:autonomic.zone"
accesstoken:
from_secret: autono_bot_access_token
depends_on:
- run shellcheck
- run flake8
- run unit tests
- test installation script
- publish image
- trigger downstream builds
when:
status:
- failure
trigger:
branch:
- main