Build docker image in CI
This commit is contained in:
parent
030f857f15
commit
2e0776d64a
179
.drone.yml
179
.drone.yml
@ -1,89 +1,106 @@
|
|||||||
pipeline:
|
kind: pipeline
|
||||||
restore-cache-dev:
|
name: build
|
||||||
image: drillster/drone-volume-cache
|
|
||||||
restore: true
|
|
||||||
mount:
|
|
||||||
- public
|
|
||||||
volumes:
|
|
||||||
- /home/gitea/gitea/drone_build_cache/staging.vbrandl.net:/cache
|
|
||||||
when:
|
|
||||||
branch: develop
|
|
||||||
|
|
||||||
restore-cache-prod:
|
steps:
|
||||||
image: drillster/drone-volume-cache
|
- name: docker
|
||||||
restore: true
|
image: plugins/docker
|
||||||
mount:
|
settings:
|
||||||
- public
|
repo: vbrandl/vbrandl.net
|
||||||
volumes:
|
auto_tag: true
|
||||||
- /home/gitea/gitea/drone_build_cache/vbrandl.net:/cache
|
username:
|
||||||
when:
|
from_secret: docker_username
|
||||||
branch: master
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
# - refs/tags/v*
|
||||||
|
|
||||||
build-dev:
|
# pipeline:
|
||||||
image: plugins/hugo:latest
|
# restore-cache-dev:
|
||||||
buildDrafts: true
|
# image: drillster/drone-volume-cache
|
||||||
buildFuture: true
|
# restore: true
|
||||||
buildExpired: true
|
# mount:
|
||||||
hugoVersion: "0.49"
|
# - public
|
||||||
validate: true
|
# volumes:
|
||||||
url: https://staging.vbrandl.net
|
# - /home/gitea/gitea/drone_build_cache/staging.vbrandl.net:/cache
|
||||||
when:
|
# when:
|
||||||
branch: develop
|
# branch: develop
|
||||||
|
|
||||||
build-prod:
|
# restore-cache-prod:
|
||||||
image: plugins/hugo:latest
|
# image: drillster/drone-volume-cache
|
||||||
buildDrafts: false
|
# restore: true
|
||||||
buildFuture: false
|
# mount:
|
||||||
buildExpired: false
|
# - public
|
||||||
hugoVersion: "0.49"
|
# volumes:
|
||||||
validate: true
|
# - /home/gitea/gitea/drone_build_cache/vbrandl.net:/cache
|
||||||
url: https://www.vbrandl.net
|
# when:
|
||||||
when:
|
# branch: master
|
||||||
branch: master
|
|
||||||
|
|
||||||
compress:
|
# build-dev:
|
||||||
image: alpine:latest
|
# image: plugins/hugo:latest
|
||||||
commands:
|
# buildDrafts: true
|
||||||
- apk --no-cache update
|
# buildFuture: true
|
||||||
- apk add make
|
# buildExpired: true
|
||||||
- make -C public/ -f ../Makefile
|
# hugoVersion: "0.49"
|
||||||
|
# validate: true
|
||||||
|
# url: https://staging.vbrandl.net
|
||||||
|
# when:
|
||||||
|
# branch: develop
|
||||||
|
|
||||||
deploy-dev:
|
# build-prod:
|
||||||
image: drillster/drone-rsync
|
# image: plugins/hugo:latest
|
||||||
hosts: [ "vbrandl.net" ]
|
# buildDrafts: false
|
||||||
target: /var/www/staging.vbrandl.net
|
# buildFuture: false
|
||||||
source: public/*
|
# buildExpired: false
|
||||||
user: hugo
|
# hugoVersion: "0.49"
|
||||||
secrets: [ rsync_key ]
|
# validate: true
|
||||||
when:
|
# url: https://www.vbrandl.net
|
||||||
branch: develop
|
# when:
|
||||||
|
# branch: master
|
||||||
|
|
||||||
deploy-prod:
|
# compress:
|
||||||
image: drillster/drone-rsync
|
# image: alpine:latest
|
||||||
hosts: [ "vbrandl.net" ]
|
# commands:
|
||||||
target: /var/www/vbrandl.net
|
# - apk --no-cache update
|
||||||
source: public/*
|
# - apk add make
|
||||||
user: hugo
|
# - make -C public/ -f ../Makefile
|
||||||
secrets: [ rsync_key ]
|
|
||||||
when:
|
|
||||||
branch: master
|
|
||||||
|
|
||||||
rebuild-cache-dev:
|
# deploy-dev:
|
||||||
image: drillster/drone-volume-cache
|
# image: drillster/drone-rsync
|
||||||
rebuild: true
|
# hosts: [ "vbrandl.net" ]
|
||||||
mount:
|
# target: /var/www/staging.vbrandl.net
|
||||||
- public
|
# source: public/*
|
||||||
volumes:
|
# user: hugo
|
||||||
- /home/gitea/gitea/drone_build_cache/staging.vbrandl.net:/cache
|
# secrets: [ rsync_key ]
|
||||||
when:
|
# when:
|
||||||
branch: develop
|
# branch: develop
|
||||||
|
|
||||||
rebuild-cache-prod:
|
# deploy-prod:
|
||||||
image: drillster/drone-volume-cache
|
# image: drillster/drone-rsync
|
||||||
rebuild: true
|
# hosts: [ "vbrandl.net" ]
|
||||||
mount:
|
# target: /var/www/vbrandl.net
|
||||||
- public
|
# source: public/*
|
||||||
volumes:
|
# user: hugo
|
||||||
- /home/gitea/gitea/drone_build_cache/vbrandl.net:/cache
|
# secrets: [ rsync_key ]
|
||||||
when:
|
# when:
|
||||||
branch: master
|
# branch: master
|
||||||
|
|
||||||
|
# rebuild-cache-dev:
|
||||||
|
# image: drillster/drone-volume-cache
|
||||||
|
# rebuild: true
|
||||||
|
# mount:
|
||||||
|
# - public
|
||||||
|
# volumes:
|
||||||
|
# - /home/gitea/gitea/drone_build_cache/staging.vbrandl.net:/cache
|
||||||
|
# when:
|
||||||
|
# branch: develop
|
||||||
|
|
||||||
|
# rebuild-cache-prod:
|
||||||
|
# image: drillster/drone-volume-cache
|
||||||
|
# rebuild: true
|
||||||
|
# mount:
|
||||||
|
# - public
|
||||||
|
# volumes:
|
||||||
|
# - /home/gitea/gitea/drone_build_cache/vbrandl.net:/cache
|
||||||
|
# when:
|
||||||
|
# branch: master
|
||||||
|
Loading…
x
Reference in New Issue
Block a user