2024-05-17 22:32:32 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: publish pipeline
|
|
|
|
steps:
|
|
|
|
- name: publish astro container
|
|
|
|
image: plugins/docker
|
2024-05-19 22:14:43 +00:00
|
|
|
settings: &docker-build-settings
|
2024-05-17 22:32:32 +00:00
|
|
|
username: 3wordchant
|
|
|
|
password:
|
|
|
|
from_secret: git_autonomic_zone_token_3wc
|
2024-05-19 22:14:43 +00:00
|
|
|
# NOTE: edit this if you want your image called something else
|
2024-06-04 08:56:13 +00:00
|
|
|
repo: git.autonomic.zone/autonomic-cooperative/paystro-test-astro
|
2024-05-17 22:32:32 +00:00
|
|
|
auto_tag: true
|
|
|
|
registry: git.autonomic.zone
|
|
|
|
context: astro
|
|
|
|
dockerfile: astro/Dockerfile
|
2024-05-21 02:30:08 +00:00
|
|
|
when: &exclude-event-custom
|
2024-05-20 04:08:42 +00:00
|
|
|
branch:
|
|
|
|
- main
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- custom
|
|
|
|
|
2024-05-19 15:35:18 +00:00
|
|
|
- name: publish payload dev container
|
|
|
|
image: plugins/docker
|
2024-05-19 22:14:43 +00:00
|
|
|
settings: &payload-build-settings
|
2024-05-19 22:19:41 +00:00
|
|
|
<<: *docker-build-settings
|
2024-05-19 15:35:18 +00:00
|
|
|
# NOTE: edit this if you want your image called something else
|
2024-06-04 08:56:13 +00:00
|
|
|
repo: git.autonomic.zone/autonomic-cooperative/paystro-test-payload-dev
|
2024-05-19 15:35:18 +00:00
|
|
|
context: payload
|
|
|
|
dockerfile: payload/Dockerfile
|
|
|
|
target: dev
|
2024-05-21 02:31:19 +00:00
|
|
|
when:
|
2024-05-21 02:33:07 +00:00
|
|
|
<<: *exclude-event-custom
|
2024-05-20 04:08:42 +00:00
|
|
|
|
2024-05-19 15:35:18 +00:00
|
|
|
- name: publish payload prod container
|
2024-05-17 22:32:32 +00:00
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
2024-05-19 22:14:43 +00:00
|
|
|
<<: *payload-build-settings
|
2024-05-17 22:32:32 +00:00
|
|
|
username: 3wordchant
|
2024-06-04 08:56:13 +00:00
|
|
|
repo: git.autonomic.zone/autonomic-cooperative/paystro-test-payload
|
2024-05-17 22:32:32 +00:00
|
|
|
target: prod
|
2024-05-21 02:31:19 +00:00
|
|
|
when:
|
2024-05-21 02:33:07 +00:00
|
|
|
<<: *exclude-event-custom
|
2024-05-20 04:08:42 +00:00
|
|
|
|
2024-05-17 22:32:32 +00:00
|
|
|
- name: deploy stack
|
|
|
|
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
|
|
|
|
settings:
|
2024-05-18 17:45:00 +00:00
|
|
|
compose: docker-compose.prod.yml
|
2024-05-17 22:38:39 +00:00
|
|
|
stack: paystro_swarm-demo_autonomic_zone
|
|
|
|
host: swarm-demo.autonomic.zone
|
2024-05-17 22:32:32 +00:00
|
|
|
deploy_key:
|
2024-05-17 22:38:39 +00:00
|
|
|
from_secret: drone_ssh_swarm-demo.autonomic.zone
|
2024-05-17 22:32:32 +00:00
|
|
|
environment:
|
2024-05-17 22:44:42 +00:00
|
|
|
DOMAIN: paystro.swarm-demo.autonomic.zone
|
2024-05-17 22:38:39 +00:00
|
|
|
STACK_NAME: paystro_swarm-demo_autonomic_zone
|
2024-05-17 22:32:32 +00:00
|
|
|
SECRET_PAYLOAD_SECRET_VERSION: v1
|
|
|
|
SECRET_TOKEN_VERSION: v1
|
|
|
|
SECRET_MONGO_PASSWORD_VERSION: v1
|
|
|
|
NGINX_CONF_VERSION: v1
|
2024-06-04 08:56:13 +00:00
|
|
|
REPOSITORY: "autonomic-cooperative/paystro-test"
|
2024-05-18 21:29:42 +00:00
|
|
|
DRONE_URL: "https://drone.autonomic.zone"
|
2024-05-18 16:35:41 +00:00
|
|
|
PAYLOAD_URL: "https://admin.paystro.swarm-demo.autonomic.zone"
|
2024-05-17 22:32:32 +00:00
|
|
|
depends_on:
|
2024-05-19 15:37:14 +00:00
|
|
|
- publish payload prod container
|
2024-05-21 02:31:19 +00:00
|
|
|
when:
|
2024-05-21 02:33:07 +00:00
|
|
|
<<: *exclude-event-custom
|
2024-05-17 22:32:32 +00:00
|
|
|
|
2024-05-17 22:51:47 +00:00
|
|
|
- name: build astro content
|
2024-06-04 08:56:13 +00:00
|
|
|
image: git.autonomic.zone/autonomic-cooperative/paystro-test-astro:latest
|
2024-05-18 03:30:41 +00:00
|
|
|
environment:
|
|
|
|
PAYLOAD_URL: "https://admin.paystro.swarm-demo.autonomic.zone"
|
2024-05-17 22:51:47 +00:00
|
|
|
commands:
|
2024-05-17 22:57:20 +00:00
|
|
|
- cd astro
|
2024-05-18 03:34:55 +00:00
|
|
|
- mv /base/node_modules .
|
2024-05-17 22:51:47 +00:00
|
|
|
- yarn build
|
2024-05-20 04:17:29 +00:00
|
|
|
depends_on:
|
|
|
|
- deploy stack
|
2024-05-20 04:14:39 +00:00
|
|
|
|
2024-05-18 03:30:41 +00:00
|
|
|
- name: copy built content to stack
|
|
|
|
image: git.coopcloud.tech/coop-cloud/docker-cp-deploy:latest
|
|
|
|
settings:
|
|
|
|
host: swarm-demo.autonomic.zone
|
|
|
|
service: paystro_swarm-demo_autonomic_zone_app
|
2024-05-18 03:37:53 +00:00
|
|
|
source: .
|
|
|
|
chdir: astro/dist/
|
2024-05-18 03:30:41 +00:00
|
|
|
exec_pre: rm -rf /usr/share/nginx/html/*
|
|
|
|
dest: /usr/share/nginx/html/
|
|
|
|
deploy_key:
|
|
|
|
from_secret: drone_ssh_swarm-demo.autonomic.zone
|
2024-05-20 04:14:39 +00:00
|
|
|
depends_on:
|
|
|
|
- build astro content
|