Update deploy pipeline
This commit is contained in:
parent
4fba8136fe
commit
6c4d5ccb19
80
.drone.yml
80
.drone.yml
|
@ -7,20 +7,51 @@ steps:
|
|||
- name: shellcheck
|
||||
image: koalaman/shellcheck-alpine
|
||||
commands:
|
||||
- cd scripts/
|
||||
- cd scripts
|
||||
- find -name "*.sh" | xargs shellcheck
|
||||
- name: markdownlint
|
||||
image: markdownlint/markdownlint
|
||||
commands:
|
||||
- cd docs/
|
||||
- cd docs
|
||||
- find -name "*.md" | xargs mdl
|
||||
- name: restore-cache
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- ./docs
|
||||
- name: docs
|
||||
image: michaelfbryan/mdbook-docker-image
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
commands:
|
||||
- cd docs/
|
||||
- cd docs
|
||||
- mdbook build
|
||||
- mkdir -p /cache/docs
|
||||
- mv ./docs/book/* /cache/docs
|
||||
depends_on:
|
||||
- markdownlint
|
||||
- restore-cache
|
||||
- name: rebuild-cache
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
settings:
|
||||
rebuild: true
|
||||
mount:
|
||||
- ./docs
|
||||
depends_on:
|
||||
- docs
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /tmp/cache
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
|
@ -31,8 +62,8 @@ steps:
|
|||
- name: ameba
|
||||
image: veelenga/ameba
|
||||
commands:
|
||||
- cd docker/backend/
|
||||
- ameba micrate/src/ src/
|
||||
- cd docker/backend
|
||||
- ameba micrate/src src
|
||||
- name: pgsanity
|
||||
image: boechat107/pgsanity
|
||||
commands:
|
||||
|
@ -43,15 +74,15 @@ steps:
|
|||
- name: lib
|
||||
path: /drone/src/docker/backend/lib
|
||||
commands:
|
||||
- cd docker/backend/
|
||||
- cd docker/backend
|
||||
- shards install
|
||||
- name: documentation
|
||||
- name: docs
|
||||
image: crystallang/crystal:1.3-alpine
|
||||
volumes:
|
||||
- name: lib
|
||||
path: /drone/src/docker/backend/lib
|
||||
commands:
|
||||
- cd docker/backend/
|
||||
- cd docker/backend
|
||||
- make docs
|
||||
depends_on:
|
||||
- ameba
|
||||
|
@ -87,7 +118,6 @@ steps:
|
|||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- cp .example.env .env
|
||||
- docker-compose build --build-arg BUILD_ENV=development frontend
|
||||
|
||||
volumes:
|
||||
|
@ -101,18 +131,34 @@ type: docker
|
|||
name: deploy
|
||||
|
||||
steps:
|
||||
- name: deploy
|
||||
image: appleboy/drone-ssh
|
||||
- name: restore-cache
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
settings:
|
||||
host:
|
||||
restore: true
|
||||
mount:
|
||||
- ./docs
|
||||
- name: deploy
|
||||
image: alpine
|
||||
environment:
|
||||
HOST:
|
||||
from_secret: docs_deploy_ssh_host
|
||||
username:
|
||||
USER:
|
||||
from_secret: docs_deploy_ssh_user
|
||||
password:
|
||||
PASSWORD:
|
||||
from_secret: docs_deploy_ssh_password
|
||||
port: 22
|
||||
script:
|
||||
- echo "Hello World!"
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
commands:
|
||||
- ls /cache/docs
|
||||
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /tmp/cache
|
||||
|
||||
depends_on:
|
||||
- default
|
||||
|
|
Loading…
Reference in a new issue