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:07:16 +00:00
|
|
|
- name: "check out product-development"
|
2023-10-18 20:02:29 +00:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- format-branch
|
|
|
|
image: alpine/git:latest
|
|
|
|
commands:
|
|
|
|
- git config credential.helper '!f() { sleep 1; echo "username=${GIT_USER}"; echo "password=${GIT_PASSWORD}"; }; f'
|
|
|
|
- git fetch
|
2023-10-18 20:21:38 +00:00
|
|
|
- git checkout -b product-development
|
2023-10-18 20:02:29 +00:00
|
|
|
- git merge format-branch
|
|
|
|
environment:
|
|
|
|
GIT_PASSWORD:
|
|
|
|
from_secret: GIT_PASSWORD
|
|
|
|
GIT_USER:
|
|
|
|
from_secret: GIT_USER
|
|
|
|
|
2023-10-18 18:00:37 +00:00
|
|
|
- name: "check out deployed"
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
image: alpine/git:latest
|
|
|
|
commands:
|
2023-10-18 20:26:06 +00:00
|
|
|
- git config credential.helper '!f() { sleep 1; echo "username=$${GIT_USER}"; echo "password=$${GIT_PASSWORD}"; }; f'
|
2023-10-18 18:05:24 +00:00
|
|
|
- git fetch
|
2023-10-18 20:21:38 +00:00
|
|
|
- git checkout -b deployed
|
2023-10-18 18:00:37 +00:00
|
|
|
- git merge master
|
2023-10-18 18:21:52 +00:00
|
|
|
environment:
|
|
|
|
GIT_PASSWORD:
|
|
|
|
from_secret: GIT_PASSWORD
|
|
|
|
GIT_USER:
|
|
|
|
from_secret: GIT_USER
|
|
|
|
|
2023-10-18 15:40:55 +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:
|
|
|
|
- format-branch
|
|
|
|
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
|
|
|
|
- format-branch
|
|
|
|
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 18:00:37 +00:00
|
|
|
- format-branch
|
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:26:06 +00:00
|
|
|
- git push origin --set-upstream $$(git symbolic-ref --short HEAD)
|
2023-10-18 18:21:52 +00:00
|
|
|
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:
|
|
|
|
- format-branch
|
|
|
|
- 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
|
|
|
|