astro-payload-test/.drone.yml
3wc 5304c854af
All checks were successful
continuous-integration/drone/push Build is passing
Fix PAYLOAD_URL for Payload
2024-05-18 13:35:41 -03:00

84 lines
2.5 KiB
YAML

---
kind: pipeline
name: publish pipeline
steps:
- name: publish astro container
image: plugins/docker
settings:
username: 3wordchant
password:
from_secret: git_autonomic_zone_token_3wc
# NOTE: edit this if you want your image called something else
repo: git.autonomic.zone/autonomic-cooperative/astro-payload-test-astro
auto_tag: true
registry: git.autonomic.zone
context: astro
dockerfile: astro/Dockerfile
- name: publish payload container
image: plugins/docker
settings:
username: 3wordchant
password:
from_secret: git_autonomic_zone_token_3wc
# NOTE: edit this if you want your image called something else
repo: git.autonomic.zone/autonomic-cooperative/astro-payload-test-payload
auto_tag: true
registry: git.autonomic.zone
context: payload
dockerfile: payload/Dockerfile
target: prod
# See https://docz.autonomic.zone/doc/setting-up-auto-deployment-using-drone-I4j2onjaKT
- name: deploy stack
image: git.coopcloud.tech/coop-cloud/stack-ssh-deploy:latest
settings:
stack: paystro_swarm-demo_autonomic_zone
host: swarm-demo.autonomic.zone
deploy_key:
from_secret: drone_ssh_swarm-demo.autonomic.zone
environment:
DOMAIN: paystro.swarm-demo.autonomic.zone
STACK_NAME: paystro_swarm-demo_autonomic_zone
SECRET_PAYLOAD_SECRET_VERSION: v1
SECRET_TOKEN_VERSION: v1
SECRET_MONGO_PASSWORD_VERSION: v1
NGINX_CONF_VERSION: v1
REPOSITORY: "autonomic-cooperative/astro-payload-test"
PAYLOAD_URL: "https://admin.paystro.swarm-demo.autonomic.zone"
depends_on:
# - publish astro container
- publish payload container
trigger:
branch:
- main
event:
exclude:
- custom
---
kind: pipeline
name: build astro
steps:
- name: build astro content
image: git.autonomic.zone/autonomic-cooperative/astro-payload-test-astro:latest
environment:
PAYLOAD_URL: "https://admin.paystro.swarm-demo.autonomic.zone"
commands:
- cd astro
- mv /base/node_modules .
- yarn build
- 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
source: .
chdir: astro/dist/
exec_pre: rm -rf /usr/share/nginx/html/*
dest: /usr/share/nginx/html/
deploy_key:
from_secret: drone_ssh_swarm-demo.autonomic.zone
trigger:
event:
- custom