Deploy BunnyCDN purge test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-05-09 17:06:38 +02:00
parent ee899cdb8e
commit 71ad577e6a

View File

@@ -12,129 +12,148 @@ steps:
# #
# Restore cache (node_modules, build, etc) # Restore cache (node_modules, build, etc)
# #
- name: cache-restore # - name: cache-restore
image: meltwater/drone-cache:dev # image: meltwater/drone-cache:dev
pull: true # pull: true
volumes: # volumes:
- name: cache # - name: cache
path: /tmp/cache # path: /tmp/cache
settings: # settings:
backend: "filesystem" # backend: "filesystem"
restore: true # restore: true
cache_key: "volume" # cache_key: "volume"
archive_format: "gzip" # archive_format: "gzip"
mount: # mount:
- "node_modules" # - "node_modules"
# #
# # Build Node.js app
# #
# - name: build-node
# image: node:latest
# commands:
# - npm install -s
# - npm run build
# #
# # Build the Docker image
# #
# # DEV
# - name: build-docker-dev
# image: docker:latest
# volumes:
# - name: docker_sock
# path: /var/run/docker.sock
# commands:
# - docker build --pull --no-cache -t cetrucflotte/housesof:dev .
# when:
# branch:
# - dev
# # PROD
# - name: build-docker-prod
# image: docker:latest
# volumes:
# - name: docker_sock
# path: /var/run/docker.sock
# commands:
# - docker build --pull --no-cache -t cetrucflotte/housesof:latest .
# when:
# branch:
# - master
# #
# # Restart container
# #
# # DEV
# - name: restart-container-dev
# image: appleboy/drone-ssh
# settings:
# host: housesof.world
# username:
# from_secret: ssh_user
# key:
# from_secret: ssh_key
# script:
# - cd /data/sites/housesof.world/test
# - docker-compose down
# - docker-compose up -d --remove-orphans
# when:
# branch:
# - dev
# # PROD
# - name: restart-container-prod
# image: appleboy/drone-ssh
# settings:
# host: housesof.world
# username:
# from_secret: ssh_user
# key:
# from_secret: ssh_key
# script:
# - cd /data/sites/housesof.world/www
# - docker-compose down
# - docker-compose up -d --remove-orphans
# when:
# branch:
# - master
# #
# Build Node.js app # Purge CDN
#
- name: build-node
image: node:latest
commands:
- npm install -s
- npm run build
#
# Build the Docker image
# #
# DEV # DEV
- name: build-docker-dev - name: cdn-purge-dev
image: docker:latest image: plugins/webhook
volumes: settings:
- name: docker_sock urls:
path: /var/run/docker.sock # from_secret: cdn_purgeurl_dev
commands: - https://bunnycdn.com/api/pullzone/132513/purgeCache
- docker build --pull --no-cache -t cetrucflotte/housesof:dev . headers:
from_secret: cdn_accesskey
debug: true
when: when:
branch: branch:
- dev - dev
# PROD
- name: build-docker-prod
image: docker:latest
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- docker build --pull --no-cache -t cetrucflotte/housesof:latest .
when:
branch:
- master
#
# Restart container
#
# DEV
- name: restart-container-dev
image: appleboy/drone-ssh
settings:
host: flayks.com
username:
from_secret: ssh_user
key:
from_secret: ssh_key
script:
- cd /data/sites/housesof.world/dev
- docker-compose down
- docker-compose up -d --remove-orphans
when:
branch:
- dev
# PROD
- name: restart-container-prod
image: appleboy/drone-ssh
settings:
host: flayks.com
username:
from_secret: ssh_user
key:
from_secret: ssh_key
script:
- cd /data/sites/housesof.world/www
- docker-compose down
- docker-compose up -d --remove-orphans
when:
branch:
- master
# #
# Rebuild cache # Rebuild cache
# #
- name: cache-rebuild # - name: cache-rebuild
image: meltwater/drone-cache:dev # image: meltwater/drone-cache:dev
pull: true # pull: true
volumes: # volumes:
- name: cache # - name: cache
path: /tmp/cache # path: /tmp/cache
settings: # settings:
backend: "filesystem" # backend: "filesystem"
rebuild: true # rebuild: true
cache_key: "volume" # cache_key: "volume"
archive_format: "gzip" # archive_format: "gzip"
mount: # mount:
- "node_modules" # - "node_modules"
# # #
# Notify (by Email) # # Notify (by Email)
# # #
- name: notify-email # - name: notify-email
image: drillster/drone-email # image: drillster/drone-email
settings: # settings:
skip_verify: true # skip_verify: true
host: mail.flayks.com # host: mail.flayks.com
username: admin@flayks.com # username: admin@flayks.com
password: # password:
from_secret: notify_email_password # from_secret: notify_email_password
from: admin@flayks.com # from: admin@flayks.com
recipients: # recipients:
- admin@flayks.com # - admin@flayks.com
recipients_only: true # recipients_only: true
# Mount cache volume # Mount cache volume