Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering of files in a pull request

enduser6 July 6, 2018

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

1 answer

0 votes
lassian
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2018

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

enduser6 July 24, 2018

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events