Skip to content

Commit

Permalink
Adjust again.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenyeargin committed Aug 23, 2020
1 parent 4dcefd9 commit 725cf43
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pipeline {
stage('Deploy to Staging') {
steps {
slackSend (message: "${currentBuild.fullDisplayName} Deploy to Staging started (<${env.BUILD_URL}|Open>)", color: '#37b787')
sh "bundle exec cap staging deploy GIT_BRANCH=${env.GIT_BRANCH}"
sh "bundle exec cap staging deploy BRANCH=${env.GIT_BRANCH}"
}
post {
success {
Expand All @@ -65,7 +65,7 @@ pipeline {
}
steps {
slackSend (message: "${currentBuild.fullDisplayName} Deploy to Production started (<${env.BUILD_URL}|Open>)", color: '#37b787')
sh "bundle exec cap production deploy GIT_BRANCH=${env.GIT_BRANCH}"
sh "bundle exec cap production deploy BRANCH=${env.GIT_BRANCH}"
}
post {
success {
Expand Down
3 changes: 3 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# Link local configuration
set :linked_files, [".env.local"]

# Adjust branch if environment variable provided
set :branch, ENV['BRANCH'] if ENV['BRANCH']

# Default branch is :master
# ask :branch, `git rev-parse --abbrev-ref HEAD`.chomp

Expand Down
1 change: 0 additions & 1 deletion config/deploy/production.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set :deploy_to, "/srv/www/thepacer.org/production"
set :branch, ENV['GIT_BRANCH'] if ENV['GIT_BRANCH']

server "thepacer.org", user: "deploy", roles: %w{app db web}

Expand Down
1 change: 0 additions & 1 deletion config/deploy/staging.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set :deploy_to, "/srv/www/thepacer.org/staging"
set :branch, ENV['BRANCH'] if ENV['BRANCH']

server "thepacer.org", user: "deploy", roles: %w{app db web}

Expand Down

0 comments on commit 725cf43

Please sign in to comment.