-
Notifications
You must be signed in to change notification settings - Fork 55
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
manifests: add jenkins.yaml template #164
Conversation
OK, this works fine! (Got another PR coming up which I'm almost done testing that works on top of this.) |
ok i'm working through testing this out (all the way to #166). One thing I'd like to consider (I do this occasionally) is to include the original file |
Sure, seems reasonable to me. It's really a shame there isn't a cleaner way to do this. I did chat with the OpenShift Jenkins folks to confirm there wasn't a more supported way. That said, the upstream template doesn't change that often, so I think rebasing won't be too painful either. |
There is this great plugin which I've somehow only learned about recently to make Jenkins configuration much easier: https://github.com/jenkinsci/configuration-as-code-plugin The RHCOS pipeline already makes use of it. To use this though, we need to be able to change the podspec of Jenkins itself, which until now was embedded in the `jenkins-persistent` template. There's more though: I want to be able to define environment variables, configmaps, secrets, etc... The default template doesn't provide facilities for this. So this patch essentially imports the template into our tree so that we can have more control. The downside of course is that we lose updates to the template. (Though that could also be seen as an upside too: we get better reproducibility even if the template is upgrade.) One convention I'm using is prefacing all the changes from the default template values with a comment saying "DELTA:". That way, we can more easily track what we added on top, and make rebasing easier in the future. Another advantage is that it makes setting it up easier because we don't have to customize as many parameters: we can just set the right default for us.
64b58ee
to
629e32c
Compare
Done! ⬆️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There is this great plugin which I've somehow only learned about
recently to make Jenkins configuration much easier:
https://github.com/jenkinsci/configuration-as-code-plugin
The RHCOS pipeline already makes use of it.
To use this though, we need to be able to change the podspec of Jenkins
itself, which until now was embedded in the
jenkins-persistent
template.
There's more though: I want to be able to define environment variables,
configmaps, secrets, etc... The default template doesn't provide
facilities for this.
So this patch essentially imports the template into our tree so that we
can have more control. The downside of course is that we lose updates to
the template. (Though that could also be seen as an upside too: we get
better reproducibility even if the template is upgrade.)
One convention I'm using is prefacing all the changes from the default
template values with a comment saying "DELTA:". That way, we can more
easily track what we added on top, and make rebasing easier in the
future.
Another advantage is that it makes setting it up easier because we don't
have to customize as many parameters: we can just set the right default
for us.