Drone: setup promote to production
Dieser Commit ist enthalten in:
Ursprung
8a44bd34e6
Commit
cfebecfcb8
1 geänderte Dateien mit 55 neuen und 0 gelöschten Zeilen
55
.drone.yml
55
.drone.yml
|
@ -35,3 +35,58 @@ trigger:
|
||||||
volumes:
|
volumes:
|
||||||
- name: cache
|
- name: cache
|
||||||
temp: {}
|
temp: {}
|
||||||
|
|
||||||
|
---
|
||||||
|
name: deploy to production
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: clone
|
||||||
|
image: registry.access.redhat.com/ubi9/nodejs-18:1-62.1692771036
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /opt/app-root/src
|
||||||
|
commands:
|
||||||
|
- mkdir ~/docs && cd ~/docs
|
||||||
|
- git clone $DRONE_REPO_LINK .
|
||||||
|
- git checkout $DRONE_COMMIT
|
||||||
|
- name: build
|
||||||
|
image: registry.access.redhat.com/ubi9/nodejs-18:1-62.1692771036
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /opt/app-root/src
|
||||||
|
commands:
|
||||||
|
- cd ~/docs
|
||||||
|
- npm install --only=production
|
||||||
|
- npm run build
|
||||||
|
- name: deploy to production
|
||||||
|
image: docker.io/appleboy/drone-scp:1.6.11
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
path: /opt/app-root/src
|
||||||
|
settings:
|
||||||
|
host: be.nick-slowinski.de
|
||||||
|
username: drone_nick-slowinski_de-docs
|
||||||
|
key:
|
||||||
|
from_secret: ssh_private_key-drone_nick-slowinski_de-docs
|
||||||
|
target: /var/www/nick-slowinski.de/docs
|
||||||
|
source: /opt/app-root/src/docs/build
|
||||||
|
rm: true
|
||||||
|
overwrite: true
|
||||||
|
strip_components: 5
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- promote
|
||||||
|
target:
|
||||||
|
- production
|
||||||
|
volumes:
|
||||||
|
- name: cache
|
||||||
|
temp: {}
|
Laden …
In neuem Issue referenzieren