Jenkins - Stage before "Source Code Management"

1.1k views Asked by At

I need my build to run only if some conditions are met. For that I need to insert a check procedure before running the built-in "Source Code Management" that updates the svn working copy. Is there a way to do that?

1

There are 1 answers

1
Gerold Broser On BEST ANSWER

1) Use the Conditional BuildStep Plugin:

  • <your project> → configure
  • Disable the builtin SCM: → Source Code ManagementNone
  • Add build stepConditional step (multiple)
  • Configure the Run? condition according to your needs
  • Add step to conditionExecute shellCommands: ... the commands to update your SVN working copy ...
  • Add step to condition → ... whatever your build is supposed to do ...

2) Or create an extra project containing your check procedure and trigger your project as its downstream project according to its build result.