Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParameterStoreBuildWrapperPlugin - allow path to be customized #201

Closed
abjohn01 opened this issue Mar 17, 2020 · 1 comment · Fixed by #215
Closed

ParameterStoreBuildWrapperPlugin - allow path to be customized #201

abjohn01 opened this issue Mar 17, 2020 · 1 comment · Fixed by #215
Labels
good first issue Good for newcomers
Milestone

Comments

@abjohn01
Copy link

We would like to override the current default path with the path pattern we use.
Instead of /<GitOrg>/<GitRepo>/<env>, we would like /<GitOrg>/<env>/<GitRepo>.

@kmanning kmanning added the good first issue Good for newcomers label Mar 18, 2020
@kmanning kmanning added this to the v5.6 milestone Mar 18, 2020
@kmanning kmanning changed the title Support for overriding default path ParameterStoreBuildWrapperPlugin ParameterStoreBuildWrapperPlugin - allow path to be customized Apr 8, 2020
@kmanning
Copy link
Collaborator

kmanning commented Apr 8, 2020

How's something like this?

// Jenkinsfile
@Library(['terraform-pipeline']) _

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants