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

ConditionalApplyPlugin: Allow every apply to be optionally skipped #430

Open
kmanning opened this issue Mar 14, 2022 · 1 comment
Open
Milestone

Comments

@kmanning
Copy link
Collaborator

As a developer, I want to be able to arbitrarily "deploy" to any environment that I want, so that I can fix problems in a emergency, and not be "slowed down" by the pipeline.

  • In the master branch, there are 2 options - confirm that you want to apply, or abort
  • What if we gave customers a third option - "skip".
  • If the user chooses skip, then "apply" is not run for the current environment, and instead simply continues through the pipeline as though "apply" had run
@kmanning kmanning added this to the v5.20 milestone Mar 14, 2022
@kmanning kmanning changed the title Allow every apply to be optionally skipped ConditionalApplyPlugin: Allow every apply to be optionally skipped Mar 14, 2022
@kmanning
Copy link
Collaborator Author

Example code:

Jenkinsfile.init(this)
ConditionalApplyPlugin.enableSkipApply()

def validate = new TerraformValidateStage()
def deployQa = new TerraformEnvironmentStage('qa')
def deployUat = new TerraformEnvironmentStage('uat')
def deployProd = new TerraformEnvironmentStage('prod')

// When prompted to confirm "apply qa", user now has a 3rd option to simply skip over, and continue to uat
validate.then(deployQa)
// When prompted to confirm "apply uat", user now has a 3rd option to simply skip over, and continue to prod
        .then(deployUat)
// When prompted to confirm "apply prod", user now has a 3rd option to simply skip over and finish the pipeline
        .then(deployProd)
        .build()

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

No branches or pull requests

1 participant