auto-recipes-catalogue-json/.drone.yml

43 lines
1.5 KiB
YAML
Raw Normal View History

2021-06-05 06:11:56 +00:00
---
kind: pipeline
name: generate and publish new recipes.json
2021-06-05 06:11:56 +00:00
steps:
- name: generate recipes.json
image: thecoopcloud/drone-abra
2021-06-17 19:43:45 +00:00
environment:
SSH_KEY:
from_secret: abra_bot_deploy_key
DOCKER_PASS:
from_secret: docker_reg_passwd_3wc
2021-06-05 06:11:56 +00:00
commands:
- apk add --no-cache git openssh docker
2023-01-16 02:36:30 +00:00
- mkdir $HOME/.ssh/
2023-01-16 02:59:47 +00:00
- eval `ssh-agent`
- echo "$SSH_KEY" | ssh-add -
2023-01-16 02:45:54 +00:00
- ssh-keyscan -p 2222 -t rsa git.coopcloud.tech >> $HOME/.ssh/known_hosts
2023-01-16 02:49:32 +00:00
- chmod -R go-rwx $HOME/.ssh
2023-01-17 02:21:57 +00:00
- mkdir $HOME/.abra/
- GIT_SSH_COMMAND="ssh -o 'PubkeyAcceptedKeyTypes +ssh-rsa'" git clone ssh://git@git.coopcloud.tech:2222/coop-cloud/recipes-catalogue-json.git $HOME/.abra/catalogue
2023-01-17 02:24:36 +00:00
- "docker login -u 3wordchant -p \"$DOCKER_PASS\" index.docker.io"
# - abra catalogue generate
- echo >> $HOME/.abra/catalogue/recipes.json
2023-01-17 02:21:57 +00:00
- cat $HOME/.abra/catalogue/recipes.json
2023-01-17 02:42:43 +00:00
- "cd $HOME/.abra/catalogue/ && git checkout -b testing && git commit -a -m 'Chore: update catalogue' && git push --set-upstream origin testing"
2021-06-05 06:33:52 +00:00
2021-06-05 07:02:54 +00:00
- name: notify on failure
image: plugins/matrix
settings:
homeserver: https://matrix.autonomic.zone
roomid: "IFazIpLtxiScqbHqoa:autonomic.zone"
userid: "@autono-bot:autonomic.zone"
accesstoken:
2021-08-17 01:04:36 +00:00
from_secret: autonobot_rocketchat_access_token
2021-06-05 07:02:54 +00:00
depends_on:
2023-01-16 03:35:58 +00:00
- generate recipes.json
2021-06-05 07:02:54 +00:00
when:
status:
- failure
2021-06-05 06:11:56 +00:00
trigger:
branch:
- main