I have two environments - front-end and back-end. My front-end deployment has one job and my back-end deployment has another job. My team wants to deploy both front-end and back-end together. Can combine them into single job?

Ideally, they can choose whatever environment and respective branches they required to deploy for their testings in this one job.

  • 1
    Why not combine them into a single repo since they're dependant on one another and have a single build that results in multiple artifacts? I don't recommend using job chaining at all. Look to a publisher/subscribe model using something like pub/sub light plugin or pub/sub on the Cloudbees side.
    – casey vega
    Apr 13 '20 at 22:00

A pretty standard way of doing this would be to chain your jobs or your pipelines. This lets you keep separate jobs (which can be useful), but lets you trigger one job from the other and visualize the end-to-end flow.

So, you still just tell one job to run, but it runs both properly. Their config and logs are still well separated and you get all the other isolation related benefits.

Example: https://www.jrebel.com/blog/using-jenkins-build-pipelines

You can also do this in normal Jenkins jobs not using a pipeline; there is an option to trigger other jobs near the bottom usually.

  • No according to my scenario my backend job is having ecs environments like thor, panther, etc.. So in our backend job people will select one of the environments listed in choice parameters of the job and deploy in that environment so in this case of parametrized trigger plugin how can i pass the parameters of my backend job in parent job so that it trigger my child jobs parameters to select the environment
    – suri hima
    Apr 14 '20 at 6:36

Yes. Use multi-job project to combine FE phase and BE phase together. Or if you used pipeline, just add those pipelines under "build" step.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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