-
Notifications
You must be signed in to change notification settings - Fork 166
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
Migrate Jenkins job configuration to pipeline files #838
Comments
I've been thinking that this would be a good idea for a long time (and it just came up in #804 (comment)). It's a fairly massive change though, as pipelines are pretty different from the existing build trigger plugins and methods.
I think I agree with @joaocgreis 's point in #804 (comment), we want to have one master copy of the build scripts, not one for each version, so it makes more sense to have them in a separate repository. I think a
I think the current system of using Github teams to manage access works quite well, but if Jenkins has some alternative method of managing this we should definitely consider it.
I think the first thing we need to look at is whether this is worth doing, and how much work it's going to entail. Node CI includes non-core CI tests (like CitGM, node-report, and libuv). Those would be a good place to start, if we convert some of those jobs, then that would give us a good indication of how difficult/worthwhile it's going to be. Another issue is that no-one in the build WG is a Pipeline expert. Many of us are familiar with the existing (Jenkins 1) configuration methods, but pipelines are a new way of doing things. |
I agree -- I think having them in nodejs/build alongside other relevant configuration (ansible, etc) would be helpful
Would definitely be worthwhile to do some beta testing with some of the smaller jobs before trying to take on larger ones. I created a small CLI utility to pull some metadata about the cluster, and it looks like there are a bunch of freestyle jobs that might be good candidates to experiment with. Without knowing too much or having access to the CI admin portal, it looks like the benchmark tasks might be on the easier side to port.
I've done some work with pipelines/Jenkinsfiles in the past, but definitely not going to say I'm an expert 😅 |
This would be great, if pipelines can replace all other types of jobs. Having no downtime would be nice, but we could do with some downtime during the weekend or even during the week at nighttime. Also note that much of what we do is reacting to issues, and we need to be able to change the jobs quickly without going through a review process. It would be good to have a review process after the fact: it's good for notifying other WG members of what changed and gathering suggestions for improvement. But we need a way of reacting fast to issues. |
@joaocgreis agreed, I assume we'd have a rule that fixes for broken jobs can be landed without review (although if someone is around to take a quick look that's always good). As you say, having the PR is helpful even if it lands straightaway. I'll put this on the agenda as well, we're meeting in a couple of days, and it'd be good to get everyone's thoughts on this. |
I'm torn on this. On one hand I'm strongly in favour of getting as much config out of Jenkins as possible and the new github-hosted pipelines are really nice for this (and Groovy can be quite expressive if done well .. although it can be equally terrible). On the other hand, I've not had fantastic experience with the new Jenkins pipeline build processes, it feels like poorly implemented hack on a framework that was never designed to work that way. It could very well be that I've just not seen a well implemented Jenkins pipeline build project that's elegant and demonstrates the full potential of the feature. Have any of you? Perhaps this the way forward here is to simply implement some minor part of our CI with it and see how it goes side-by-side with our existing setup. |
I'm in favor of trying out, possibly on the jobs for one of the Work Groups. |
I'll try to do #844 as a POC |
@maclover7 FYI, we discussed this in the meeting (minutes in #845, recording here). Agreement was basically what was already said, people are positive in theory, but unsure how well things will work in practice. So we should try to do it gradually, one job at a time would be good. It's a bit difficult to work out how you could contribute (that's one of the things that will be much easier if we do this). @refack maybe you could raise a PR adding a pipeline to |
@gibfahn watched the meeting, good discussion about pros/cons. Just wanted to clarify that pipelines are implemented as a Jenkins plugin, so should be unrelated to Java version on build machines. Also, agree about strategy as discussed earlier about converting over jobs slowly, to make sure the end result is helpful.
While I think this would be great, most CI jobs don't run in this cookie-cutter fashion, and I'm not sure if this is practical. I think it makes sense to convert jobs over by "batch" (good example of this are the benchmark jobs) I'm not sure how Jenkins permissions are assigned to contributors, but I'd be willing to take a look at pipeline-izing the various benchmark jobs, since those seem fairly straightforward. |
@maclover7 good to hear re plugin, that makes this safer to tackle I think. Currently we only assign admin permissions to a smallish group under the |
I learned a bit about pipelines and started experimenting, but found one big issue. There is no good way to visualize jobs that use a matrix (like current multi-configuration jobs, such as Current pipeline jobs (like If not for this issue, I believe pipelines would be a major improvement for us. If that issue is solved in Jenkins or if there's some solution that I did not find, pipelines would certainly improve our workflow. |
@joaocgreis that page says that Blue Ocean (apparently a UI rewrite and a Jenkins plugin) has some nicer UI for looking at multi-config jobs. It might be useful to look at that. |
Hey everyone, I'd love to assist here if at all possible. We recently converted all legacy builds and DSL scripts to pipelines using shared libraries (also using blueocean). We use source control and branching to control our releases from shared libraries. We ran these in parallel with (no downtime, no risk config). We used this model to control granular access to certain modules to where access was needed. All secrets are encrypted and refereced as environment variables. Allowing us to use a single pipeline for multiple projects. As well as allowing for a more standard infrastructure as code feeling. I have only needed the UI to check failed logs, we use another plugin GitHub source branch that will scan an entire organization for Jenkinsfiles so that you never need to add another job to Jenkins. Can go in to greater detail but it cut a lot of our repetitive code more than 50%. We now only use pipelines for environments. It takes far less effort to maintain so many pipelines and resources etc. |
Closing as stale, but if anyone wants to take this up feel free to reopen. |
Currently, it looks like all Jenkins jobs are configured through the web interface. It would be advantageous if all of the jobs were managed through pipelines (a Jenkins 2 feature), which allows for job configuration to be checked into version control. This would allow for more transparency in the configuration, and using a normal code review process to approve changes.
Some key points to consider are...
If this all sounds alright, I can try and draft up a more complete project plan and migration strategy :)
The text was updated successfully, but these errors were encountered: