I'm putting together a jenkins global library and am struggling with creating a true global configuration.
My Jenkinsfiles are pretty flat, and mostly just load the global library, set some build specific configuration values, and then calls a step that contains most of the build logic (calls other steps to run the build/test/install). What I was hoping I could do is have a separate properties file that I can load that contains a bunch of default global configuration values, and have it be accessible from all steps. Per the doc, I'm supposed to be able to create a class to hold this global config, but I have to actually pass this class into each step to make it available, which is really ugly. I'm thinking the best approach is to create a config step that reads the file and loads the config, write that config to a file and stash it, then have a utility method that reads the stashed config in any steps that need to access it. Though, I also really don't like this option either. Is there a good way in pipeline to make a globally accessible config that I'm missing? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a3cd3e9b-2e49-4da2-924d-4e75199be73c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
