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

A general pattern for customization #10

Closed
kmanning opened this issue Sep 3, 2019 · 1 comment
Closed

A general pattern for customization #10

kmanning opened this issue Sep 3, 2019 · 1 comment

Comments

@kmanning
Copy link
Collaborator

kmanning commented Sep 3, 2019

  • We could approach this in many different ways.
  1. A plugin approach. Include whatever plugins you want to use, and the plugins do the customization. This might get tedious, as the number of plugins that are imported might start to get REALLY long as we decompose things into smaller and smaller pieces
  2. A customization file. Imagine that teams write roughly the same Jenkinsfile, and then import a single Customize groovy class. All the customizations are delegated to that Customize class. 1 and 2 could actually be combined - Cutomize could be used to load in the long list of customized plugins.
@kmanning
Copy link
Collaborator Author

kmanning commented Sep 3, 2019

  1. What if, at the time of Jenkinsfile.init(), we check for environment variables corresponding to each of the plugins. If the variable is "enabled", then the plugin is automatically pulled in. That would be a SUPER simple (also super "magical" - not necessarily a good thing) way to enable/disable functionality.
    • Eg: TERRAFORM_PIPELINE_PARAMETER_STORE_EXEC_ENABLED=true <-- set this as a global property in Jenkins, and automagically, every pipeline gets parameter-store-exec added.

@kmanning kmanning closed this as completed Sep 3, 2019
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