keyoxide-web/.drone.yml

87 lines
1.9 KiB
YAML
Raw Normal View History

2020-06-25 10:11:33 -06:00
---
2020-08-09 06:40:08 -06:00
kind: pipeline
name: build-stable-container
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: keyoxide/keyoxide
tags: stable
---
2020-06-25 10:01:06 -06:00
kind: pipeline
type: exec
2020-08-09 06:40:08 -06:00
name: deploy-stable
2020-06-25 10:01:06 -06:00
steps:
2020-08-09 06:40:08 -06:00
- name: pull docker container
commands:
- docker pull keyoxide/keyoxide:stable
- name: stop and remove existing docker container
2020-06-26 09:06:05 -06:00
commands:
2020-08-09 06:40:08 -06:00
- docker stop keyoxide || true && docker rm keyoxide || true
- name: run new docker container
2020-06-25 10:01:06 -06:00
environment:
2020-08-09 06:40:08 -06:00
TWITTER_API_AUTH:
from_secret: twitter_api_auth
2020-06-25 10:01:06 -06:00
commands:
2020-08-09 06:40:08 -06:00
- docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide -h keyoxide --network dc_web keyoxide/keyoxide:stable
2020-06-25 10:01:06 -06:00
trigger:
branch:
- main
2020-07-04 07:36:38 -06:00
event:
- push
2020-06-25 10:11:33 -06:00
---
2020-08-09 04:26:39 -06:00
kind: pipeline
name: build-dev-container
steps:
- name: docker
image: plugins/docker
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: keyoxide/keyoxide
tags: dev
---
2020-06-25 10:11:33 -06:00
kind: pipeline
type: exec
2020-08-09 04:26:39 -06:00
name: deploy-dev
2020-06-25 10:11:33 -06:00
steps:
2020-08-09 04:07:35 -06:00
- name: pull docker container
commands:
- docker pull keyoxide/keyoxide:dev
- name: stop and remove existing docker container
commands:
2020-08-09 06:40:08 -06:00
- docker stop keyoxide-dev || true && docker rm keyoxide-dev || true
2020-08-09 04:07:35 -06:00
- name: run new docker container
2020-06-25 10:11:33 -06:00
environment:
2020-08-09 04:07:35 -06:00
TWITTER_API_AUTH:
from_secret: twitter_api_auth
2020-06-25 10:11:33 -06:00
commands:
2020-08-09 06:40:08 -06:00
- docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide-dev -h keyoxide --network dc_web keyoxide/keyoxide:dev
2020-06-25 10:11:33 -06:00
trigger:
branch:
- dev
2020-07-04 07:36:38 -06:00
event:
- push
2020-08-09 06:54:35 -06:00
depends_on:
- build-dev-container