Hello,
I have a CI/CD pipeline that kicks off upon pull request creation... as a precursor to the CI/CD pipeline, I'd like to determine if the changes to the files in the pull request occurred in specific files (.java, .js. .xml, etc.) and, more specifically, the lines the developer has updated/added/etc... if the changes match specific conditions (occurred in a Java file, in a method that is an HTTP Endpoint, for example) then I'd like to send the job to Jenkins... otherwise... do nothing...
any ideas as to how I'd best accomplish this? I'd rather not send jobs to Jenkins (which could filter the files accordingly as described above) but that is network traffic and cpu swipes on a build server already burdened with a heavy resource load.
thx
Hi Enduser6,
Pipelines does not have a feature currently that can based on the contents of a commit change how the step is executed, you would have to instrument a step to perform this logic for you (maybe by having as the first step in a pipeline some code that does this filtering and makes the calls out to jenkins based on your conditions).
Kind Regards,
Nathan Burrell
Hi Nathan,
Thanks for your reply. I have found a REST API call that streams the diffs and I'll just wrap my programmatic logic to filter as needed the streamed results from that call... should work...
thx
eu6
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.