I was always wondering what the differences between both types are, and when I have to use which. I thought there are differences of commands that I can use. But if this is the only difference, then I don't need to worry anymore since they seem to be almost the same.
Great video however the title is slightly confusing. This is just a one specific difference. Would be great to show examples where scripted pipeline should be used instead of declarative one
Hello everyone, I'm currently working with scripted (non-declarative) Jenkins pipelines, and I'm looking to implement a condition similar to the when directive found in declarative pipelines. I want to be able to conditionally execute certain stages based on specific variables or conditions. I'm particularly interested in having stages appear greyed out (indicating they were skipped) using a declarative-like method. Does anyone know the equivalent of when or a similar approach for handling this in a scripted pipeline? Thank you in advance for your help!
o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath solitio nfor this errors when i systemctl start jenkins idont get answer and jenkins doesnt works
Thank you for giving a quick tip on differences
I was always wondering what the differences between both types are, and when I have to use which. I thought there are differences of commands that I can use. But if this is the only difference, then I don't need to worry anymore since they seem to be almost the same.
nicely explained
Great video however the title is slightly confusing. This is just a one specific difference. Would be great to show examples where scripted pipeline should be used instead of declarative one
Hello everyone,
I'm currently working with scripted (non-declarative) Jenkins pipelines, and I'm looking to implement a condition similar to the when directive found in declarative pipelines.
I want to be able to conditionally execute certain stages based on specific variables or conditions. I'm particularly interested in having stages appear greyed out (indicating they were skipped) using a declarative-like method. Does anyone know the equivalent of when or a similar approach for handling this in a scripted pipeline?
Thank you in advance for your help!
Very helpful thank you
For scripted pipeline, how do you declare a particular agent ?
is that the only difference?
watching the video how did you create 1 pipeline by reading 2 jenkinsfiles in 2 different jobs?
I understand... you created a directory and inside the 2 jobs calling them 01-basic/Jenkinsfile-scripted and 01-basic/Jenkinsfile-declarative
Hi, what if we need to skip a middle stage in the declarative pipeline and run the other two stages, any solutions?
then simply remove that stage script temporarily or comment it
You can use a flag variable and wrap the code under the if (flag) {}.
Is this the only difference?
here you can find a couple additional differences - th-cam.com/video/Ei_Nk14vruE/w-d-xo.html
o.e.j.s.handler.ContextHandler#setContextPath: Empty contextPath solitio nfor this errors
when i systemctl start jenkins idont get answer and jenkins doesnt works