Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23474

Duplicate Parameters link in left nav

    XMLWordPrintable

Details

    Description

      There are two Parameters links shown on the left nav of a parameterized build page. See attached screenshot.

      Attachments

        1. build.xml
          2 kB
        2. build-1.xml
          7 kB
        3. Capture.JPG
          Capture.JPG
          46 kB
        4. config.xml
          2 kB
        5. config-1.xml
          9 kB
        6. image-2021-10-11-11-46-10-076.png
          image-2021-10-11-11-46-10-076.png
          34 kB
        7. screenshot-1.png
          screenshot-1.png
          77 kB

        Activity

          danielbeck Daniel Beck added a comment -

          Too little information to investigate. Could you attach the build's build.xml and the project's config.xml?

          danielbeck Daniel Beck added a comment - Too little information to investigate. Could you attach the build's build.xml and the project's config.xml?

          Same here:

          jenkins@jenkins:/home/jenkins/jobs/DeployBack/builds/468$ cat build.xml
          <?xml version='1.0' encoding='UTF-8'?>
          <build>
            <actions>
              <hudson.model.ParametersAction>
                <safeParameters class="sorted-set">
                  <string>BUILD_DIR</string>
                  <string>BUILD_RESULT</string>
                  <string>BUILD_USER</string>
                  <string>JOB_DIR</string>
                  <string>SERVER_DIR</string>
                  <string>SERVER_NAME</string>
                  <string>hipchat_message</string>
                  <string>nginx_conf_template</string>
                </safeParameters>
                <parameters>
                  <hudson.model.StringParameterValue>
                    <name>project</name>
                    <description></description>
                    <value>gre</value>
                  </hudson.model.StringParameterValue>
                  <hudson.model.StringParameterValue>
                    <name>target</name>
                    <description></description>
                    <value>stage</value>
                  </hudson.model.StringParameterValue>
                </parameters>
                <parameterDefinitionNames class="hudson.model.ParametersDefinitionProperty$1">
                  <outer-class&gt;
                    <parameterDefinitions>
                      <hudson.model.ChoiceParameterDefinition>
                        <name>project</name>
                        <description></description>
                        <choices class="java.util.Arrays$ArrayList">
                          <a class="string-array">
                            <string>gre</string>
                            <string>cfa</string>
                            <string>wms</string>
                          </a>
                        </choices>
                      </hudson.model.ChoiceParameterDefinition>
                      <hudson.model.ChoiceParameterDefinition>
                        <name>target</name>
                        <description></description>
                        <choices class="java.util.Arrays$ArrayList">
                          <a class="string-array">
                            <string>stage</string>
                            <string>prod</string>
                          </a>
                        </choices>
                      </hudson.model.ChoiceParameterDefinition>
                    </parameterDefinitions>
                  </outer-class&gt;
                </parameterDefinitionNames>
              </hudson.model.ParametersAction>
              <hudson.model.CauseAction>
                <causeBag class="linked-hash-map">
                  <entry>
                    <hudson.model.Cause_-UserIdCause>
                      <userId>***</userId>
                    </hudson.model.Cause_-UserIdCause>
                    <int>1</int>
                  </entry>
                </causeBag>
              </hudson.model.CauseAction>
              <hudson.model.ParametersAction>
                <safeParameters class="sorted-set">
                  <string>BUILD_DIR</string>
                  <string>BUILD_RESULT</string>
                  <string>BUILD_USER</string>
                  <string>JOB_DIR</string>
                  <string>SERVER_DIR</string>
                  <string>SERVER_NAME</string>
                  <string>hipchat_message</string>
                  <string>nginx_conf_template</string>
                </safeParameters>
                <parameters>
                  <hudson.model.StringParameterValue>
                    <name>BUILD_USER</name>
                    <value>***</value>
                  </hudson.model.StringParameterValue>
                </parameters>
                <parameterDefinitionNames class="hudson.model.ParametersDefinitionProperty$1">
                  <outer-class reference="../../../hudson.model.ParametersAction/parameterDefinitionNames/outer-class"/>
                </parameterDefinitionNames>
              </hudson.model.ParametersAction>
              <hudson.model.ParametersAction>
                <safeParameters class="sorted-set">
                  <string>BUILD_DIR</string>
                  <string>BUILD_RESULT</string>
                  <string>BUILD_USER</string>
                  <string>JOB_DIR</string>
                  <string>SERVER_DIR</string>
                  <string>SERVER_NAME</string>
                  <string>hipchat_message</string>
                  <string>nginx_conf_template</string>
                </safeParameters>
                <parameters>
                  <hudson.model.StringParameterValue>
                    <name>JOB_DIR</name>
                    <value>/home/jenkins/workspace/DeployBack/../../jobs/DeployBack</value>
                  </hudson.model.StringParameterValue>
                </parameters>
                <parameterDefinitionNames class="hudson.model.ParametersDefinitionProperty$1">
                  <outer-class reference="../../../hudson.model.ParametersAction/parameterDefinitionNames/outer-class"/>
                </parameterDefinitionNames>
              </hudson.model.ParametersAction>
              <hudson.model.ParametersAction>
                <safeParameters class="sorted-set">
                  <string>BUILD_DIR</string>
                  <string>BUILD_RESULT</string>
                  <string>BUILD_USER</string>
                  <string>JOB_DIR</string>
                  <string>SERVER_DIR</string>
                  <string>SERVER_NAME</string>
                  <string>hipchat_message</string>
                  <string>nginx_conf_template</string>
                </safeParameters>
                <parameters>
                  <hudson.model.StringParameterValue>
                    <name>BUILD_DIR</name>
                    <value>/home/jenkins/workspace/DeployBack/../../jobs/DeployBack/builds/468</value>
                  </hudson.model.StringParameterValue>
                </parameters>
                <parameterDefinitionNames class="hudson.model.ParametersDefinitionProperty$1">
                  <outer-class reference="../../../hudson.model.ParametersAction/parameterDefinitionNames/outer-class"/>
                </parameterDefinitionNames>
              </hudson.model.ParametersAction>
              <hudson.model.ParametersAction>
                <safeParameters class="sorted-set">
                  <string>BUILD_DIR</string>
                  <string>BUILD_RESULT</string>
                  <string>BUILD_USER</string>
                  <string>JOB_DIR</string>
                  <string>SERVER_DIR</string>
                  <string>SERVER_NAME</string>
                  <string>hipchat_message</string>
                  <string>nginx_conf_template</string>
                </safeParameters>
                <parameters>
                  <hudson.model.StringParameterValue>
                    <name>BUILD_RESULT</name>
                    <value>null</value>
                  </hudson.model.StringParameterValue>
                </parameters>
                <parameterDefinitionNames class="hudson.model.ParametersDefinitionProperty$1">
                  <outer-class reference="../../../hudson.model.ParametersAction/parameterDefinitionNames/outer-class"/>
                </parameterDefinitionNames>
              </hudson.model.ParametersAction>
              <hudson.model.ParametersAction>
                <safeParameters class="sorted-set">
                  <string>BUILD_DIR</string>
                  <string>BUILD_RESULT</string>
                  <string>BUILD_USER</string>
                  <string>JOB_DIR</string>
                  <string>SERVER_DIR</string>
                  <string>SERVER_NAME</string>
                  <string>hipchat_message</string>
                  <string>nginx_conf_template</string>
                </safeParameters>
                <parameters>
                  <hudson.model.StringParameterValue>
                    <name>hipchat_message</name>
                    <value>***</value>
                  </hudson.model.StringParameterValue>
                </parameters>
                <parameterDefinitionNames class="hudson.model.ParametersDefinitionProperty$1">
                  <outer-class reference="../../../hudson.model.ParametersAction/parameterDefinitionNames/outer-class"/>
                </parameterDefinitionNames>
              </hudson.model.ParametersAction>
              <hudson.model.ParametersAction>
                <safeParameters class="sorted-set">
                  <string>BUILD_DIR</string>
                  <string>BUILD_RESULT</string>
                  <string>BUILD_USER</string>
                  <string>JOB_DIR</string>
                  <string>SERVER_DIR</string>
                  <string>SERVER_NAME</string>
                  <string>hipchat_message</string>
                  <string>nginx_conf_template</string>
                </safeParameters>
                <parameters>
                  <hudson.model.StringParameterValue>
                    <name>BUILD_RESULT</name>
                    <value>FAILURE</value>
                  </hudson.model.StringParameterValue>
                </parameters>
                <parameterDefinitionNames class="hudson.model.ParametersDefinitionProperty$1">
                  <outer-class reference="../../../hudson.model.ParametersAction/parameterDefinitionNames/outer-class"/>
                </parameterDefinitionNames>
              </hudson.model.ParametersAction>
              <hudson.model.ParametersAction>
                <safeParameters class="sorted-set">
                  <string>BUILD_DIR</string>
                  <string>BUILD_RESULT</string>
                  <string>BUILD_USER</string>
                  <string>JOB_DIR</string>
                  <string>SERVER_DIR</string>
                  <string>SERVER_NAME</string>
                  <string>hipchat_message</string>
                  <string>nginx_conf_template</string>
                </safeParameters>
                <parameters>
                  <hudson.model.StringParameterValue>
                    <name>hipchat_message</name>
                    <value>***</value>
                  </hudson.model.StringParameterValue>
                </parameters>
                <parameterDefinitionNames class="hudson.model.ParametersDefinitionProperty$1">
                  <outer-class reference="../../../hudson.model.ParametersAction/parameterDefinitionNames/outer-class"/>
                </parameterDefinitionNames>
              </hudson.model.ParametersAction>
              <com.sonyericsson.rebuild.RebuildAction plugin="rebuild@1.25"/>
            </actions>
            <queueId>2458</queueId>
            <timestamp>1468565248492</timestamp>
            <startTime>1468565248504</startTime>
            <result>FAILURE</result>
            <duration>4598</duration>
            <charset>UTF-8</charset>
            <keepLog>false</keepLog>
            <builtOn></builtOn>
            <workspace>/home/jenkins/workspace/DeployBack</workspace>
            <hudsonVersion>2.12</hudsonVersion>
            <scm class="hudson.scm.NullChangeLogParser"/>
            <culprits class="com.google.common.collect.EmptyImmutableSortedSet"/>
          
          warvariuc Victor Varvariuc added a comment - Same here: jenkins@jenkins:/home/jenkins/jobs/DeployBack/builds/468$ cat build.xml <?xml version= '1.0' encoding= 'UTF-8' ?> <build> <actions> <hudson.model.ParametersAction> <safeParameters class= "sorted-set" > <string>BUILD_DIR</string> <string>BUILD_RESULT</string> <string>BUILD_USER</string> <string>JOB_DIR</string> <string>SERVER_DIR</string> <string>SERVER_NAME</string> <string>hipchat_message</string> <string>nginx_conf_template</string> </safeParameters> <parameters> <hudson.model.StringParameterValue> <name>project</name> <description></description> <value>gre</value> </hudson.model.StringParameterValue> <hudson.model.StringParameterValue> <name>target</name> <description></description> <value>stage</value> </hudson.model.StringParameterValue> </parameters> <parameterDefinitionNames class= "hudson.model.ParametersDefinitionProperty$1" > < outer - class& gt; <parameterDefinitions> <hudson.model.ChoiceParameterDefinition> <name>project</name> <description></description> <choices class= "java.util.Arrays$ArrayList" > <a class= "string-array" > <string>gre</string> <string>cfa</string> <string>wms</string> </a> </choices> </hudson.model.ChoiceParameterDefinition> <hudson.model.ChoiceParameterDefinition> <name>target</name> <description></description> <choices class= "java.util.Arrays$ArrayList" > <a class= "string-array" > <string>stage</string> <string>prod</string> </a> </choices> </hudson.model.ChoiceParameterDefinition> </parameterDefinitions> </ outer - class& gt; </parameterDefinitionNames> </hudson.model.ParametersAction> <hudson.model.CauseAction> <causeBag class= "linked-hash-map" > <entry> <hudson.model.Cause_-UserIdCause> <userId>***</userId> </hudson.model.Cause_-UserIdCause> < int >1</ int > </entry> </causeBag> </hudson.model.CauseAction> <hudson.model.ParametersAction> <safeParameters class= "sorted-set" > <string>BUILD_DIR</string> <string>BUILD_RESULT</string> <string>BUILD_USER</string> <string>JOB_DIR</string> <string>SERVER_DIR</string> <string>SERVER_NAME</string> <string>hipchat_message</string> <string>nginx_conf_template</string> </safeParameters> <parameters> <hudson.model.StringParameterValue> <name>BUILD_USER</name> <value>***</value> </hudson.model.StringParameterValue> </parameters> <parameterDefinitionNames class= "hudson.model.ParametersDefinitionProperty$1" > < outer - class reference= "../../../hudson.model.ParametersAction/parameterDefinitionNames/ outer -class" /> </parameterDefinitionNames> </hudson.model.ParametersAction> <hudson.model.ParametersAction> <safeParameters class= "sorted-set" > <string>BUILD_DIR</string> <string>BUILD_RESULT</string> <string>BUILD_USER</string> <string>JOB_DIR</string> <string>SERVER_DIR</string> <string>SERVER_NAME</string> <string>hipchat_message</string> <string>nginx_conf_template</string> </safeParameters> <parameters> <hudson.model.StringParameterValue> <name>JOB_DIR</name> <value>/home/jenkins/workspace/DeployBack/../../jobs/DeployBack</value> </hudson.model.StringParameterValue> </parameters> <parameterDefinitionNames class= "hudson.model.ParametersDefinitionProperty$1" > < outer - class reference= "../../../hudson.model.ParametersAction/parameterDefinitionNames/ outer -class" /> </parameterDefinitionNames> </hudson.model.ParametersAction> <hudson.model.ParametersAction> <safeParameters class= "sorted-set" > <string>BUILD_DIR</string> <string>BUILD_RESULT</string> <string>BUILD_USER</string> <string>JOB_DIR</string> <string>SERVER_DIR</string> <string>SERVER_NAME</string> <string>hipchat_message</string> <string>nginx_conf_template</string> </safeParameters> <parameters> <hudson.model.StringParameterValue> <name>BUILD_DIR</name> <value>/home/jenkins/workspace/DeployBack/../../jobs/DeployBack/builds/468</value> </hudson.model.StringParameterValue> </parameters> <parameterDefinitionNames class= "hudson.model.ParametersDefinitionProperty$1" > < outer - class reference= "../../../hudson.model.ParametersAction/parameterDefinitionNames/ outer -class" /> </parameterDefinitionNames> </hudson.model.ParametersAction> <hudson.model.ParametersAction> <safeParameters class= "sorted-set" > <string>BUILD_DIR</string> <string>BUILD_RESULT</string> <string>BUILD_USER</string> <string>JOB_DIR</string> <string>SERVER_DIR</string> <string>SERVER_NAME</string> <string>hipchat_message</string> <string>nginx_conf_template</string> </safeParameters> <parameters> <hudson.model.StringParameterValue> <name>BUILD_RESULT</name> <value> null </value> </hudson.model.StringParameterValue> </parameters> <parameterDefinitionNames class= "hudson.model.ParametersDefinitionProperty$1" > < outer - class reference= "../../../hudson.model.ParametersAction/parameterDefinitionNames/ outer -class" /> </parameterDefinitionNames> </hudson.model.ParametersAction> <hudson.model.ParametersAction> <safeParameters class= "sorted-set" > <string>BUILD_DIR</string> <string>BUILD_RESULT</string> <string>BUILD_USER</string> <string>JOB_DIR</string> <string>SERVER_DIR</string> <string>SERVER_NAME</string> <string>hipchat_message</string> <string>nginx_conf_template</string> </safeParameters> <parameters> <hudson.model.StringParameterValue> <name>hipchat_message</name> <value>***</value> </hudson.model.StringParameterValue> </parameters> <parameterDefinitionNames class= "hudson.model.ParametersDefinitionProperty$1" > < outer - class reference= "../../../hudson.model.ParametersAction/parameterDefinitionNames/ outer -class" /> </parameterDefinitionNames> </hudson.model.ParametersAction> <hudson.model.ParametersAction> <safeParameters class= "sorted-set" > <string>BUILD_DIR</string> <string>BUILD_RESULT</string> <string>BUILD_USER</string> <string>JOB_DIR</string> <string>SERVER_DIR</string> <string>SERVER_NAME</string> <string>hipchat_message</string> <string>nginx_conf_template</string> </safeParameters> <parameters> <hudson.model.StringParameterValue> <name>BUILD_RESULT</name> <value>FAILURE</value> </hudson.model.StringParameterValue> </parameters> <parameterDefinitionNames class= "hudson.model.ParametersDefinitionProperty$1" > < outer - class reference= "../../../hudson.model.ParametersAction/parameterDefinitionNames/ outer -class" /> </parameterDefinitionNames> </hudson.model.ParametersAction> <hudson.model.ParametersAction> <safeParameters class= "sorted-set" > <string>BUILD_DIR</string> <string>BUILD_RESULT</string> <string>BUILD_USER</string> <string>JOB_DIR</string> <string>SERVER_DIR</string> <string>SERVER_NAME</string> <string>hipchat_message</string> <string>nginx_conf_template</string> </safeParameters> <parameters> <hudson.model.StringParameterValue> <name>hipchat_message</name> <value>***</value> </hudson.model.StringParameterValue> </parameters> <parameterDefinitionNames class= "hudson.model.ParametersDefinitionProperty$1" > < outer - class reference= "../../../hudson.model.ParametersAction/parameterDefinitionNames/ outer -class" /> </parameterDefinitionNames> </hudson.model.ParametersAction> <com.sonyericsson.rebuild.RebuildAction plugin= "rebuild@1.25" /> </actions> <queueId>2458</queueId> <timestamp>1468565248492</timestamp> <startTime>1468565248504</startTime> <result>FAILURE</result> <duration>4598</duration> <charset>UTF-8</charset> <keepLog> false </keepLog> <builtOn></builtOn> <workspace>/home/jenkins/workspace/DeployBack</workspace> <hudsonVersion>2.12</hudsonVersion> <scm class= "hudson.scm.NullChangeLogParser" /> <culprits class= "com.google.common.collect.EmptyImmutableSortedSet" />

          I think this is related to my custom env. variable injector:

          /*
          Inject environment variables using Groovy because EnvInject plugin is not user-friendly
          */
          
          import hudson.model.*
          
          def console = manager.listener.logger.&println
          
          // read the props file
          def props = new Properties()
          new File("${manager.envVars['WORKSPACE']}/postbuild.props").withInputStream { 
              stream -> props.load(stream) 
          }
          
          props.each{
              key, value -> console("${key}:${value}")
              def pa = new ParametersAction([
                  new StringParameterValue(key, value)
              ])
              manager.build.addAction(pa)
          } 
          

          I use this code to inject env. vars into the build, so that the next steps would see them.

          warvariuc Victor Varvariuc added a comment - I think this is related to my custom env. variable injector: /* Inject environment variables using Groovy because EnvInject plugin is not user-friendly */ import hudson.model.* def console = manager.listener.logger.&println // read the props file def props = new Properties() new File( "${manager.envVars[ 'WORKSPACE' ]}/postbuild.props" ).withInputStream { stream -> props.load(stream) } props.each{ key, value -> console( "${key}:${value}" ) def pa = new ParametersAction([ new StringParameterValue(key, value) ]) manager.build.addAction(pa) } I use this code to inject env. vars into the build, so that the next steps would see them.
          aaronlawrence_umajin Aaron added a comment -

          I now have 3 Parameters links. Using Jenkins 2.289.2

           

          aaronlawrence_umajin Aaron added a comment - I now have 3 Parameters links. Using Jenkins 2.289.2  
          caseyjhol Casey Holzer added a comment -

          I'm also encountering this issue when using the Parameterized Scheduler plugin (the "Build periodically with parameters" build trigger). Jobs without this setting do not have duplicates.

          • Jenkins v2.319.3
          • Parameterized Scheduler v0.6.3
          caseyjhol Casey Holzer added a comment - I'm also encountering this issue when using the Parameterized Scheduler plugin (the "Build periodically with parameters" build trigger). Jobs without this setting do not have duplicates. Jenkins v2.319.3 Parameterized Scheduler v0.6.3

          People

            Unassigned Unassigned
            dsoa D Soa
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: