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

Unusable environment variable TRIGGERED_BUILD_NUMBER_jobname

      The plugin exports two environment variables named TRIGGERED_BUILD_NUMBER_<jobname>=<buildnumber>. However, if your job has characters outside the alphanumeric range, the variable exported is unusable. Example: my job is named project-builder, then the exported variable will be TRIGGERED_BUILD_NUMBER_project-builder=123. Because of the - character, this variable is unusable. ${TRIGGERED_BUILD_NUMBER_project-builder} does not work.

      The copy artifact plugin does a sanitation of the project name in the same export like this for it's COPYARTIFACT_BUILD_NUMBER_jobname environment var:

      projectName.toUpperCase().replaceAll("[^A-Z]+", "_")
      

      I think the the regex can be extended with 0-9 as valid characters too actually, but this would be the fix for this problem too.

          [JENKINS-14545] Unusable environment variable TRIGGERED_BUILD_NUMBER_jobname

          John van der Kamp created issue -

          any status for fixing this issue!!!

          hiteswar kumar added a comment - any status for fixing this issue!!!
          cjo9900 made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          cjo9900 made changes -
          Assignee Original: huybrechts [ huybrechts ] New: cjo9900 [ cjo9900 ]

          cjo9900 added a comment -

          cjo9900 added a comment - Pull request for this fix https://github.com/jenkinsci/parameterized-trigger-plugin/pull/27

          Can you please consider this fix in coming release of this plugin.
          and can you please share next release schedule and bug fixes included?

          hiteswar kumar added a comment - Can you please consider this fix in coming release of this plugin. and can you please share next release schedule and bug fixes included?

          Code changed in jenkins
          User: cjo9900
          Path:
          src/main/java/hudson/plugins/parameterizedtrigger/BuildInfoExporterAction.java
          src/main/resources/hudson/plugins/parameterizedtrigger/BlockableBuildTriggerConfig/help-block.html
          http://jenkins-ci.org/commit/parameterized-trigger-plugin/2a276922f90844924b1a32fd1fec7133e1db9311
          Log:
          [FIXED JENKINS-14545] Correct Env variables

          Extend and correct Enviroment variables that are provided when
          using block until other projects are completed, in the trigger/call
          other projects buildstep.

          Extended vaiables to provide the full list of projects triggered, and
          the full list of builds triggered when using the parameter factories.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: cjo9900 Path: src/main/java/hudson/plugins/parameterizedtrigger/BuildInfoExporterAction.java src/main/resources/hudson/plugins/parameterizedtrigger/BlockableBuildTriggerConfig/help-block.html http://jenkins-ci.org/commit/parameterized-trigger-plugin/2a276922f90844924b1a32fd1fec7133e1db9311 Log: [FIXED JENKINS-14545] Correct Env variables Extend and correct Enviroment variables that are provided when using block until other projects are completed, in the trigger/call other projects buildstep. Extended vaiables to provide the full list of projects triggered, and the full list of builds triggered when using the parameter factories.
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]

          Code changed in jenkins
          User: cjo9900
          Path:
          src/main/java/hudson/plugins/parameterizedtrigger/BuildInfoExporterAction.java
          src/main/resources/hudson/plugins/parameterizedtrigger/BlockableBuildTriggerConfig/help-block.html
          src/test/java/hudson/plugins/parameterizedtrigger/test/BuildInfoExporterTest.java
          http://jenkins-ci.org/commit/parameterized-trigger-plugin/ac43521d48e99eb0f441e9e89d810771791267fd
          Log:
          [FIXED JENKINS-14545] Correct and add testcases for Env variables

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: cjo9900 Path: src/main/java/hudson/plugins/parameterizedtrigger/BuildInfoExporterAction.java src/main/resources/hudson/plugins/parameterizedtrigger/BlockableBuildTriggerConfig/help-block.html src/test/java/hudson/plugins/parameterizedtrigger/test/BuildInfoExporterTest.java http://jenkins-ci.org/commit/parameterized-trigger-plugin/ac43521d48e99eb0f441e9e89d810771791267fd Log: [FIXED JENKINS-14545] Correct and add testcases for Env variables

          Code changed in jenkins
          User: cjo9900
          Path:
          src/main/java/hudson/plugins/parameterizedtrigger/BuildInfoExporterAction.java
          src/main/resources/hudson/plugins/parameterizedtrigger/BlockableBuildTriggerConfig/help-block.html
          src/test/java/hudson/plugins/parameterizedtrigger/test/BuildInfoExporterTest.java
          http://jenkins-ci.org/commit/parameterized-trigger-plugin/fae74afa6b3f88ce184635079f766ee5ba91e2d7
          Log:
          Merge branch 'JENKINS-14545' of git://github.com/cjo9900/parameterized-trigger-plugin into 2.17-RC

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: cjo9900 Path: src/main/java/hudson/plugins/parameterizedtrigger/BuildInfoExporterAction.java src/main/resources/hudson/plugins/parameterizedtrigger/BlockableBuildTriggerConfig/help-block.html src/test/java/hudson/plugins/parameterizedtrigger/test/BuildInfoExporterTest.java http://jenkins-ci.org/commit/parameterized-trigger-plugin/fae74afa6b3f88ce184635079f766ee5ba91e2d7 Log: Merge branch ' JENKINS-14545 ' of git://github.com/cjo9900/parameterized-trigger-plugin into 2.17-RC

            cjo9900 cjo9900
            john John van der Kamp
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: