Update .drone.yml with addtional pull_request event
parent
4611395574
commit
997d5c4697
464
.drone.yml
464
.drone.yml
|
@ -12,409 +12,31 @@ steps:
|
|||
from_secret: ssh_key
|
||||
script:
|
||||
- cd /home/core/staging && ls
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-auth
|
||||
name: deploy
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
- name: regenrate
|
||||
image: 'node:12-alpine'
|
||||
commands:
|
||||
- yarn install
|
||||
- yarn generate
|
||||
- name: push-or-fail
|
||||
image: appleboy/drone-git-push
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-auth
|
||||
context: backend-auth
|
||||
dockerfile: backend-auth/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-bite
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-bite
|
||||
context: backend-bite
|
||||
dockerfile: backend-bite/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-core
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-core
|
||||
context: backend-core
|
||||
dockerfile: backend-core/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-heartbeat
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-heartbeat
|
||||
context: backend-heartbeat
|
||||
dockerfile: backend-heartbeat/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-login
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-login
|
||||
context: backend-login
|
||||
dockerfile: backend-login/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-publish
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-publish
|
||||
context: backend-publish
|
||||
dockerfile: backend-publish/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-signal
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-signal
|
||||
context: backend-signal
|
||||
dockerfile: backend-signal/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-store
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-store
|
||||
context: backend-store
|
||||
dockerfile: backend-store/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-subscribe
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-subscribe
|
||||
context: backend-subscribe
|
||||
dockerfile: backend-subscribe/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
---
|
||||
kind: pipeline
|
||||
name: backend-transcription
|
||||
clone:
|
||||
depth: 1
|
||||
steps:
|
||||
- name: submodule
|
||||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: registry.makerforce.io
|
||||
repo: registry.makerforce.io/beep/backend-transcription
|
||||
context: backend-transcription
|
||||
dockerfile: backend-transcription/Dockerfile
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
remote_name: origin
|
||||
branch: $DRONE_SOURCE_BRANCH
|
||||
key:
|
||||
from_secret: push_ssh_key
|
||||
commit: true
|
||||
commit_message: '[SKIP CI] Automatically updating .drone.yml'
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- pull_request
|
||||
---
|
||||
kind: pipeline
|
||||
name: deploy
|
||||
|
@ -425,21 +47,7 @@ steps:
|
|||
image: plugins/git
|
||||
settings:
|
||||
recursive: true
|
||||
submodule_override:
|
||||
backend-auth: 'https://git.makerforce.io/beep/backend-auth.git'
|
||||
backend-bite: 'https://git.makerforce.io/beep/backend-bite.git'
|
||||
backend-core: 'https://git.makerforce.io/beep/backend-core.git'
|
||||
backend-heartbeat: 'https://git.makerforce.io/beep/backend-heartbeat.git'
|
||||
backend-login: 'https://git.makerforce.io/beep/backend-login.git'
|
||||
backend-protobuf: 'https://git.makerforce.io/beep/backend-protobuf.git'
|
||||
backend-publish: 'https://git.makerforce.io/beep/backend-publish.git'
|
||||
backend-signal: 'https://git.makerforce.io/beep/backend-signal.git'
|
||||
backend-store: 'https://git.makerforce.io/beep/backend-store.git'
|
||||
backend-subscribe: 'https://git.makerforce.io/beep/backend-subscribe.git'
|
||||
backend-transcription: 'https://git.makerforce.io/beep/backend-transcription.git'
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
submodule_override: {}
|
||||
- name: copy-docker-compose
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
|
@ -451,9 +59,6 @@ steps:
|
|||
- docker-compose.staging.yml
|
||||
- traefik.staging.toml
|
||||
target: /home/core/staging
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: copy-migrations
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
|
@ -464,9 +69,6 @@ steps:
|
|||
source:
|
||||
- backend-core/postgres/*
|
||||
target: /home/core/staging
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: docker-compose-up
|
||||
image: appleboy/drone-ssh
|
||||
settings:
|
||||
|
@ -481,25 +83,17 @@ steps:
|
|||
- >-
|
||||
cd /home/core/staging && /home/core/docker-compose -f
|
||||
docker-compose.staging.yml up -d
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
- name: slack
|
||||
image: plugins/slack
|
||||
settings:
|
||||
webhook:
|
||||
from_secret: slack_webhook_beep
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
depends_on:
|
||||
- backend-auth
|
||||
- backend-bite
|
||||
- backend-core
|
||||
- backend-heartbeat
|
||||
- backend-login
|
||||
- backend-publish
|
||||
- backend-signal
|
||||
- backend-store
|
||||
- backend-subscribe
|
||||
- backend-transcription
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
- push
|
||||
- tag
|
||||
- promote
|
||||
- rollback
|
||||
depends_on: []
|
||||
|
|
67
drone_gen.js
67
drone_gen.js
|
@ -30,9 +30,6 @@ const yamls = dockers.map(f => ({
|
|||
recursive: true,
|
||||
submodule_override,
|
||||
},
|
||||
when: {
|
||||
branch: ['master'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'docker',
|
||||
|
@ -50,11 +47,12 @@ const yamls = dockers.map(f => ({
|
|||
from_secret: 'docker_password',
|
||||
},
|
||||
},
|
||||
when: {
|
||||
branch: ['master'],
|
||||
},
|
||||
},
|
||||
],
|
||||
trigger: {
|
||||
branch: ["master"],
|
||||
event: ["push", "tag", "promote", "rollback"],
|
||||
},
|
||||
}))
|
||||
|
||||
const sshTest = {
|
||||
|
@ -77,11 +75,43 @@ const sshTest = {
|
|||
'cd /home/core/staging && ls'
|
||||
],
|
||||
},
|
||||
when: {
|
||||
branch: ['master'],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const callSelf = {
|
||||
kind: 'pipeline',
|
||||
name: 'deploy',
|
||||
clone: {
|
||||
depth: 1,
|
||||
},
|
||||
steps: [
|
||||
{
|
||||
name: 'regenrate',
|
||||
image: 'node:12-alpine',
|
||||
commands: [
|
||||
'yarn install',
|
||||
'yarn generate',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'push-or-fail',
|
||||
image: 'appleboy/drone-git-push',
|
||||
settings: {
|
||||
remote_name: 'origin',
|
||||
branch: '$DRONE_SOURCE_BRANCH',
|
||||
key: {
|
||||
from_secret: 'push_ssh_key',
|
||||
},
|
||||
commit: true,
|
||||
commit_message: '[SKIP CI] Automatically updating .drone.yml',
|
||||
},
|
||||
},
|
||||
],
|
||||
trigger: {
|
||||
branch: ["master"],
|
||||
event: ["pull_request"],
|
||||
},
|
||||
};
|
||||
|
||||
const deploy = {
|
||||
|
@ -98,9 +128,6 @@ const deploy = {
|
|||
recursive: true,
|
||||
submodule_override,
|
||||
},
|
||||
when: {
|
||||
branch: ['master'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'copy-docker-compose',
|
||||
|
@ -117,9 +144,6 @@ const deploy = {
|
|||
],
|
||||
target: '/home/core/staging',
|
||||
},
|
||||
when: {
|
||||
branch: ['master'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'copy-migrations',
|
||||
|
@ -135,9 +159,6 @@ const deploy = {
|
|||
],
|
||||
target: '/home/core/staging',
|
||||
},
|
||||
when: {
|
||||
branch: ['master'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'docker-compose-up',
|
||||
|
@ -153,9 +174,6 @@ const deploy = {
|
|||
'cd /home/core/staging && /home/core/docker-compose -f docker-compose.staging.yml up -d',
|
||||
],
|
||||
},
|
||||
when: {
|
||||
branch: ['master'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'slack',
|
||||
|
@ -165,15 +183,16 @@ const deploy = {
|
|||
from_secret: 'slack_webhook_beep',
|
||||
},
|
||||
},
|
||||
when: {
|
||||
branch: ['master'],
|
||||
},
|
||||
},
|
||||
],
|
||||
trigger: {
|
||||
branch: ["master"],
|
||||
event: ["push", "tag", "promote", "rollback"],
|
||||
},
|
||||
depends_on: dockers,
|
||||
};
|
||||
|
||||
const droneyml = [].concat(sshTest).concat(yamls).concat(deploy).map(yaml.safeDump).join('---\n');
|
||||
const droneyml = [].concat(sshTest).concat(callSelf).concat(yamls).concat(deploy).map(yaml.safeDump).join('---\n');
|
||||
|
||||
fs.writeFileSync(path.join(cwd, '.drone.yml'), droneyml);
|
||||
console.log('Written to .drone.yml');
|
||||
|
|
Loading…
Reference in New Issue