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 kind: pipeline
type: docker type: docker
name: build name: build-deploy
steps: steps:
- name: node - name: build
image: docker image: docker
volumes: volumes:
- name: docker_sock - name: docker_sock
@ -10,17 +10,7 @@ steps:
commands: commands:
- docker build --tag ofb_api . - docker build --tag ofb_api .
volumes: - name: deploy_test
- name: docker_sock
host:
path: /var/run/docker.sock
---
kind: pipeline
type: docker
name: deploy_test
steps:
- name: node
image: docker image: docker
volumes: volumes:
- name: docker_sock - 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 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 - docker network connect mysql ofb_api_test
volumes: - name: deploy_prod
- name: docker_sock
host:
path: /var/run/docker.sock
---
kind: pipeline
type: docker
name: deploy_prod
steps:
- name: node
image: docker image: docker
volumes: volumes:
- name: docker_sock - name: docker_sock
@ -49,14 +29,13 @@ steps:
- docker rm -f ofb_api || true - 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 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 - docker network connect mysql ofb_api
when:
event:
- promote
target:
- production
volumes: volumes:
- name: docker_sock - name: docker_sock
host: host:
path: /var/run/docker.sock path: /var/run/docker.sock
trigger:
event:
- promote
target:
- production