[JIRA] (JENKINS-61987) Update default value of job parameter after change in Jenkinsfile

4 views
Skip to first unread message

pkruk@parasoft.com (JIRA)

unread,
Apr 21, 2020, 6:36:03 AM4/21/20
to jenkinsc...@googlegroups.com
Piotr Krukowiecki created an issue
 
Jenkins / New Feature JENKINS-61987
Update default value of job parameter after change in Jenkinsfile
Issue Type: New Feature New Feature
Assignee: Unassigned
Components: pipeline-model-definition-plugin
Created: 2020-04-21 10:35
Priority: Minor Minor
Reporter: Piotr Krukowiecki

Changes to the parameter defaultValue in Jenkinsfile are not reflected in existing Jenkins job after executing the job.

  • use following parameter definition:
properties([
    parameters([
        string(name: 'EXCLUDE', defaultValue: 'pattern', description: 'Exclude jobs that match this regexp'),
    ]),
]) 
  • add new job and run it for the first time, go to job configuration - the job should now have this parameter with "pattern' default value
  • change in the Jenkinsfile pattern to "pattern2"
  • run the job again and go to job configuration - the job will still have the old value "pattern"
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

pkruk@parasoft.com (JIRA)

unread,
Apr 21, 2020, 6:37:02 AM4/21/20
to jenkinsc...@googlegroups.com
Piotr Krukowiecki updated an issue
Change By: Piotr Krukowiecki
Changes to the parameter *defaultValue* in Jenkinsfile are not reflected in existing Jenkins job after executing the job.
* use following parameter definition:

{code:java}
properties([
    parameters([
        string(name: 'EXCLUDE', defaultValue: 'pattern', description: '
Exclude jobs that match this regexp description '),
    ]),
]) {code}
* add new job and run it for the first time, go to job configuration - the job should now have this parameter with "pattern' default value
* change in the Jenkinsfile pattern to "pattern2"
* run the job again and go to job configuration - the job will still have the old value "pattern"

pkruk@parasoft.com (JIRA)

unread,
Apr 21, 2020, 6:42:03 AM4/21/20
to jenkinsc...@googlegroups.com
Piotr Krukowiecki commented on New Feature JENKINS-61987
 
Re: Update default value of job parameter after change in Jenkinsfile

I'm sorry. It looks like I had a syntax error in my Jenkinsfile. After fixing it, Jenkins is picking up my changes in defaultValue.

pkruk@parasoft.com (JIRA)

unread,
Apr 21, 2020, 6:44:03 AM4/21/20
to jenkinsc...@googlegroups.com
Piotr Krukowiecki closed an issue as Not A Defect
 

Closing

Change By: Piotr Krukowiecki
Status: Open Closed
Resolution: Not A Defect
Reply all
Reply to author
Forward
0 new messages