[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-11-18 Thread f.mod...@gmx.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Falko Modler commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Annother super annoyed user here (sorry to say that, but that's just the truth). We are setting up most of our jobs via JCasC (which wraps JobDSL) and every single time we execute our JCasC yaml files, all properties that are defined by the respective pipeline scripts are lost: parameters, triggers, sidebar links etc. Losing parameters of jobs that are triggered not by human project members but by other systems/scripts (e.g. Pull Request Notifier for Bitbucket Server) is especially painful. Those jobs frequently triggered by human project members will sooner or later re-receive their parameters because someone will just click "Build Now" eventually but those jobs triggered from outside will just never run (rejected because of "unknown" parameters?). Every single time we execute our JCasC scripts we have to go through a list of jobs and "fix" them by clicking "Build Now". Yes, we could write a script for that but some jobs don't have parameters. Instead they need to have their scm-polling re-initialized. Since some of those jobs run for many hours, so we need to abort them right away. Writing a script for all those cases feels like investing too much time on the wrong end of the problem. I am willing to contribute a fix but where to start? What is the right approach? Should we start with an opt-in to preserve (instead of wipe) parameters, triggers etc.?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins 

[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-08-30 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 So if you're not using Job DSL, please open a separate JIRA. If you're using the properties step in Scripted Pipeline or the parameters directive in Declarative, those do try to preserve job properties and build parameters defined outside of the pipeline, but Job DSL is still going to wipe out whatever is in the properties and parameters when it runs its seed job. Also, don't ever call properties step more than once in a pipeline - you're gonna run into a bunch of potential pitfalls there.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.181174.1492775896000.3242.1567167060569%40Atlassian.JIRA.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-08-30 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-43758  
 
 
  Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Component/s: 
 job-dsl-plugin  
 
 
Component/s: 
 build-pipeline-plugin  
 
 
Component/s: 
 pipeline  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.181174.1492775896000.3220.1567166942042%40Atlassian.JIRA.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-08-29 Thread bmathus+ossj...@cloudbees.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Baptiste Mathus assigned an issue to Unassigned  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-43758  
 
 
  Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
Change By: 
 Baptiste Mathus  
 
 
Assignee: 
 Andrew Bayer  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.181174.1492775896000.3033.1567144201282%40Atlassian.JIRA.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-07-01 Thread ss_vinot...@yahoo.co.in (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 vinoth SS commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Andrew Bayer Any update on this issue? was there any upgrade in the plugin to fix this issue, Or do we need to go with Alexander's Wrokaround? I tried with latest JOB DSL 1.74 plugin as well it is still having the issue. Please do update the roadmap/ fix  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.181174.1492775896000.13917.1562033940521%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-04-09 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 [~aarondmarasco_vsi], to my knowledge there is no way to get  current  job properties in the format suitable for *properties{}*.   The only way I can see of doing this would be to access the individual getters on *currentBuild.rawBuild.parent* (an instance of [WorkflowRun|https://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins/workflow/job/WorkflowRun.html] ) and then transform their current values into arguments to *properties{}.*  This would certainly be brittle, and if you use Script Security, this will require approval.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-04-09 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 [~aarondmarasco_vsi], to my knowledge there is no way to get job properties in the format suitable for *properties{}*.   The only way I can see of doing this would be to access the individual getters on *currentBuild.rawBuild.parent* (an instance of [WorkflowRun| [ https://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins/workflow/job/WorkflowRun.html] ]  ) and then transform their current values into arguments to *properties{}.*  This would certainly be brittle, and if you use Script Security, this will require approval.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-04-09 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 [~aarondmarasco_vsi], to my knowledge there is no way to get job properties in the format suitable for *properties{}*.   The only way I can see of doing this would be to access the individual getters on *currentBuild.rawBuild.parent* (an instance of [WorkflowRun|[https://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins/workflow/job/WorkflowRun.html]]) and then transform their current values into arguments to *properties{}.*  This would certainly be brittle, and if you use Script Security, this will require approval.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-04-09 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 [~aarondmarasco_vsi], to my knowledge there is no way to get job properties in the format suitable for *properties{}*.   The only way I can see of doing this would be to access the individual getters on *currentBuild.rawBuild.parent* (an instance of [WorkflowRun|[https://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins/workflow/job/WorkflowRun.html]] ) and then transform their current values into arguments to *properties{}.*  This would certainly be brittle, and if you use Script Security, this will require approval.   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-04-09 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Aaron Marasco, to my knowledge there is no way to get job properties in the format suitable for properties{}.    The only way I can see of doing this would be to access the individual getters on currentBuild.rawBuild.parent (an instance of [WorkflowRun|https://javadoc.jenkins.io/plugin/workflow-job/org/jenkinsci/plugins/workflow/job/WorkflowRun.html]) and then transform their current values into arguments to properties{}.  This would certainly be brittle, and if you use Script Security, this will require approval.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-04-09 Thread aaron.mara...@bia-boeing.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Aaron Marasco commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Just stumbled on this bug as well, wondering why I lose my JobDSL parameters after a run. Alexander Komarov has a great workaround above, but I really need what Michal Rysanek is asking for - a way to get the current properties so I can add to them.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-02-28 Thread michal_...@rysanek.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michal Rysanek edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Last comment/question - is there _any_ way to read the properties LinkedHashMap?  I would like to expand on [~akom]'s workaround - read/store the live properties, add/modify one then write them back into the actual live object; this way I wouldn't have to force others to use my processes in the pipeline (I develop libraries for other developers to use in their builds, and need to set SOME properties, but don't want to stomp on theirs).  Alternately providing a "properties <<" or a "properties.append([somepropertylist])" might be less destructive to other people already using the current behavior to intentionally wipe previous properties.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-02-28 Thread michal_...@rysanek.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michal Rysanek commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Last comment/question - is there any way to read the properties LinkedHashMap?  I would like to expand on Alexander Komarov's workaround - read/store the live properties, add/modify one then write them back into the actual live object; this way I wouldn't have to force others to use my processes in the pipeline (I develop libraries for other developers to use in their builds, and need to set SOME properties, but don't want to stomp on theirs).  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-02-28 Thread michal_...@rysanek.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Michal Rysanek commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Alexander Komarov Thank you for your comment - cleared up why I was having the same issue, using all .groovy pipelines and our parameters were being wiped out by a subsequent "parameters([disableConcurrentBuilds()])". I have not seen an official roadmap for bugfixes (is there one?)  Either way I have upvoted this issue, it has (and suspect will again) caused confusion and problems for me.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-02-20 Thread dzizes...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dzizes dzizes edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 [~abayer] Any update on this?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-02-20 Thread dzizes...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dzizes dzizes commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Any update on this?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-01-21 Thread bspea...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Brian Speagle edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I have the the same issue :( I have a pipeline job that is pulled from a Github repo and the script includes the following: parameters  {  {     string(name: 'S3_BUCKET', description: 'Which bucket should we store files in?')  }   After I save the pipeline initially I am able to go back into the config and set the default value for my param. I then run the job once and everything runs great but when I access my pipeline again the default value I set in the UI for the param is gone. This happens every time I set the default value for the param in the UI and then run the job. Thanks in advance.  *FIXED! - I had some other issues with pipelines not registering webhooks for 'GitHub hook trigger for GITScm polling'. I have one pipeline that does save parameters and works with webhook registering so I compared the pipelines and noticed that I wrote them differently. I then rewrote one of my pipelines to match the structure of the one that does work and now it seems that I am able to save parameters after a build!  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-01-21 Thread bspea...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Brian Speagle commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I have the the same issue  I have a pipeline job that is pulled from a Github repo and the script includes the following:   parameters  {     string(name: 'S3_BUCKET', description: 'Which bucket should we store files in?') }   After I save the pipeline initially I am able to go back into the config and set the default value for my param. I then run the job once and everything runs great but when I access my pipeline again the default value I set in the UI for the param is gone. This happens every time I set the default value for the param in the UI and then run the job.   Thanks in advance.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-01-07 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 [~dzizes972] I am using a workaround, but you may not like it. _(The following applies to traditional pipelines.  For declarative, you may need to adjust a few things)_ h4. The workaround: # You need to bottleneck all of your *properties* setting into a single call in the pipeline - you need set all of them always, not piecemeal.  You can do it any way you like, I am including one approach below. # In this call to the *properties* closure, you need to *duplicate* all the settings you've set when you initially created the job (any that you omit will be lost). # Make sure that the rest of the code does not set individual *properties* again (or if it does, then it must set all of them in one call again)h4. My example: # All my jobs are generated via the Job DSL plugin, and the initial values for job properties (including parameters) are set there.  (The result is the same as creating the job by hand) # In addition to the normal pipeline code, I insert a block that sets *properties{}* at the top, this block duplicates all initially configured options.  Since I'm using the Job DSL plugin, I have it prepend the pipeline code with an extra chunk that takes care of all that.Here is a utility method I use in pipeline code.  It covers all the properties that I ever set, and parameters (I only use string parameters) are supplied as an array in this format: *['NAME:DEFAULTVALUE:DESCRIPTION', etc]*  {code:java}/** * This exists primarily because of a bug in Jenkins pipeline that causes * any call to the "properties" closure to overwrite all job property settings, * not just the ones being set.  Therefore, we set all properties that * the generator may have set when it generated this job (or a human). * * @param settingsOverrides a map, see defaults below. * @return */def setJobProperties(Map settingsOverrides = [:]) {def settings = [discarder_builds_to_keep:'10', discarder_days_to_keep: '', cron: null, paramsList: [], upstreamTriggers: null, disableConcurrentBuilds: false] + settingsOverrides//echo "Setting job properties.  discarder is '${settings.discarder_builds_to_keep}' and cron is '${settings.cron}' (${settings.cron?.getClass()})"def jobProperties = [//these have to be strings:buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: "${settings.discarder_days_to_keep}", numToKeepStr: "${settings.discarder_builds_to_keep}"))]if (settings.cron) {jobProperties << pipelineTriggers([cron(settings.cron)])}if (settings.upstreamTriggers) {jobProperties << pipelineTriggers([upstream(settings.upstreamTriggers)])}if (settings.disableConcurrentBuilds) {jobProperties << disableConcurrentBuilds()}if (settings.paramsList?.size() > 0) {def generatedParams = []settings.paramsList.each { //params are specified as name:default:descriptiondef parts = it.split(':', 3).toList() //I need to honor all delimiters but I want a listgeneratedParams << string(name: "${parts[0]}", defaultValue: "${parts[1] ?: ''}", description: "${parts[2] ?: ''}", trim: true)}jobProperties << parameters(generatedParams)}echo "Setting job properties: ${jobProperties}"properties(jobProperties)}{code}So my job's pipeline definition looks like this:{code:java}setJobProperties(   //each of these is optional, you may simply need the paramsList and that's it.   discarder_builds_to_keep: "30",    //cron: "",    paramsList: ['SAMPLE_PARAM:apple:Some 

[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-01-07 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 [~dzizes972] I am using a workaround, but you may not like it.h4. The workaround: # You need to bottleneck all of your *properties* setting into a single call in the pipeline - you need set all of them always, not piecemeal.  You can do it any way you like, I am including one approach below. # In this call to the *properties* closure, you need to *duplicate* all the settings you've set when you initially created the job (any that you omit will be lost).  # Make sure that the rest of the code does not set individual *properties* again (or if it does, then it must set all of them in one call again)   h4. My example: # All my jobs are generated via the Job DSL plugin, and the initial values for job properties (including parameters) are set there.  (The  resuls  result  is the same as creating the job by hand) # In addition to the normal pipeline code, I insert a block that sets *properties{}* at the top, this block duplicates all initially configured options.    # I make sure that the rest of the code never calls *properties{}* again.   Since I'm using the Job DSL plugin, I have it prepend the pipeline code with an extra chunk that takes care of all that.Here is a utility method I use in pipeline code.  It covers all the properties that I ever set, and parameters (I only use string parameters) are supplied as an array in this format: *['NAME:DEFAULTVALUE:DESCRIPTION', etc]*  {code:java}/** * This exists primarily because of a bug in Jenkins pipeline that causes * any call to the "properties" closure to overwrite all job property settings, * not just the ones being set.  Therefore, we set all properties that * the generator may have set when it generated this job (or a human). * * @param settingsOverrides a map, see defaults below. * @return */def setJobProperties(Map settingsOverrides = [:]) {def settings = [discarder_builds_to_keep:'10', discarder_days_to_keep: '', cron: null, paramsList: [], upstreamTriggers: null, disableConcurrentBuilds: false] + settingsOverrides//echo "Setting job properties.  discarder is '${settings.discarder_builds_to_keep}' and cron is '${settings.cron}' (${settings.cron?.getClass()})"def jobProperties = [//these have to be strings:buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: "${settings.discarder_days_to_keep}", numToKeepStr: "${settings.discarder_builds_to_keep}"))]if (settings.cron) {jobProperties << pipelineTriggers([cron(settings.cron)])}if (settings.upstreamTriggers) {jobProperties << pipelineTriggers([upstream(settings.upstreamTriggers)])}if (settings.disableConcurrentBuilds) {jobProperties << disableConcurrentBuilds()}if (settings.paramsList?.size() > 0) {def generatedParams = []settings.paramsList.each { //params are specified as name:default:descriptiondef parts = it.split(':', 3).toList() //I need to honor all delimiters but I want a listgeneratedParams << string(name: "${parts[0]}", defaultValue: "${parts[1] ?: ''}", description: "${parts[2] ?: ''}", trim: true)}jobProperties << parameters(generatedParams)}echo "Setting job properties: ${jobProperties}"properties(jobProperties)}{code}So my job's pipeline definition looks like this:    {code:java}setJobProperties(   //each of these is optional, you may simply need the paramsList and that's it.   discarder_builds_to_keep: "30",    //cron: "",    paramsList: ['SAMPLE_PARAM:apple:Some description'],   

[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-01-07 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 [~dzizes972] I am using a workaround, but you may not like it.h4. The workaround: # You need to bottleneck all of your *properties* setting into a single call in the pipeline - you need set all of them always, not piecemeal.  You can do it any way you like,  the above is just  I am including  one approach  below . # In this call to the *properties* closure, you need to *duplicate* all the settings you've set when you initially created the job (any that you omit will be lost).h4. My example: # All my jobs are generated via the Job DSL plugin, and the initial values for job properties (including parameters) are set there.  (The resuls is the same as creating the job by hand) # In addition to the normal pipeline code, I insert a block that sets *properties{}* at the top, this block duplicates all initially configured options.   # I make sure that the rest of the code never calls *properties{}* again.Since I'm using the Job DSL plugin, I have it prepend the pipeline code with an extra chunk that takes care of all that.Here is a utility method I use in pipeline code.  It covers all the properties that I ever set, and parameters (I only use string parameters) are supplied as an array in this format: *['NAME:DEFAULTVALUE:DESCRIPTION', etc]*  {code:java}/** * This exists primarily because of a bug in Jenkins pipeline that causes * any call to the "properties" closure to overwrite all job property settings, * not just the ones being set.  Therefore, we set all properties that * the generator may have set when it generated this job (or a human). * * @param settingsOverrides a map, see defaults below. * @return */def setJobProperties(Map settingsOverrides = [:]) {def settings = [discarder_builds_to_keep:'10', discarder_days_to_keep: '', cron: null, paramsList: [], upstreamTriggers: null, disableConcurrentBuilds: false] + settingsOverrides//echo "Setting job properties.  discarder is '${settings.discarder_builds_to_keep}' and cron is '${settings.cron}' (${settings.cron?.getClass()})"def jobProperties = [//these have to be strings:buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: "${settings.discarder_days_to_keep}", numToKeepStr: "${settings.discarder_builds_to_keep}"))]if (settings.cron) {jobProperties << pipelineTriggers([cron(settings.cron)])}if (settings.upstreamTriggers) {jobProperties << pipelineTriggers([upstream(settings.upstreamTriggers)])}if (settings.disableConcurrentBuilds) {jobProperties << disableConcurrentBuilds()}if (settings.paramsList?.size() > 0) {def generatedParams = []settings.paramsList.each { //params are specified as name:default:descriptiondef parts = it.split(':', 3).toList() //I need to honor all delimiters but I want a listgeneratedParams << string(name: "${parts[0]}", defaultValue: "${parts[1] ?: ''}", description: "${parts[2] ?: ''}", trim: true)}jobProperties << parameters(generatedParams)}echo "Setting job properties: ${jobProperties}"properties(jobProperties)}{code}So my job's pipeline definition looks like this:  {code:java}setJobProperties(   //each of these is optional, you may simply need the paramsList and that's it.   discarder_builds_to_keep: "30",    //cron: "",    paramsList: ['SAMPLE_PARAM:apple:Some description'],    //upstreamTriggers: 'some-job',   //disableConcurrentBuilds: true)//now regular pipeline code...{code} If this doesn't fit your situation, 

[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-01-07 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Dzizes dzizes I am using a workaround, but you may not like it. The workaround: 
 
You need to bottleneck all of your properties setting into a single call in the pipeline - you need set all of them always, not piecemeal.  You can do it any way you like, the above is just one approach. 
In this call to the properties closure, you need to duplicate all the settings you've set when you initially created the job (any that you omit will be lost). 
 My example: 
 
All my jobs are generated via the Job DSL plugin, and the initial values for job properties (including parameters) are set there.  (The resuls is the same as creating the job by hand) 
In addition to the normal pipeline code, I insert a block that sets properties{} at the top, this block duplicates all initially configured options.   
I make sure that the rest of the code never calls properties{} again. 
 Since I'm using the Job DSL plugin, I have it prepend the pipeline code with an extra chunk that takes care of all that. Here is a utility method I use in pipeline code.  It covers all the properties that I ever set, and parameters (I only use string parameters) are supplied as an array in this format: ['NAME:DEFAULTVALUE:DESCRIPTION', etc]    

 

/**
 * This exists primarily because of a bug in Jenkins pipeline that causes
 * any call to the "properties" closure to overwrite all job property settings,
 * not just the ones being set.  Therefore, we set all properties that
 * the generator may have set when it generated this job (or a human).
 *
 * @param settingsOverrides a map, see defaults below.
 * @return
 */
def setJobProperties(Map settingsOverrides = [:]) {
def settings = [discarder_builds_to_keep:'10', discarder_days_to_keep: '', cron: null, paramsList: [], upstreamTriggers: null, disableConcurrentBuilds: false] + settingsOverrides

//echo "Setting job properties. discarder is '${settings.discarder_builds_to_keep}' and cron is '${settings.cron}' (${settings.cron?.getClass()})"
def jobProperties = [
//these have to be strings:
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: "${settings.discarder_days_to_keep}", numToKeepStr: "${settings.discarder_builds_to_keep}"))
]

if (settings.cron) {
jobProperties << pipelineTriggers([cron(settings.cron)])
}

if (settings.upstreamTriggers) {
jobProperties << pipelineTriggers([upstream(settings.upstreamTriggers)])
}

if (settings.disableConcurrentBuilds) {
jobProperties << disableConcurrentBuilds()
}

if (settings.paramsList?.size() > 0) {
def generatedParams = []
settings.paramsList.each { //params are specified as name:default:description
def parts = it.split(':', 3).toList() //I need to honor all delimiters but I want a list

[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2019-01-06 Thread dzizes...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Dzizes dzizes commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Hello! Any update here or possible workaround?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-12-14 Thread email...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Bob Lee commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I had the same issue in which my parameters and GitHub Pull Request Builder settings would disappear after a job builds.  I had to run my seed job to recreate the project using the Job DSL to get the settings back. What worked for me to fix it was to delete the project then run the seed job. After that my settings stayed. There was probably an invalid config that was left around that caused the bug and deleting the project got rid of it.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-11-21 Thread khalil.jir...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Khalil Jiries commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I'm having same issue, here is my use case: I have a seed job that loads all Jenkins declarative pipelines jobs to jenkins. These pipelines have job parameters defined in their Jenkinsfile. Each time the seed job runs, it overrides the job parameters and remove them all. Next trigger of the build will reflect the parameters back to the job.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-10-09 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I was managing to work around this issue by setting all properties I need at once in the properties{} closure (I generate jobs with Job DSL, and would rather have them set there).  This was working fine, until I reached a *total blocker*: I cannot set the "Trigger builds remotely" token.-In other words, I generate a job that has the token set, but after running the job the token disappears, and *there is no pipeline DSL* for setting it.-  Sorry, correction - even Job DSL plugin no longer handles "Trigger builds remotely" any more in pipelineJobs (seems to only apply to freestyleJob now), so it's not configurable either at generation time or at runtime by any means.   I had to downgrade to Job DSL 1.69 due to this, see JENKINS-52743 Jenkins: 2.141, Pipeline-API: 2.29BTW: I am not using Declarative.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-10-09 Thread nfollet...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Follett edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I am having this problem with declarative pipelines.{code:java}pipeline {  agent any  options {ansiColor('xterm')// Prevent multiple pipelines from running concurrently and failing due to tfstate lock filedisableConcurrentBuilds()  }  triggers {gitlab(  branchFilterType: 'All',  triggerOnPush: false,  triggerOnMergeRequest: true,  triggerOpenMergeRequestOnPush: "never",  triggerOnNoteRequest: true,  noteRegex: "jenkins rebuild",  skipWorkInProgressMergeRequest: true,)  }  ...}{code}All of my pipelines are auto-imported from a separate job using the Job DSL plugin. I need to manually run each job once in order for the config.xml to be populated with the settings from the Jenkinsfile.  When I check the configuration in the UI after this initial run I see that the pipeline is configured with the settings shown above.  After I trigger the pipeline with a test merge request in GitLab the pipeline will succeed, but the trigger settings will disappear in the UI.  If I trigger the job again manually the trigger settings for GitLab webhooks will re-appear. [ Jenkins  ver.  2.107.3 |https://jenkins.io/]   [~akom] I am having the same problem where I have 2 jobs which have their own version of the same pipeline, are both treated exactly the same, and one has this problem and the other does not.  It's a very frustrating issue because it's inconsistent.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-10-09 Thread nfollet...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Follett edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I am having this problem with declarative pipelines.{code:java}pipeline {  agent any  options {ansiColor('xterm')// Prevent multiple pipelines from running concurrently and failing due to tfstate lock filedisableConcurrentBuilds()  }  triggers {gitlab(  branchFilterType: 'All',  triggerOnPush: false,  triggerOnMergeRequest: true,  triggerOpenMergeRequestOnPush: "never",  triggerOnNoteRequest: true,  noteRegex: "jenkins rebuild",  skipWorkInProgressMergeRequest: true,)  }  ...}{code}All of my pipelines are auto-imported from a separate job using the Job DSL plugin. I need to manually run each job once in order for the config.xml to be populated with the settings from the Jenkinsfile.  When I check the configuration in the UI after this initial run I see that the pipeline is configured with the settings shown above.  After I trigger the pipeline with a test merge request in GitLab the pipeline will succeed, but the trigger settings will disappear in the UI.  If I trigger the job again manually the trigger settings for GitLab webhooks will re-appear.[Jenkins ver. 2.107.3  |https://jenkins.io/] [~akom] I am having the same problem where I have 2 jobs which have their own version of the same pipeline, are both treated exactly the same, and one has this problem and the other does not.  It's a very frustrating issue because it's inconsistent.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-10-08 Thread nfollet...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Follett edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I am having this problem with declarative pipelines.  {code:java}pipeline {  agent any  options {ansiColor('xterm')// Prevent multiple pipelines from running concurrently and failing due to tfstate lock filedisableConcurrentBuilds()  }  triggers {gitlab(  branchFilterType: 'All',  triggerOnPush: false,  triggerOnMergeRequest: true,  triggerOpenMergeRequestOnPush: "never",  triggerOnNoteRequest: true,  noteRegex: "jenkins rebuild",  skipWorkInProgressMergeRequest: true,)  }  ...}{code}  All of my pipelines are auto-imported from a separate job using the Job DSL plugin. I need to manually run each job once in order for the config.xml to be populated with the settings from the Jenkinsfile.  When I check the configuration in the UI after this initial run I see that the pipeline is configured with the settings shown above.  After I trigger the pipeline with a test merge request in GitLab the pipeline will succeed, but the trigger settings will disappear in the UI.   If I trigger the job again manually the trigger settings for GitLab webhooks will re-appear.[Jenkins ver. 2.107.3|https://jenkins.io/]  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-10-08 Thread nfollet...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Nick Follett commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I am having this problem with declarative pipelines. 

 

pipeline {
  agent any
  options {
ansiColor('xterm')
// Prevent multiple pipelines from running concurrently and failing due to tfstate lock file
disableConcurrentBuilds()
  }
  triggers {
gitlab(
  branchFilterType: 'All',
  triggerOnPush: false,
  triggerOnMergeRequest: true,
  triggerOpenMergeRequestOnPush: "never",
  triggerOnNoteRequest: true,
  noteRegex: "jenkins rebuild",
  skipWorkInProgressMergeRequest: true,
)
  }
  ...
} 

 All of my pipelines are auto-imported from a separate job using the Job DSL plugin. I need to manually run each job once in order for the config.xml to be populated with the settings from the Jenkinsfile.  When I check the configuration in the UI after this initial run I see that the pipeline is configured with the settings shown above.  After I trigger the pipeline with a test merge request in GitLab the pipeline will succeed, but the trigger settings will disappear in the UI.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-09-20 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I was managing to work around this issue by setting all properties I need at once in the properties{} closure (I generate jobs with Job DSL, and would rather have them set there).  This was working fine, until I reached a *total blocker*: I cannot set the "Trigger builds remotely" token. - In other words, I generate a job that has the token set, but after running the job the token disappears, and *there is no pipeline DSL* for setting it. -    Sorry, correction - even Job DSL plugin no longer handles "Trigger builds remotely" anymore (seems to only apply to freestyleJob now), so it's not configurable either at generation time or at runtime by any means. Jenkins: 2.141, Pipeline-API: 2.29BTW: I am not using Declarative.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-09-20 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I was managing to work around this issue by setting all properties I need at once in the properties{} closure (I generate jobs with Job DSL, and would rather have them set there).  This was working fine, until I reached a *total blocker*: I cannot set the "Trigger builds remotely" token.-In other words, I generate a job that has the token set, but after running the job the token disappears, and *there is no pipeline DSL* for setting it.-  Sorry, correction - even Job DSL plugin no longer handles "Trigger builds remotely"  anymore  any more in pipelineJobs  (seems to only apply to freestyleJob now), so it's not configurable either at generation time or at runtime by any means.Jenkins: 2.141, Pipeline-API: 2.29BTW: I am not using Declarative.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-09-20 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I was managing to work around this issue by setting all properties I need at once in the properties{} closure (I generate jobs with Job DSL, and would rather have them set there).  This was working fine, until I reached a *total blocker*: I cannot set the "Trigger builds remotely" token.In other words, I generate a job that has the token set, but after running the job the token disappears, and *there is no pipeline DSL* for setting it.Jenkins: 2.141, Pipeline-API: 2.29 BTW: I am not using Declarative.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-09-20 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov edited a comment on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I was managing to work around this issue by setting all properties I need at once in the properties{} closure (I generate jobs with Job DSL, and would rather have them set there).  This was working fine, until I reached a *total blocker*: I cannot set the "Trigger builds remotely" token.In other words, I generate a job that has the token set, but after running the job the token disappears, and *there is no pipeline DSL* for setting it. Jenkins: 2.141, Pipeline-API: 2.29  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-09-20 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov assigned an issue to Andrew Bayer  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-43758  
 
 
  Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
Change By: 
 Alexander Komarov  
 
 
Assignee: 
 Andrew Bayer  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-09-20 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 I was managing to work around this issue by setting all properties I need at once in the properties{} closure (I generate jobs with Job DSL, and would rather have them set there).  This was working fine, until I reached a total blocker: I cannot set the "Trigger builds remotely" token. In other words, I generate a job that has the token set, but after running the job the token disappears, and there is no pipeline DSL for setting it.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-08-20 Thread vzsha...@yahoo.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Varun Shar commented on  JENKINS-43758  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
 Thanks Alexander Komarov for reopening this. In my case when my pipeline job is triggered from upstream job parameters remains intact even if my job fails but when someone trigger the job manually then it loses the parameters. 

 
displayName "Feature Tests"  parameters {
stringParam('tags', "@regression", 'Test tag to run')
stringParam('timeout', "10", 'Test timeout in minutes') lo
stringParam('environment', "ci", 'environment to run against')
}
} 

  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-43758) Parameters disappear from pipeline job after running the job

2018-08-08 Thread r...@akom.net (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Alexander Komarov reopened an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 I'm reopening because this clearly still happens in my installation. I have core and all plugins from May 2018, way later than the previous comment.  I'm not using Declarative.   As I mentioned, I don't know exactly under which conditions this occurs  - it's pretty random.  
 

  
 
 
 
 

 
 Jenkins /  JENKINS-43758  
 
 
  Parameters disappear from pipeline job after running the job   
 

  
 
 
 
 

 
Change By: 
 Alexander Komarov  
 
 
Resolution: 
 Fixed  
 
 
Status: 
 Resolved Reopened  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.