add: docker-compose-build pipeline
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

* general refactoring of .drone.yml
This commit is contained in:
surtur 2020-10-03 20:50:00 +02:00
parent 68fe603c04
commit 4896480b00
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -36,10 +36,8 @@ platform:
arch: amd64 arch: amd64
trigger: trigger:
branch: branch: [master, testing]
- master event: pull_request
event:
- pull_request
depends_on: depends_on:
- pull - pull
@ -57,23 +55,21 @@ steps:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: docker-build name: docker-compose-build
platform: platform:
os: linux os: linux
arch: amd64 arch: amd64
trigger: trigger:
branch: branch: master
- master event: pull_request
event:
- pull_request
depends_on: depends_on:
- build - build
steps: steps:
- name: docker-build - name: build
pull: always pull: always
image: tmaier/docker-compose:latest image: tmaier/docker-compose:latest
volumes: volumes:
@ -91,7 +87,7 @@ volumes:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: deploy name: deploy-staging
platform: platform:
os: linux os: linux
@ -99,15 +95,12 @@ platform:
trigger: trigger:
branch: branch:
- master
- testing - testing
event: event:
exclude: exclude: [pull_request, tag]
- pull_request
- tag
depends_on: depends_on:
- docker-build - build
steps: steps:
- name: hugo-extended - name: hugo-extended
@ -126,7 +119,7 @@ steps:
status: status:
- success - success
branch: branch:
- master - testing
depends_on: depends_on:
- hugo-extended - hugo-extended
environment: environment:
@ -142,6 +135,63 @@ steps:
- rsync -av --delete --chown $OL public/ $OL@dotya.ml:$OL_D - rsync -av --delete --chown $OL public/ $OL@dotya.ml:$OL_D
---
kind: pipeline
type: docker
name: deploy
platform:
os: linux
arch: amd64
trigger:
branch:
- master
event:
exclude: [pull_request, tag]
depends_on:
- build
steps:
- name: hugo-extended
pull: if-not-exists
image: immawanderer/fedora-hugo:latest
commands:
- git submodule init
- git submodule update
- hugo version
- hugo --gc=true --minify
- name: rm-intermediate
pull: if-not-exists
image: immawanderer/fedora-hugo:latest
depends_on:
- hugo-extended
commands:
- rm -rf ./public
- name: build
pull: always
image: tmaier/docker-compose:latest
depends_on:
- rm-intermediate
volumes:
- name: s
path: /var/run/docker.sock
commands:
- docker stop homepage || true
- docker-compose up --build -d
when:
branch: master
status: success
volumes:
- name: s
host:
path: /var/run/docker.sock
--- ---
kind: pipeline kind: pipeline
name: notifications name: notifications
@ -164,8 +214,7 @@ trigger:
- success - success
- failure - failure
depends_on: depends_on: [deploy, deploy-staging]
- deploy
steps: steps:
- name: discord - name: discord