-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support Jenkins as build executor #89
Comments
Yeah I'd love to see a Jenkins executor implemented. From memory when I was thinking about this, the way forward was for UET to output |
I've only briefly looked at Job DSL and Pipeline DSL, but haven't figured out yet how to 're-enter' them with additional generated pipeline code (at least, not in an easy way like GitLab allows). Is there a specific reason Job DSL caught your interest? |
I think I have two potential approaches to the 'generate, then execute' approach for Groovy-based Jenkins DSL's (I don't think it matters if it's implemented in a scripted Pipeline DSL or Jobs DSL?):
I am quite new to a lot of concepts here so I'm checking it with you to see if I'm not spitting out complete nonsense. What are your thoughts? |
The load/execute of a Groovy file is maybe the best option, since the Job DSL might not be the right approach - I just remember years ago that was how we ended up generating very complex pipelines for Unreal because the pipeline DSL wasn't quite powerful enough. Though since Job DSL does generate jobs at the Jenkins level, maybe it isn't the right approach for dynamic jobs (because then we'd need to uniquely name them per build and clean them up afterwards?) The other issue we'll have with Jenkins/pipeline DSL is that it doesn't look like it yet supports arbitrary dependencies on pipeline steps, only trivial parallelization. https://stackoverflow.com/a/59923355/529646 mentions using locks to block parts of the parallel graph, but I don't know whether this will acquire build nodes in Jenkins and then block (which would not be ideal because you could then deadlock without enough nodes). Then there is always the nuclear option of having UET implement a build executor that directly calls https://ci.jenkins.io/createItem with the Jenkins XML for that particular step of BuildGraph and then submits it to the build queue. The downside of this would be that the equivalent "generate" step on GitLab would actually be a "build" step on Jenkins, where a node is allocated just to run the |
The more I think about it, the more I'm thinking the "UET build executor directly calls the remote access API" is the best way to go. We don't need to deal with pipeline DSL limitations, Groovy syntax or require developers to update their Jenkins build configurations to fix bugs. https://ci.jenkins.io/api/ unfortunately doesn't let me see the actual endpoints, but a real Jenkins instance should surface the whole API there. The endpoints we'd be interested in are:
If we can't figure these endpoints out from the Jenkins API endpoint, we might need to reverse engineer the calls from something like https://github.com/arangamani/jenkins_api_client which implements them in an SDK. |
That sounds like a proper challenge, I hope you don't mind me taking a shot at it! :) |
I have UET running in a basic, non-distributed form on my Jenkins server. I would like to see if a Jenkins executor can be implemented.
I want to give it a shot implementing this myself using their Pipeline DSL system, but I think it would be good to open an issue here to share some knowledge, perhaps you already looked into this?
The text was updated successfully, but these errors were encountered: