How To Trigger Another Job in Jenkins Using Pipeline

preview_player
Показать описание
Need help with your Jenkins questions?

Timecodes ⏱:

00:00 Introduction
00:06 Overview
00:24 Starting point
00:51 Review build step documentation
01:59 Run job1
02:16 Generate the build step syntax
02:52 Update job1 with the build step
03:22 Run and review job1 and job2
04:04 Modify job2 to cause a failure
04:40 Run and review job1 and job2

#jenkinstutorial

Information referenced in this video:

How To Configure Upstream and Downstream Jobs in Jenkins

Jenkins LTS 2.375.1

CloudBees on Twitter:

Darin on Twitter:
Рекомендации по теме
Комментарии
Автор

Thanks, this is useful 👍, might want to mention how to trigger a multibranch pipeline with a branch name.

twndomn
Автор

Good tutirial but i need the same to run remote jenkins A job, from my jenkins B pipeline

AmdocsStudy
Автор

I was about to like this video but it's right at 69. Let's keep it there and instead share and rewatch :D

lrebollo
Автор

Thanks for all. I want to know on which agent job1 is running or job2? Because I can see that you have 2 agent

pierrekarka
Автор

Would be interesting to know - how to block/disable/prevent users from doing it. We have 2 folders, first for development and second folder for production. And we used Project-Based Matrix Auth strategy so developers can do development, but only restricted group can do production jobs. This split of permissions working in UI, but developers still can trigger/run production jobs from their development jobs.
Is there any way to block / prevent this behavior?

oleksandrlytvyn
Автор

How to pass env vars to downstream job? I'm using parameters but it doesn't work for me: build job: 'scan', parameters: [string(name: 'images', value: env.IMAGES)]. IMAGES is a dynamical list of docker images defined in environment section of my pipeline. In the downstream job I tried to use IMAGES as ${params.images}

mitya
Автор

How do i get the console of job2 also to be displayed in job1?

nithin.krishna.t
Автор

Hi
How can we deploy cloud run through cloud bees?
Can u please help me with it

bballipati