3

BACKGROUND : We have one Selenium automation project which is shared in BitBucket repository. Project is maven project. we have 10 testng.xml files for all modules

OVERVIEW: Now we want to trigger the automation build once any changes committed in AUT application code. Also want to trigger the build for failed testcase in Post Step as well, So we will be sure with actual test failure. Once this execution done then it should send the email with report attachment.

PROBLEM: We are unable to decide What would be feasible Jenkins Job or Jenkins Pipeline ?

TRIALS : I have idea regarding Jenkins Job like setting up maven job and configuring post build trigger, email configuration but not clear enough as a layman.

2

Jenkins Job and Jenkins Pipeline are basically the same. In a pipeline you define the steps of your job as groovy code (actually it is CPS https://github.com/jenkinsci/workflow-cps-plugin, but that should in general just be a custom groovy interpreter).

The point, that is making pipelines "better", form my perspective, is, that you can add those in so-called Jenkinsfiles alongside your code. So you have your build job versionized alongside your application code.

So I would recommend: Take the time to learn how these Jenkins pipelines work and use those. But if you do not want or if you do not have the time, then doing it with plain-old Jenkins jobs is fine as well.

  • Also note that you can create a Jenkins Pipeline and choose Git as where you want to store the source code, then use the Pipeline GUI to create the Pipeline. The Jenkinsfile will be added to your git repo, and you can push changes to that file directly. What I'm getting at is that you won't be forever committed to using the GUI with Pipeline. – Olivia Stork Jul 27 '18 at 19:48

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.