mentorenwahl/.drone.yml

205 lines
3.7 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: 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-17 20:27:00 +00:00
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
2022-02-18 19:40:59 +00:00
- ./docs/book
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
2023-03-10 18:13:11 +00:00
---
kind: pipeline
type: docker
name: auth
steps:
- name: build
2023-03-10 18:21:39 +00:00
image: docker.io/docker
2023-03-10 18:13:11 +00:00
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
2023-03-11 08:08:53 +00:00
- docker compose build auth --progress plain
2023-03-10 18:13:11 +00:00
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
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-10-31 08:47:26 +00:00
- cd backend
2022-02-17 20:27:00 +00:00
- ameba micrate/src src
2022-02-18 19:49:38 +00:00
- name: deps
2023-03-09 17:19:53 +00:00
image: crystallang/crystal:1.7.3-alpine
2022-02-18 19:49:38 +00:00
volumes:
- name: lib
2022-10-31 08:47:26 +00:00
path: /drone/src/backend/lib
2022-02-18 20:13:38 +00:00
- name: cache
path: /cache
2022-02-18 19:49:38 +00:00
commands:
2022-10-31 08:47:26 +00:00
- cd backend
2022-02-18 19:49:38 +00:00
- shards install
2022-02-17 20:27:00 +00:00
- name: docs
2023-03-09 17:19:53 +00:00
image: crystallang/crystal:1.7.3-alpine
2022-02-07 18:38:30 +00:00
volumes:
2022-02-18 20:13:38 +00:00
- name: lib
2022-10-31 08:47:26 +00:00
path: /drone/src/backend/lib
2022-11-01 12:48:03 +00:00
- name: cache
path: /cache
2022-02-07 18:04:02 +00:00
commands:
2022-10-31 08:47:26 +00:00
- cd 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-02-18 18:08:29 +00:00
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
2022-10-31 08:47:26 +00:00
- ./backend/docs
2022-02-18 18:08:29 +00:00
depends_on:
- docs
2022-01-29 17:13:34 +00:00
- name: build
2023-03-10 18:21:39 +00:00
image: docker.io/docker
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:
2023-03-11 08:08:53 +00:00
- docker compose build api --progress plain
2022-01-10 12:59:03 +00:00
depends_on:
2022-01-15 18:18:10 +00:00
- ameba
2022-02-07 18:38:30 +00:00
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
2022-11-01 12:52:46 +00:00
- name: cache
host:
path: /tmp/cache
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
2023-03-10 18:21:39 +00:00
image: docker.io/docker
2022-01-29 15:56:37 +00:00
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
2023-03-11 08:08:53 +00:00
- docker compose build frontend --progress plain
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
---
kind: pipeline
type: docker
name: deploy-docs
2022-02-17 17:37:28 +00:00
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 19:40:59 +00:00
- ./docs/book
2022-10-31 08:47:26 +00:00
- ./backend/docs
2022-02-20 20:18:42 +00:00
- name: prepare-pages
image: bitnami/git
2022-02-17 20:27:00 +00:00
volumes:
- name: cache
path: /cache
2022-02-21 13:53:55 +00:00
- name: pages
2022-02-21 14:05:48 +00:00
path: /tmp/pages
2022-02-17 20:27:00 +00:00
commands:
2022-11-13 18:15:53 +00:00
- git clone --depth 1 --branch pages https://git.dergrimm.net/mentorenwahl/mentorenwahl.git /tmp/pages_old
- cp -r /tmp/pages_old/.git /tmp/pages
- cp -r ./docs/book/* /tmp/pages
- mkdir -p /tmp/pages/_api/backend
- cp -r ./backend/docs/* /tmp/pages/_api/backend
2022-02-19 07:18:57 +00:00
depends_on:
2022-02-20 20:18:42 +00:00
- restore-cache
2022-11-01 12:56:48 +00:00
- name: deploy-pages
image: appleboy/drone-git-push
volumes:
- name: pages
path: /tmp/pages
settings:
remote:
from_secret: deploy_remote
force: false
commit: true
commit_message: "[CI] Deploy pages"
branch: pages
local_ref: pages
path: /tmp/pages
depends_on:
- prepare-pages
2022-02-20 19:44:58 +00:00
2022-02-17 20:27:00 +00:00
volumes:
- name: cache
host:
path: /tmp/cache
2022-02-21 13:53:55 +00:00
- name: pages
temp: {}
2022-02-17 17:37:28 +00:00
depends_on:
- default
2023-03-10 18:13:11 +00:00
- auth
2022-02-17 17:37:28 +00:00
- backend
- frontend
trigger:
branch:
- main
2022-02-17 17:37:28 +00:00
event:
- push
2022-12-17 11:27:31 +00:00
- promote