-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from wearefine/add_skip_test
Add skip test
- Loading branch information
Showing
7 changed files
with
147 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
# rails-jenkins-shared-libraries Changelog | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
## 1.0.0 | ||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] - TBD | ||
|
||
## [v1.1.0] - 11-16-2017 | ||
### Added | ||
- SKIP_TESTS parameter so you can just deploy code | ||
- More debug output in railsRvm function | ||
|
||
### Fixed | ||
- ruby_string being undeclared | ||
- DEBUG not setting the env var when passing in true | ||
|
||
### Updated | ||
- railsinstallDeps is now its own function | ||
- railsDeploy is now its own function | ||
- SQL commands now clean old DBs, and Users before adding new ones at the start of the build | ||
|
||
## [v1.0.0] | ||
|
||
- EVERYTHING :tada: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/usr/bin/env groovy | ||
|
||
def call(Map config) { | ||
try { | ||
stage('Deploy') { | ||
milestone label: 'Deploy' | ||
sshagent([config.SSH_AGENT_ID]) { | ||
if (config.DEPLOY_VARS) { | ||
withCredentials(config.DEPLOY_VARS) { | ||
if (config.CAP_VERSION == '3'){ | ||
if (env.BRANCH_NAME == 'master') { | ||
railsRvm('cap prod deploy') | ||
} | ||
else if(env.BRANCH_NAME == 'stage') { | ||
railsRvm('cap stage deploy') | ||
} | ||
else if(env.BRANCH_NAME == 'dev') { | ||
railsRvm('cap dev deploy') | ||
} | ||
railsOtherBuildEnvs() | ||
} | ||
if (config.CAP_VERSION == '2'){ | ||
if (env.BRANCH_NAME == 'master') { | ||
railsRvm('cap deploy -S loc=prod') | ||
} | ||
else if(env.BRANCH_NAME == 'stage') { | ||
railsRvm('cap deploy -S loc=stage -S branch=stage') | ||
} | ||
else if(env.BRANCH_NAME == 'dev') { | ||
railsRvm('cap deploy -S loc=dev -S branch=dev') | ||
} | ||
railsOtherBuildEnvs() | ||
} | ||
} | ||
} | ||
else { | ||
if (config.CAP_VERSION == '3'){ | ||
if (env.BRANCH_NAME == 'master') { | ||
railsRvm('cap prod deploy') | ||
} | ||
else if(env.BRANCH_NAME == 'stage') { | ||
railsRvm('cap stage deploy') | ||
} | ||
else if(env.BRANCH_NAME == 'dev') { | ||
railsRvm('cap dev deploy') | ||
} | ||
railsOtherBuildEnvs() | ||
} | ||
if (config.CAP_VERSION == '2'){ | ||
if (env.BRANCH_NAME == 'master') { | ||
railsRvm('cap deploy -S loc=prod') | ||
} | ||
else if(env.BRANCH_NAME == 'stage') { | ||
railsRvm('cap deploy -S loc=stage -S branch=stage') | ||
} | ||
else if(env.BRANCH_NAME == 'dev') { | ||
railsRvm('cap deploy -S loc=dev -S branch=dev') | ||
} | ||
railsOtherBuildEnvs() | ||
} | ||
} | ||
} | ||
currentBuild.result = 'SUCCESS' | ||
} | ||
} catch(Exception e) { | ||
currentBuild.result = 'FAILURE' | ||
if (config.DEBUG == 'false') { | ||
railsSlack(config.SLACK_CHANNEL) | ||
} | ||
throw e | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env groovy | ||
|
||
def call(Map config) { | ||
try { | ||
stage('Install Dependancies') { | ||
milestone label: 'Install Dependancies' | ||
retry(2) { | ||
railsRvm('bundle install') | ||
} | ||
currentBuild.result = 'SUCCESS' | ||
} | ||
} catch(Exception e) { | ||
currentBuild.result = 'FAILURE' | ||
if (config.DEBUG == 'false') { | ||
railsSlack(config.SLACK_CHANNEL) | ||
} | ||
throw e | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters