[JIRA] [parameterized-trigger-plugin] (JENKINS-34340) Don't rename job names in TRIGGERED_JOB_NAMES

2 views
Skip to first unread message

squalou.jenkins@gmail.com (JIRA)

unread,
Apr 19, 2016, 1:11:07 PM4/19/16
to jenkinsc...@googlegroups.com
squalou jenkins created an issue
 
Jenkins / Bug JENKINS-34340
Don't rename job names in TRIGGERED_JOB_NAMES
Issue Type: Bug Bug
Assignee: huybrechts
Components: parameterized-trigger-plugin
Created: 2016/Apr/19 5:10 PM
Environment: jenkins LTS 1.651.1, parameterized-trigger-plugin 2.30
master on redhat 6.4 server, slaves on redhat 7.2
Priority: Minor Minor
Reporter: squalou jenkins

I'm using parameterized-trigger-plugin like this :

  • job A runs on master , triggers job trigA on slave
  • trigA once finised publishes some output back to master
  • then job A goes on ...and tries to find the files published by trigA

TRIGGERED_JOB_NAMES could be helpful, but why the hell replace characters from original names ? By doing so, it's impossible to use these names to build the path to trhe triggered jobs workspace.

If you want to stick to this behaviour, would it be possible to have variables set to triggered_jobs_master_workspace for instance ?

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

jan.dohl@airrays.com (JIRA)

unread,
May 19, 2016, 8:06:01 AM5/19/16
to jenkinsc...@googlegroups.com
Jan Dohl commented on Bug JENKINS-34340
 
Re: Don't rename job names in TRIGGERED_JOB_NAMES

I would have worded this differently, but I, too, stumbled across this problem. We trigger a parameterized job called "param-builder" and the environment variable turns this into:

  • TRIGGERED_JOB_NAMES=param_builder

essentially replacing all "-" with "_". While I can work around that it's still quite annoying to do so.

jan.dohl@airrays.com (JIRA)

unread,
May 19, 2016, 8:07:02 AM5/19/16
to jenkinsc...@googlegroups.com
Jan Dohl edited a comment on Bug JENKINS-34340
I would have worded this differently, but I, too, stumbled across this problem. We trigger a parameterized job called "param-builder" and the environment variable turns this into:

* TRIGGERED_JOB_NAMES=param_builder


essentially replacing all "-" with "_". While I can work around that it's still quite annoying to do so.


Also, having a variable with a link to the parameterized build would be nice.

kjozef@gmail.com (JIRA)

unread,
Feb 2, 2017, 8:27:01 AM2/2/17
to jenkinsc...@googlegroups.com
Paul Walter updated an issue
 
Change By: Paul Walter
Priority: Minor Major
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

kjozef@gmail.com (JIRA)

unread,
Feb 2, 2017, 8:30:01 AM2/2/17
to jenkinsc...@googlegroups.com
Paul Walter commented on Bug JENKINS-34340
 
Re: Don't rename job names in TRIGGERED_JOB_NAMES

I am also in favor of not renaming job names to underscores as I faced the same issue as Jan.

using Jenkins 2.42 and plugin version 2.32
However there are 2 different behaviors though usage of LAST_TRIGGERED_JOB_NAME (as having BUILD_NAME=job-tmp for example):

  • when using LAST_TRIGGERED_JOB_NAME in shell script, job name will be returned from echo $LAST_TRIGGERED_JOB_NAME as job-tmp which is correct
  • when using directly in other plugins such as copy artifacts from another job, LAST_TRIGGERED_JOB_NAME will return renamed JOB_NAME as job_tmp

Therefore there is inconsistency and,which is worse, renaming which breaks functionality of returning last triggered jobs

batmat@batmat.net (JIRA)

unread,
Mar 14, 2018, 4:46:02 AM3/14/18
to jenkinsc...@googlegroups.com
Baptiste Mathus updated an issue
 
Change By: Baptiste Mathus
Attachment: screenshot-1.png
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

batmat@batmat.net (JIRA)

unread,
Mar 14, 2018, 4:49:02 AM3/14/18
to jenkinsc...@googlegroups.com
Baptiste Mathus commented on Bug JENKINS-34340
 
Re: Don't rename job names in TRIGGERED_JOB_NAMES

Stumbled into this by chance:

Sigh. Just an advice: this is not how you want to report things, if you want to have a single chance that people spend their free time fixing your issue...
*Because* of this phrasing, if I was the maintainer, I would fix everything else but this if I'm not hitting it too.

Be polite, be respectful. You're talking to humans, and humans that helps for nothing else than pleasure, and can choose whatever they work on.

My 2 cents.

Daniel.Pasto@gmail.com (JIRA)

unread,
May 7, 2018, 9:24:02 AM5/7/18
to jenkinsc...@googlegroups.com
D Pasto commented on Bug JENKINS-34340

This also conflicts with jobs using the Folders plugin.  For example, I am using this plugin to trigger a job in another folder.  I expect to be able to use $LAST_TRIGGERED_JOB_NAME in the following copyArtifacts plugin to collect artifacts, but this replaces all '/' with underscore, so fails.

Daniel.Pasto@gmail.com (JIRA)

unread,
May 7, 2018, 9:27:02 AM5/7/18
to jenkinsc...@googlegroups.com
D Pasto commented on Bug JENKINS-34340

This issue was caused by the resolution for JENKINS-14545, but we need a fix that will work in both cases.

Daniel.Pasto@gmail.com (JIRA)

unread,
May 7, 2018, 9:28:03 AM5/7/18
to jenkinsc...@googlegroups.com
D Pasto edited a comment on Bug JENKINS-34340
This also conflicts with jobs using the Cloudbees Folders plugin.  For example, I am using this plugin to trigger a job in another folder.  I expect to be able to use $LAST_TRIGGERED_JOB_NAME in the following copyArtifacts plugin to collect artifacts, but this replaces all '/' with underscore, so fails.

alexander.stohr@zf.com (JIRA)

unread,
May 28, 2019, 9:01:02 AM5/28/19
to jenkinsc...@googlegroups.com

From JENKINS-14545:
"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."

Work-around proposal:
Avoid any dashes in your names!

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages