-
Notifications
You must be signed in to change notification settings - Fork 121
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
Jenkins Remote Execution Custom Task #697
Comments
@waveywaves - FYI in case you were unaware ^^ @waveywaves == Vibhav :-) |
@imjasonh - in case this has not bubbled up in your RH onboarding - a possible historical reference for launching jenkins and jenkins pipelines from k8s (in this case k8s == openshift) @akram and @waveywaves now own ^^ but I was the original owner I'm in no way trying to (at least yet) endorse any carry over from all that work to what your are trying to accomplish here, but perhaps we should have a more detailed voice to voice discussion |
Hi @imjasonh , can you PTAL at this https://github.com/tektoncd/catalog/blob/master/task/trigger-jenkins-job/0.1/README.md ? cc @chmouel |
There is other jenkins task in catalog which is a bit more generic : https://github.com/tektoncd/catalog/blob/master/task/jenkins/0.1/README.md |
Yeah those catalog tasks are a great inspiration, and I think the custom task controller would likely do mostly the same thing. The difference in this case is that instead of having the Job triggered and watched from one Pod for each ongoing Job, there would be one centralized controller responsible for starting and watching all ongoing Jobs. I would expect this to be more efficient, and more fault tolerant. Instead of having N containers running effectively I've previously prototyped a similar controller for running remote builds on Google Cloud Build, and I think this would operate in mostly the same way. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/lifecycle frozen |
Opening this issue to collect ideas, discussion, interest, etc., for a custom task controller that executes a Jenkins Job on a remote Jenkins installation, watches it to completion, and reports success/failure, and maybe emits some results.
This would be the reverse of Vibhav's Jenkins Plugin for Tekton, which starts and watches Tekton executions from Jenkinsland. This new controller would let Jenkins users slowly adopt Tekton, either by having their Jenkins workloads kick off Tekton workloads, or now, vice versa. Or perhaps both, horrifyingly. 😨
This custom task could define a new CRD type that defines the Jenkins Job to create, possibly with parameters (and workspaces? Maybe?), and define them in the pipeline spec:
When run, the custom task controller would look up a
example.dev/v0
/JenkinsJob
custom resource object namedmy-jenkins-job
, which might look like:...then send that config to a remote Jenkins installation using the Remote Access API. After submitting, the controller would update the
Run
with any information about the Job it created, and proceed to poll the Job by repeatedly callingEnqueueAfter
likewait-task
does, until the Job is complete (or timeout).Now, the part where I plead for help: I have basically no experience with Jenkins, I've only read documentation, but this seems doable at least as far as I can tell. Input from someone with more experience here would be very useful.
The text was updated successfully, but these errors were encountered: