2020-09-08 08:53:03 +02:00
|
|
|
---
|
|
|
|
|
kind: pipeline
|
|
|
|
|
name: linters
|
|
|
|
|
steps:
|
|
|
|
|
- name: run shellcheck
|
2021-07-05 18:39:43 +02:00
|
|
|
image: koalaman/shellcheck-alpine
|
2020-09-08 08:53:03 +02:00
|
|
|
commands:
|
2020-10-25 21:16:42 +01:00
|
|
|
- shellcheck abra
|
2021-04-02 15:39:02 +02:00
|
|
|
- shellcheck bin/*.sh
|
2021-07-05 18:39:43 +02:00
|
|
|
- shellcheck deploy/install.abra.coopcloud.tech/installer
|
2020-10-25 21:17:01 +01:00
|
|
|
|
2021-04-02 15:42:28 +02:00
|
|
|
- name: run flake8
|
2021-07-05 18:39:43 +02:00
|
|
|
image: alpine/flake8
|
2021-04-02 15:42:28 +02:00
|
|
|
commands:
|
2021-07-05 18:39:43 +02:00
|
|
|
- flake8 --max-line-length 100 bin/*.py
|
2021-04-02 15:42:28 +02:00
|
|
|
|
2020-10-26 11:25:55 +01:00
|
|
|
- name: run unit tests
|
2021-06-03 09:11:50 +02:00
|
|
|
image: decentral1se/docker-dind-bats-kcov
|
2020-10-26 11:25:55 +01:00
|
|
|
commands:
|
2020-11-01 16:52:36 +02:00
|
|
|
- bats tests
|
2020-10-26 11:20:17 +01:00
|
|
|
|
2021-07-05 18:39:43 +02:00
|
|
|
- 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
|
|
|
|
|
|
2021-06-03 09:43:44 +02:00
|
|
|
- name: publish image
|
|
|
|
|
image: plugins/docker
|
|
|
|
|
settings:
|
2021-06-03 21:01:39 +02:00
|
|
|
auto_tag: true
|
2021-06-17 21:00:43 +02:00
|
|
|
username: thecoopcloud
|
2021-06-03 09:43:44 +02:00
|
|
|
password:
|
2021-06-17 21:00:43 +02:00
|
|
|
from_secret: thecoopcloud_password
|
|
|
|
|
repo: thecoopcloud/abra
|
2021-06-03 09:43:44 +02:00
|
|
|
tags: latest
|
|
|
|
|
depends_on:
|
|
|
|
|
- run shellcheck
|
|
|
|
|
- run flake8
|
2021-06-03 09:44:25 +02:00
|
|
|
- run unit tests
|
2021-07-05 18:39:43 +02:00
|
|
|
- test installation script
|
2021-06-08 12:27:50 +02:00
|
|
|
when:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- pull_request
|
2021-06-03 09:43:44 +02:00
|
|
|
|
2021-06-05 07:25:41 +02:00
|
|
|
- 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
|
2021-07-05 18:39:43 +02:00
|
|
|
- test installation script
|
2021-06-05 07:25:41 +02:00
|
|
|
- publish image
|
2021-06-08 12:27:50 +02:00
|
|
|
when:
|
|
|
|
|
event:
|
|
|
|
|
exclude:
|
|
|
|
|
- pull_request
|
2021-06-05 07:25:41 +02:00
|
|
|
|
|
|
|
|
- name: notify on failure
|
2021-06-03 23:26:33 +02:00
|
|
|
image: plugins/matrix
|
2021-01-29 13:44:55 +02:00
|
|
|
settings:
|
2021-06-03 23:26:33 +02:00
|
|
|
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
|
2021-07-05 18:39:43 +02:00
|
|
|
- test installation script
|
2021-06-05 07:25:41 +02:00
|
|
|
- publish image
|
|
|
|
|
- trigger downstream builds
|
2021-01-29 13:44:55 +02:00
|
|
|
when:
|
|
|
|
|
status:
|
|
|
|
|
- failure
|
2020-09-08 08:53:03 +02:00
|
|
|
trigger:
|
|
|
|
|
branch:
|
2020-09-08 08:54:54 +02:00
|
|
|
- main
|