batch-example/.drone.yml

126 lines
2.3 KiB
YAML
Raw Normal View History

2023-10-18 13:14:53 +00:00
---
kind: pipeline
type: docker
name: register
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
event:
exclude:
- promote
2023-10-18 14:34:15 +00:00
---
kind: pipeline
type: docker
2023-10-18 15:44:27 +00:00
name: convert
2023-10-18 14:34:15 +00:00
platform:
os: linux
arch: amd64
clone:
disable: false
steps:
2023-10-18 20:50:42 +00:00
- name: "convert to xml"
2023-10-18 14:34:15 +00:00
image: sigyl/zone-10-batch2yaml:latest
2023-10-18 15:40:55 +00:00
when:
branch:
- master
2023-10-18 14:34:15 +00:00
commands:
- node /app/servers/apps/batch2yaml/build/index.js . xml
2023-10-18 15:40:55 +00:00
volumes:
- name: dockersock
path: /var/run
- name: "convert to yml"
image: sigyl/zone-10-batch2yaml:latest
when:
branch:
2023-10-18 20:50:42 +00:00
- deployed
2023-10-18 15:40:55 +00:00
commands:
2023-10-18 14:40:25 +00:00
- node /app/servers/apps/batch2yaml/build/index.js . yml
2023-10-18 14:34:15 +00:00
volumes:
- name: dockersock
path: /var/run
2023-10-18 18:15:03 +00:00
- name: "git - status"
when:
branch:
- master
2023-10-18 20:50:42 +00:00
- deployed
2023-10-18 18:15:03 +00:00
image: alpine/git:latest
commands:
- git status
volumes:
- name: dockersock
path: /var/run
2023-10-18 15:58:38 +00:00
- name: "git - deployed"
when:
branch:
- master
2023-10-18 15:40:55 +00:00
image: alpine/git:latest
commands:
2023-10-18 18:22:55 +00:00
- git config credential.helper '!f() { sleep 1; echo "username=$${GIT_USER}"; echo "password=$${GIT_PASSWORD}"; }; f'
2023-10-18 18:09:12 +00:00
- git add -A
2023-10-18 20:32:43 +00:00
- git commit -m "$${DRONE_COMMIT_MESSAGE}"
2023-10-18 20:50:42 +00:00
- git push -f origin deployed
2023-10-18 18:21:52 +00:00
environment:
GIT_PASSWORD:
from_secret: GIT_PASSWORD
GIT_USER:
from_secret: GIT_USER
2023-10-18 20:50:42 +00:00
- name: "git - product-development"
when:
branch:
- deployed
image: alpine/git:latest
commands:
- git config credential.helper '!f() { sleep 1; echo "username=$${GIT_USER}"; echo "password=$${GIT_PASSWORD}"; }; f'
- git add -A
- git commit -m "$${DRONE_COMMIT_MESSAGE}"
- git push -f origin product-development
environment:
GIT_PASSWORD:
from_secret: GIT_PASSWORD
GIT_USER:
from_secret: GIT_USER
2023-10-18 15:40:55 +00:00
volumes:
- name: dockersock
path: /var/run
2023-10-18 14:34:15 +00:00
services:
- name: docker
image: docker:19.03.12-dind@sha256:8dded163e463f4a59bf305b3dca98e312b2cfb89a43da3872e48f95a7554c48f
privileged: true
volumes:
- name: dockersock
path: /var/run
- name: ca
path: /etc/docker/certs.d
- name: daemonjson
path: /etc/docker/daemon.json
volumes:
- name: dockersock
temp: {}
- name: ca
host:
path: /etc/docker/certs.d
- name: daemonjson
host:
path: /etc/docker/daemon.json
trigger:
2023-10-18 15:40:55 +00:00
branch:
2023-10-18 20:50:42 +00:00
- deployed
2023-10-18 15:40:55 +00:00
- master
2023-10-18 15:48:19 +00:00
event:
- push
2023-10-18 14:41:04 +00:00
2023-10-18 14:34:15 +00:00