batch-example/.drone.yml

143 lines
3.2 KiB
YAML
Raw Normal View History

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 21:39:08 +00:00
- name: "git - pre format"
when:
branch:
- format-branch
image: alpine/git:latest
commands:
2023-10-18 22:18:52 +00:00
#- git config credential.helper '!f() { sleep 1; echo "username=$${GIT_USER}"; echo "password=$${GIT_PASSWORD}"; }; f'
#- git checkout -b master
#- git pull origin master
2023-10-18 21:50:24 +00:00
# - git branch -D product-development
2023-10-18 21:48:20 +00:00
- git checkout -b product-development
2023-10-18 22:18:52 +00:00
#- git merge --squash --no-commit --strategy-option=theirs format-branch
2023-10-18 21:39:08 +00:00
environment:
GIT_PASSWORD:
from_secret: GIT_PASSWORD
GIT_USER:
from_secret: GIT_USER
2023-10-18 20:52:48 +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 22:12:01 +00:00
- product-development
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 21:39:08 +00:00
- format-branch
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 22:32:48 +00:00
- git commit -m "deploying- $${DRONE_COMMIT_MESSAGE}"
2023-10-18 20:56:26 +00:00
- git push -f origin HEAD: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 22:12:01 +00:00
- name: "git - product-development - build"
when:
branch:
- product-development
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 HEAD:product-development-build
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:
2023-10-18 21:39:08 +00:00
- format-branch
2023-10-18 20:50:42 +00:00
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}"
2023-10-18 20:56:26 +00:00
- git push -f origin HEAD:product-development
2023-10-18 20:50:42 +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:
2023-10-18 21:39:08 +00:00
- format-branch
2023-10-18 15:40:55 +00:00
- master
2023-10-18 22:12:01 +00:00
- product-development
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