Hello Everyone,
I am a 3rd-year Computer Science student from India. I found GSOC project Simple Pull-Request Job Plugin very interesting and want to work on it.
But I have some concerns.
1. In project description, it's been stated as following
"Specifically, this plugin does not create jobs and does not detect branches automatically. The users are responsible for creating the jobs they need. This type of jobs have to be triggered via the existing methods (e.g. an http post to the Jenkins REST API, or via the UI)."
But then for every pull request administrator of the project needs to create a job and then trigger a build. I think this will be cumbersome.
Please let me know if I am wrong.
2. In project description, it's been stated that the pull-request job types have these input parameters:
PR Number
From Repository URL
From Branch
Target Repository URL
Target Branch
But I think this should not be the case. I have done some research on payload GitHub sends through webhooks, and I found that pull request payloads have all of the above things, so we can extract them from the pull request payload itself.
I have gone through the code of below two plugins and I think they are pretty simple.
and
https://github.com/jenkinsci/generic-webhook-trigger-plugin
We just need to get input from YAML file and do things according to that.
There is a java lib available to parse YAML file: https://github.com/FasterXML/jackson-dataformats-text/tree/master/yaml
Tutorial for above lib: https://dzone.com/articles/read-yaml-in-java-with-jackson
Please let me know what do you think.
Thanks for your interest in the Jenkins GSoC projects.
> But then for every pull request administrator of the project needs to create a job and then trigger a build. I think this will be cumbersome.
Yes that is a model that I have seen. But there there is another model which is to have a job that handles all the pull requests of a git repo to a given branch. For example say there is a git repository called jupiter/juno.git (jupiter is the name of the github org or of the bitbucket project). Then the pull requests destined to the master branch of the juno git repository could have a correspondig job called jupiter/juno/master. There could be other models too.
> pull request payloads have all of the above things, so we can extract them from the pull request payload itself.
I did not know this. How do the PR coordinates (source and destination branches and repositories) get into the variables of a build if they are not input parameters? Does this require the installation of plugins in other systems?
I would suggest that you consider preparing an application with your ideas and suggestions in a google doc document.
Best Regards,
Martin d'Anjou
We just need to get input from YAML file and do things according to that.
There is a java lib available to parse YAML file: https://github.com/FasterXML/jackson-dataformats-text/tree/master/yaml
We just need to get input from YAML file and do things according to that.
There is a java lib available to parse YAML file: https://github.com/FasterXML/jackson-dataformats-text/tree/master/yaml
According to my experience, I would rather recommend Snake YAML. Actually we use FasterXML as well in many plugins... Generally we tend to package such libs as API plugins, like this one: https://github.com/jenkinsci/jackson2-api-plugin/blob/master/pom.xml . Any library can be used.
@martindaWhile my research I came across something called EnvironmentContributor in Jenkins. Do you think that we can use this to pass required variables to the build processes?
you are proposing some YAML
format—easily handled by an existing pair of extension points in
`workflow-multibranch`. I have discussed this is another thread.
--Hello everyoneAs you all know only 2 hours are remaining for submission of GSOC proposal, hence I request all to look and comment on my proposal for the last time.Thank you.
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/gdRXZ2OuOc8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8d41048a-fb18-4e0e-ba23-6c1e2fd3b784%40googlegroups.com.
I hope that I get to work with you guys.
Abhishek Gautam