move pipelines into steps so they don't run in paralell
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/promote/production Build is passing Details

test
Dan 2023-08-01 11:33:27 -06:00
parent 81ae8fa297
commit 17d56d3435
1 changed files with 10 additions and 31 deletions

View File

@ -1,8 +1,8 @@
kind: pipeline
type: docker
name: build
name: build-deploy
steps:
- name: node
- name: build
image: docker
volumes:
- name: docker_sock
@ -10,17 +10,7 @@ steps:
commands:
- docker build --tag ofb_api .
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock
---
kind: pipeline
type: docker
name: deploy_test
steps:
- name: node
- name: deploy_test
image: docker
volumes:
- name: docker_sock
@ -30,17 +20,7 @@ steps:
- docker run --name ofb_api_test --network=proxy --restart always -d -e ASPNETCORE_ENVIRONMENT="Development" -e ConnectionStrings__OFBContext="server=mysql;database=ofb_missionary;user=admin_ofbbutte;password=87hjdusiodksyeunsjkdis7;" ofb_api
- docker network connect mysql ofb_api_test
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock
---
kind: pipeline
type: docker
name: deploy_prod
steps:
- name: node
- name: deploy_prod
image: docker
volumes:
- name: docker_sock
@ -49,14 +29,13 @@ steps:
- docker rm -f ofb_api || true
- docker run --name ofb_api --network=proxy --restart always -d -e ASPNETCORE_ENVIRONMENT="Production" -e ConnectionStrings__OFBContext="server=mysql;database=ofb_missionary;user=admin_ofbbutte;password=87hjdusiodksyeunsjkdis7;" ofb_api
- docker network connect mysql ofb_api
when:
event:
- promote
target:
- production
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock
trigger:
event:
- promote
target:
- production
path: /var/run/docker.sock