Тёмный

How to trigger downstream jobs with Jenkins pipeline 

DevBObs
Подписаться 594
Просмотров 14 тыс.
50% 1

In this video, I show demos about how to trigger a Jenkins downstream job using declarative + scripted syntax, also I provide examples of how to configure multiple parameters as an input, and how to get the status of the triggered job.
#### All related to Jenkins build job ####
jenkins.io/doc...

Опубликовано:

 

13 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@user-kt7bn7gq8h
@user-kt7bn7gq8h 2 года назад
Great video man! I was looking for a downstream pipeline trigger and parametar sharing option for a whole day! Your work is appreciated!
@Nodorgrom
@Nodorgrom Год назад
Most true helpful an information with awesome examples!
@danielviloria929
@danielviloria929 4 года назад
Great explanation. Thanks for sharing your knowledge
@DevBObs
@DevBObs 4 года назад
My pleasure!
@arjunbalakrishnan7458
@arjunbalakrishnan7458 3 года назад
Thank you for saving my life! Appreciate your explanation!
@DevBObs
@DevBObs 3 года назад
No problem.
@anilkumar-rq1od
@anilkumar-rq1od 3 года назад
Good video with simple example thank you👍👍
@DevBObs
@DevBObs 3 года назад
Glad you liked it
@suprajakarumanchi9683
@suprajakarumanchi9683 Год назад
Thanks for the Nice video. May I know how to set environment/global variables so that they can be used across stages. I have used environment {} for static. To create dynamic enviroment variables I want to clarify what is the best way to do it.
@lindelaninthangeni8221
@lindelaninthangeni8221 3 года назад
Thanks a lot mate
@DevBObs
@DevBObs 3 года назад
Glad it helped
@munniras3377
@munniras3377 10 месяцев назад
could you post starter and release jobs groovy files please.
@DevBObs
@DevBObs 5 месяцев назад
Sorry for delayed answer. Could you elaborate more so I can try to help?
@sindujasinduja6157
@sindujasinduja6157 2 года назад
Hi..thanks for the video. Is it possible to send a user input as a parameter from one pipeline to other instead of predefined jenkins variable build number
@DevBObs
@DevBObs 2 года назад
Yes it is. Use the input feature, create an environment variable and send it in the parameter section to the other side.
@DevBObs
@DevBObs 2 года назад
Go to the input section here www.jenkins.io/doc/book/pipeline/syntax/ take a look how you can catch the value and that value here, can be send to the other jenkins job as a parameter too. 😊
@madhavreddy6008
@madhavreddy6008 4 года назад
Sir,Thanks for this video.This video helped me a lot.I just want to know one thing sir: If job-a fails then it should not trigger the job-b.Can you please help me how can i do that one.
@DevBObs
@DevBObs 4 года назад
You can get the status of the job execution and ask for the status in the result variable.
@DevBObs
@DevBObs 4 года назад
Example is ``` def job_a = build job.... job_a.getResult() ...//So you can handle your logic with this result ```
@madhavreddy6008
@madhavreddy6008 4 года назад
@@DevBObs Thank You So Much for Replying to my msg sir
@DevBObs
@DevBObs 4 года назад
Just let me know if you were able to solved. In other case, I will try to do a demo
@madhavreddy6008
@madhavreddy6008 4 года назад
@@DevBObs Ok Sir,I will try & let u know the result
@asatya786
@asatya786 Год назад
Hey, Thank you for the video. It's really nice I want downstream job to be triggered only when my upstream in successful, can we do that ?
@DevBObs
@DevBObs Год назад
Yes you can.
@DevBObs
@DevBObs Год назад
You have to use the variables result and ask for == SUCCESS and not Null. Sometimes the job doesn't fail and the result variable is null.
@Riddhi_Gupta.
@Riddhi_Gupta. 3 года назад
option to change non blocking to blocking in jenkins while triggering downstream job from jenkins pipeline
@sabrinakung4936
@sabrinakung4936 2 года назад
Hi, I'm wondering if it is possible to tigger another pipeline job on different Jenkins pod?
@DevBObs
@DevBObs 2 года назад
Yes, absolutely
@sammycoolbabe
@sammycoolbabe 4 года назад
Is any plug-ins required for using that build job syntax?
@madhavreddy6008
@madhavreddy6008 4 года назад
No Plugin is required to use that build job syntax.If you want to execute a job with parameters then you must to have install "Parameterized Trigger Plugin"
@Sri-mx7zj
@Sri-mx7zj 4 года назад
can we get logs of down stream job as well ? and send an attachment
@DevBObs
@DevBObs 3 года назад
You can send the logs from job-b, each job knows how to handle the logs.
@JTJDWB
@JTJDWB 2 года назад
Hello! I would like to know if i want to create a subproject on the page using pipeline script how do i do it? Because for freestyle projects the downstream projects will be shown on the page but not for pipeline and i am currently using pipeline and i want to display the downstream project! Looking forward to your reply :)
@DevBObs
@DevBObs 2 года назад
You wont see it. It is a Jenkins ui design. The downstream jobs are going to be shown in the logs. 😉
@JTJDWB
@JTJDWB 2 года назад
@@DevBObs oh thank you for replying!! Is it because it has to be triggered by an upstream project for the Subproject section to appear? This was what i read online about the plugin!
@balajid5461
@balajid5461 3 года назад
May I know how to use job1 env variables in Job2?
@DevBObs
@DevBObs 3 года назад
You can't but you can use parameters to send environment variables to job2
@ravipremani6201
@ravipremani6201 2 года назад
Hi, Can you please help me on how can I attach my downstream job to my upstream pipeline Basically I want my pipeline (upstream job) should be integrated with the downstream job
@DevBObs
@DevBObs 2 года назад
Hi. Sorry i didn't get the question. This is actually what i am doing in the job. The job excution can be anything. Is your downstream job a pipeline too or simply a job?
@ravipremani6201
@ravipremani6201 2 года назад
@@DevBObs Basically my upstream job is triggering the downstream job and it ends there, from there my downstream job starts I want like my upstream should wait till the time my downstream job is completed
@DevBObs
@DevBObs 2 года назад
@@ravipremani6201 ok got it. You can add an extra property to the job definition. After propagate you can add wait: true. That will wait until downstream job finished.
@DevBObs
@DevBObs 2 года назад
@@ravipremani6201 please let me know whether that worked or not.
@ravipremani6201
@ravipremani6201 2 года назад
@@DevBObs so when I kept the wait : true property it is waiting in the upstream job itself it is not going in the downstream job My upstream job takes max 2 seconds to complete
@amitsethi0843
@amitsethi0843 Год назад
I have been trying to run the following but it keeps throwing an error saying No item named /var/lib/jenkins/workspace/jenkins-script/jenkinsMain found build job: "/var/lib/jenkins/workspace/jenkins-script/jenkinsMain", parameters: [ [ $class:'StringParameterValue',name: 'buildSteps',value: 'build/deploy'] ]
@himanshuupadhyay2520
@himanshuupadhyay2520 Год назад
Hi, i am also facing same issue. Did you figured out how to resolve it?
@DevBObs
@DevBObs 5 месяцев назад
I hope you both solve the issue. I was out for a while.
Далее
Jenkins running as a Service
6:01
Просмотров 513
How to design a modern CI/CD Pipeline
9:59
Просмотров 127 тыс.
Vibes in Ney York🗽❤️! #shorts
00:26
Просмотров 6 млн
How To Trigger Another Job in Jenkins Using Pipeline
5:49
Vibes in Ney York🗽❤️! #shorts
00:26
Просмотров 6 млн