mentorenwahl/.drone.yml

221 lines
3.8 KiB
YAML
Raw Normal View History

2022-01-10 11:52:49 +00:00
---
kind: pipeline
type: docker
name: default
2022-02-07 18:38:30 +00:00
2022-01-10 11:52:49 +00:00
steps:
2022-01-11 17:33:41 +00:00
- name: shellcheck
image: koalaman/shellcheck-alpine
commands:
2022-02-17 20:27:00 +00:00
- cd scripts
2022-01-29 17:11:38 +00:00
- find -name "*.sh" | xargs shellcheck
2022-02-16 21:03:03 +00:00
- name: markdownlint
image: markdownlint/markdownlint
commands:
2022-02-17 20:27:00 +00:00
- cd docs
2022-02-16 21:03:03 +00:00
- find -name "*.md" | xargs mdl
2022-02-17 20:27:00 +00:00
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
2022-02-18 17:33:39 +00:00
restore: true
2022-02-17 20:27:00 +00:00
mount:
2022-02-18 17:59:23 +00:00
- ./docs
2022-02-16 21:03:03 +00:00
- name: docs
image: michaelfbryan/mdbook-docker-image
2022-02-17 20:27:00 +00:00
volumes:
- name: cache
path: /cache
2022-02-16 21:03:03 +00:00
commands:
2022-02-17 20:27:00 +00:00
- cd docs
2022-02-16 21:07:21 +00:00
- mdbook build
2022-02-18 17:46:25 +00:00
- rm -rf /cache/*
2022-02-18 17:49:47 +00:00
- mkdir /cache/docs
2022-02-17 20:37:29 +00:00
- mv book/* /cache/docs
2022-02-16 21:03:03 +00:00
depends_on:
- markdownlint
2022-02-17 20:27:00 +00:00
- restore-cache
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
2022-02-18 17:59:23 +00:00
- ./docs
2022-02-17 20:27:00 +00:00
depends_on:
- docs
volumes:
- name: cache
host:
path: /tmp/cache
2022-01-15 18:18:10 +00:00
---
kind: pipeline
type: docker
2022-01-23 08:16:44 +00:00
name: backend
2022-02-07 18:38:30 +00:00
2022-01-15 18:18:10 +00:00
steps:
- name: ameba
2022-01-10 12:59:03 +00:00
image: veelenga/ameba
commands:
2022-02-17 20:27:00 +00:00
- cd docker/backend
- ameba micrate/src src
2022-01-15 18:18:10 +00:00
- name: pgsanity
2022-01-10 13:04:07 +00:00
image: boechat107/pgsanity
commands:
2022-01-29 16:02:57 +00:00
- pgsanity docker/backend/db/**/*.sql
2022-02-07 18:38:30 +00:00
- name: deps
image: crystallang/crystal:1.3-alpine
volumes:
- name: lib
2022-02-07 18:42:10 +00:00
path: /drone/src/docker/backend/lib
2022-02-07 18:38:30 +00:00
commands:
2022-02-17 20:27:00 +00:00
- cd docker/backend
2022-02-07 18:38:30 +00:00
- shards install
2022-02-17 20:27:00 +00:00
- name: docs
2022-02-07 18:38:30 +00:00
image: crystallang/crystal:1.3-alpine
volumes:
- name: lib
2022-02-07 18:42:10 +00:00
path: /drone/src/docker/backend/lib
2022-02-07 18:04:02 +00:00
commands:
2022-02-17 20:27:00 +00:00
- cd docker/backend
2022-02-07 18:25:18 +00:00
- make docs
2022-02-07 18:28:19 +00:00
depends_on:
- ameba
2022-02-07 18:40:43 +00:00
- deps
2022-01-29 17:13:34 +00:00
- name: build
2022-01-29 15:56:37 +00:00
image: tmaier/docker-compose
2022-01-10 12:25:59 +00:00
volumes:
- name: dockersock
path: /var/run/docker.sock
2022-01-10 12:16:48 +00:00
commands:
- cp .example.env .env
2022-01-29 15:56:37 +00:00
- docker-compose build --build-arg BUILD_ENV=development backend
2022-01-10 12:59:03 +00:00
depends_on:
2022-01-15 18:18:10 +00:00
- ameba
- pgsanity
2022-02-07 18:38:30 +00:00
2022-01-10 12:25:59 +00:00
volumes:
2022-02-07 18:38:30 +00:00
- name: lib
temp: {}
2022-01-10 12:25:59 +00:00
- name: dockersock
host:
path: /var/run/docker.sock
2022-02-07 18:38:30 +00:00
2022-02-18 17:43:45 +00:00
depends_on:
2022-02-18 17:47:16 +00:00
- default
2022-02-18 17:43:45 +00:00
2022-01-29 15:56:37 +00:00
---
kind: pipeline
type: docker
name: frontend
2022-02-07 18:38:30 +00:00
2022-01-29 15:56:37 +00:00
steps:
2022-01-29 17:13:34 +00:00
- name: build
2022-01-29 15:56:37 +00:00
image: tmaier/docker-compose
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- docker-compose build --build-arg BUILD_ENV=development frontend
2022-02-07 18:38:30 +00:00
2022-01-29 15:56:37 +00:00
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
2022-02-17 17:37:28 +00:00
2022-02-18 17:48:58 +00:00
depends_on:
- default
2022-02-17 17:37:28 +00:00
---
kind: pipeline
type: docker
name: deploy
steps:
2022-02-17 20:27:00 +00:00
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
2022-02-17 17:37:28 +00:00
settings:
2022-02-17 20:27:00 +00:00
restore: true
mount:
2022-02-18 17:59:23 +00:00
- ./docs
2022-02-17 20:27:00 +00:00
- name: deploy
image: alpine
environment:
HOST:
2022-02-17 17:37:28 +00:00
from_secret: docs_deploy_ssh_host
2022-02-17 20:27:00 +00:00
USER:
2022-02-17 17:37:28 +00:00
from_secret: docs_deploy_ssh_user
2022-02-17 20:27:00 +00:00
PASSWORD:
2022-02-17 17:37:28 +00:00
from_secret: docs_deploy_ssh_password
2022-02-17 20:27:00 +00:00
volumes:
- name: cache
path: /cache
commands:
2022-02-17 20:35:54 +00:00
- apk add --no-cache sshpass
2022-02-17 20:27:00 +00:00
- ls /cache/docs
volumes:
- name: cache
host:
path: /tmp/cache
2022-02-17 17:37:28 +00:00
depends_on:
- default
- backend
- frontend
trigger:
event:
- promote
target:
- production
2022-02-18 17:54:52 +00:00
---
kind: pipeline
type: docker
name: clear-cache
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
2022-02-18 17:59:23 +00:00
- ./docs
2022-02-18 17:54:52 +00:00
- name: clear-cache
image: alpine
commands:
- rm -rf /cache/*
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
2022-02-18 17:59:23 +00:00
- ./docs
2022-02-18 17:54:52 +00:00
volumes:
- name: cache
host:
path: /tmp/cache
depends_on:
- default
- backend
- frontend
- deploy