-
Notifications
You must be signed in to change notification settings - Fork 52
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 #216 from manheim/v5.6-dev
Create 5.6 release
- Loading branch information
Showing
10 changed files
with
185 additions
and
9 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
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 |
---|---|---|
@@ -1,30 +1,32 @@ | ||
## [CredentialsPlugin](../src/CredentialsPlugin.groovy) | ||
|
||
Enable this plugin to inject credentials into your BuildStage using the [Jenkins Credentials Plugin](https://wiki.jenkins.io/display/JENKINS/Credentials+Plugin). | ||
Enable this plugin to inject credentials into your stages using the [Jenkins Credentials Plugin](https://wiki.jenkins.io/display/JENKINS/Credentials+Plugin). | ||
|
||
One-time setup: | ||
* Install the [Jenkins Credentials Plugin](https://wiki.jenkins.io/display/JENKINS/Credentials+Plugin) on your Jenkins master. | ||
* Define a credential that you want to inject. Currently, only usernamePassword credentials are supported. | ||
|
||
Specify the credential that you want to inject during the BuildStage. Optionally provide custom username/password environment variables that will contain the credential values for your use. | ||
Specify the credential that you want to inject in your stages. Optionally provide custom username/password environment variables that will contain the credential values for your use. | ||
|
||
``` | ||
// Jenkinsfile | ||
@Library(['[email protected]']) _ | ||
Jenkinsfile.init(this) | ||
// MY_CREDENTIALS_USERNAME and MY_CREDENTIALS_PASSWORD will contain the respective username/password values of the 'my-credentials' credential. | ||
CredentialsPlugin.withBuildCredentials('my-credentials').init() | ||
def validate = new TerraformValidateStage() | ||
// MY_CREDENTIALS_USERNAME and MY_CREDENTIALS_PASSWORD will contain the respective username/password values of the 'my-credentials' credential. | ||
def build = new BuildStage() | ||
def deployQA = new TerraformEnvironmentStage('qa') | ||
def deployQa = new TerraformEnvironmentStage('qa') | ||
def testQa = new RegressionStage() | ||
def deployUat = new TerraformEnvironmentStage('uat') | ||
def deployProd = new TerraformEnvironmentStage('prod') | ||
validate.then(build) | ||
.then(deployQA) | ||
.then(deployQa) | ||
.then(testQa) | ||
.then(deployUat) | ||
.then(deployProd) | ||
.build() | ||
|
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 |
---|---|---|
|
@@ -32,3 +32,32 @@ validate.then(deployQA) | |
.then(deployProd) | ||
.build() | ||
``` | ||
|
||
Optionally, you can override the default ParameterStore path with your own custom pattern. | ||
|
||
``` | ||
// Jenkinsfile | ||
@Library(['[email protected]']) _ | ||
Jenkinsfile.init(this) | ||
// Enable ParameterStoreBuildWrapperPlugin with a custom path pattern | ||
ParameterStoreBuildWrapperPlugin.withPathPattern { options -> "/${options['organization']}/${options['environment']}/${options['repoName']}" } | ||
.init() | ||
def validate = new TerraformValidateStage() | ||
// Inject all parameters in /<GitOrg>/qa/<GitRepo> | ||
def deployQA = new TerraformEnvironmentStage('qa') | ||
// Inject all parameters in /<GitOrg>/uat/<GitRepo> | ||
def deployUat = new TerraformEnvironmentStage('uat') | ||
// Inject all parameters in /<GitOrg>/prod/<GitRepo> | ||
def deployProd = new TerraformEnvironmentStage('prod') | ||
validate.then(deployQA) | ||
.then(deployUat) | ||
.then(deployProd) | ||
.build() | ||
``` |
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
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