Can I use "jenkins job builder" and create pipeline job, which I could run only specific stages in? Something like this:
pipeline:
if (condition):
stage1:
//...
if (condition):
stage2:
//...
or
pipeline:
stage1:
if (condition):
//...
stage2:
if (condition):
//...
Yes, you can add conditions in your Jenkinsfile. You have to define all your stages, and inside you add condition (like your second example). You can use the
whenexpression to do this : https://www.jenkins.io/doc/book/pipeline/syntax/#when