2022-01-14 17:11:38 +01:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-02-06 14:51:22 +01:00
|
|
|
name: test
|
2022-01-14 17:11:38 +01:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
branch:
|
|
|
|
- senpai
|
2022-06-12 15:28:01 +02:00
|
|
|
- dev
|
2022-01-14 17:11:38 +01:00
|
|
|
steps:
|
|
|
|
- name: test-build
|
|
|
|
image: asciidoctor/docker-asciidoctor
|
|
|
|
commands:
|
2022-06-23 17:16:20 +02:00
|
|
|
- asciidoctor **/*.adoc
|
|
|
|
- name: verify-json
|
|
|
|
image: node:lts-alpine
|
|
|
|
commands:
|
|
|
|
- npm install -g ajv-cli ajv-formats
|
|
|
|
- ajv validate --spec=draft2020 -s ./list.schema.json -d ./list.json -c ajv-formats
|
2022-02-06 14:51:22 +01:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: ssh
|
|
|
|
name: deploy
|
|
|
|
depends_on:
|
|
|
|
- test
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
server:
|
|
|
|
host:
|
2022-02-06 14:53:01 +01:00
|
|
|
from_secret: ssh_host
|
2022-02-06 14:51:22 +01:00
|
|
|
user:
|
2022-02-06 14:53:01 +01:00
|
|
|
from_secret: ssh_user
|
2022-02-06 14:51:22 +01:00
|
|
|
ssh_key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
steps:
|
2022-06-23 17:16:20 +02:00
|
|
|
- name: pull-main
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- senpai
|
2022-06-12 15:28:01 +02:00
|
|
|
commands:
|
2022-06-12 15:37:00 +02:00
|
|
|
- cd /srv/website/content
|
|
|
|
- git config --global --add safe.directory /srv/website/content
|
|
|
|
- git switch senpai || true
|
2022-06-12 15:28:01 +02:00
|
|
|
- git pull
|
2022-06-23 17:16:20 +02:00
|
|
|
- name: pull-dev
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- dev
|
2022-02-06 14:51:22 +01:00
|
|
|
commands:
|
2022-06-12 15:33:48 +02:00
|
|
|
- cd /srv/website-dev/content
|
2022-06-12 15:37:00 +02:00
|
|
|
- git config --global --add safe.directory /srv/website-dev/content
|
|
|
|
- git switch dev || true
|
2022-06-23 17:16:20 +02:00
|
|
|
- git pull
|