Skip to main content
Question

Option to remove/exclude project name from jobref on project level?

  • April 22, 2026
  • 0 replies
  • 1 view

BugHunter42
Forum|alt.badge.img

Hello,

Is there a way to reference a job from another WITHOUT the referenced job’s project name ?

Some of our users use the SCM plugin to push job definition to a GitLab instance and share the referenced same jobs between two Rundeck instances used for two different purposes. Lets call them Instance A and Instance B.

Instance A has project_X containing a referenced job_1, from job_2. Both jobs definitions are pushed to GitLab instance and cloned to project_Y on Instance B

The problem is, while the UUID and jobs name are the same on both Instance A and Instance B because both jobs do the same EXACT thing as you would except (no modification on actual jobs, they different only in terms of which nodes they’re scheduled/executed on), projects names on tho other hand reflect the purpose/environment (testing, production, level-1 support…).

That naming scheme leads to different projects name even when the jobs are the similar in terms of jobs contents (steps, scripts, commands…), thus project_Y instead of project_X on Instance B

So we end up Instance A and Instance B both having job_2 calling job_1 but these jobs are in a differently named project between both instancei.

With the project name being part of job reference identifier, the end result is a broken job reference due to different job name. When instance B cloned job_1 and job_2 from git through the SCM plugin, those jobs were added inside project_Y but job_2 references job_1 as 

 

    }, {
"jobref" : {
[…]
},
"project" : "project_X",
"useName" : "true",
"uuid" : "job_1_UID"
}

As exported from Instance A (which indeed has those jobs inside project_X)

Instead of just

    }, {
"jobref" : {
[…]
},
"useName" : "…",
"uuid" : "job_1_UID"
}



Obviously, I’m not excepting Rundeck to deduce that the correct value should be either  "project" : "project_Y" or no "project" reference at all, (instead of "project" : "project_X")  in order for the job reference to work on Instance B (which has a project_Y instead of a project_X)


But I’m looking for a workaround to disable/ignore the jobref’s project parameter inside de job definition  

This use case isn’t limited to a a single referenced job. The project we encounter is  that they used this logic on multiple jobs so editing every single job to correct the referenced job is way too much work for them since these users have a loot of jobs. And until this is resolved, some of their jobs are broken.

One option would be the change the “project” value programmatically BUT I don’t know their projects/jobs well enough for write a script for them and they probably won’t comfortable with programmatically editing their jobs on Instance B.