How to trigger a Jenkins build in Gerrit Trigger on change to two directories -


i'm using gerrit trigger plugin jenkins trigger job. want trigger job if files folder 1 and folder 2 changed. far understanding concerned, following configuration can trigger job if files folder 1 or folder 2 changed. how can and condition? i'll appreciate help.

click here see gerrit trigger plugin configuration screenshot

as workaround, may fetch changes on job trigger , check if changes done in both dirs.continue when both condition meet. pseudo-code groovy/pipeline:

// changes sh 'git diff-tree --no-commit-id --name-only -r head > changes.txt'  //create list changes,each entry  def file = readfile "changes.txt" changed_files=file.split('\n')  //iterate on changed_files , check if trigger directories present //flag if found  //if conditions met,continue build 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -