Skip to content

Commit

Permalink
Merge branch 'feature-drone-deploy-multiple-environments'
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingfishflash committed Mar 11, 2021
2 parents 66c2e62 + 5f6cc72 commit 4e51236
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
37 changes: 35 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,39 @@ trigger:
- tag
ref:
- refs/heads/feature-*

depends_on:
- "frontend - publish"
- "backend - publish"

clone:
disable: true

steps:
- name: deploy to development
image: appleboy/drone-ssh
settings:
host:
from_secret: ssh_host_dev
username:
from_secret: ssh_username
key:
from_secret: ssh_key
script:
- cd docker
- ansible-playbook dev.yaml -i inventory.yaml -e do=restart --tags=ledger
# otherwise: docker-compose up stacks/ledger/docker-compose.yaml -d --remove-orphans

---
kind: pipeline
name: deploy to production
type: docker

trigger:
event:
- push
- tag
ref:
- refs/tags/*

depends_on:
Expand All @@ -341,12 +374,12 @@ steps:
image: appleboy/drone-ssh
settings:
host:
from_secret: ssh_host
from_secret: ssh_host_prd
username:
from_secret: ssh_username
key:
from_secret: ssh_key
script:
- cd docker
- ansible-playbook docker-0.yaml -i inventory.yaml -e do=restart --tags=ledger
- ansible-playbook prd.yaml -i inventory.yaml -e do=restart --tags=ledger
# otherwise: docker-compose up stacks/ledger/docker-compose.yaml -d --remove-orphans
10 changes: 9 additions & 1 deletion backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ repositories {
maven {
url = uri('https://oss.jfrog.org/artifactory/oss-snapshot-local/')
}

// can be removed when jacoco 0.8.7 is released
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}

dependencies {
Expand Down Expand Up @@ -104,7 +109,10 @@ bootRun {
jvmArgs = ["-Duser.timezone=UTC"]
}


// can be removed when jacoco 0.8.7 is released
jacoco {
toolVersion = '0.8.7-SNAPSHOT'
}

jacocoTestReport {

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.diffplug.spotless' version '5.8.2'
id 'com.diffplug.spotless' version '5.11.0'
id 'fr.brouillard.oss.gradle.jgitver' version '0.10.0-rc03'
id 'com.geoffgranum.gradle-conventional-changelog' version '0.3.1'
id "com.github.breadmoirai.github-release" version "2.2.12"
Expand Down

0 comments on commit 4e51236

Please sign in to comment.