Declarative pipeline dynamic stage names?

2020-05-08 Thread debjyoti sarkar
If you are passing the build type and storing it in a def variable you can use a where clause of a if else loop to verify the same. Have you tried it? -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop

Re: Jenkins Pipeline Error

2020-05-08 Thread Gajanan Mahajan
when directive is to execute if stage should be executed or not. You might have when directive at wrong place. Please refer to document for more details - -https://www.jenkins.io/doc/book/pipeline/syntax/#when On Fri, May 8, 2020 at 5:40 PM MANISH JOSHI wrote: > Please help out > >

Re: Declarative pipeline dynamic stage names?

2020-05-08 Thread Mark Waite
I can't find any way to do that with declarative pipeline. On Fri, May 8, 2020 at 6:09 AM Lyubomir Grigorov wrote: > Hello, > Do you know if it is possible, for a declarative jenkins pipeline, to have > stage names calculated dynamically, via usage of a variable for example? > I have a

Re: sshget is showing the entire contents of the file in console output log

2020-05-08 Thread cw
>From the jira ticket: I found a bug in the code, going to fix it soon to not to print the file in scp mode. I was using this code: soc_remote.fileTransfer = 'scp' and for now i just removed that line, which apparently sets it back to the default of sftp, which does not have the bug. I am

Active Choice Parameter + Read Property from Inventory file

2020-05-08 Thread debjyoti sarkar
Hi, I have a declarative pipeline in which I have a file called inventory which I want to parse in Active Choice Plugin. Below is the inventory file. [qaservers] qa1 qa2 qa3 qa4 [devservers] dev1 dev2 dev3 [prodservers] prod1 prod2 I want to parse this in groovy and dynamically retrieve the

Re: Declarative pipeline dynamic stage names?

2020-05-08 Thread cw
Not sure about declarative pipelines, but I have it working in a scripted pipeline: stage("Run log gather script on ${server}") On Friday, May 8, 2020 at 8:10:02 AM UTC-4, Lyubomir Grigorov wrote: > > Hello, > Do you know if it is possible, for a declarative jenkins pipeline, to have > stage

Jenkins Pipeline Error

2020-05-08 Thread MANISH JOSHI
Please help out java.lang.NoSuchMethodError: No such DSL method 'when' found among steps [archive, bat, build, catchError, checkout, deleteDir, dir, dockerFingerprintFrom, dockerFingerprintRun, echo, emailext, emailextrecipients, envVarsForTool, error, fileExists, findBuildScans,

Declarative pipeline dynamic stage names?

2020-05-08 Thread Lyubomir Grigorov
Hello, Do you know if it is possible, for a declarative jenkins pipeline, to have stage names calculated dynamically, via usage of a variable for example? I have a pipeline, which initially had stages for prod and stages for dev. Different workers were assigned with static labels. I've changed the

Role based strategy - pattern for jobs for example two maps deep

2020-05-08 Thread Nico van de Kamp
Hello, We use the plugin "Role strategy plugin / project matrix authorisation" Let say I have in a map jobs like this: mapx/ - job 1 - job 2 etc. Than the pattern is for example ^mapx.*, with Build, Cancel, Discover and Read. This working fine. Now I have this mapy - - job 1 -

Jenkins Pipeline: If job fails it will run again on next poll.

2020-05-08 Thread Sahil Arora
Team, I have a pipeline job where my Jenkinsfile is on SCM. I have enabled poll SCM on jenkins, but i'm facing issue that if no change done at git still my job triggering. It is happen in case my prious build is in failed state. When a job detected by polling fails, it will run again the next