jenkinsci / jenkinsci/parameterized-trigger-plugin

[JENKINS-45711] Parmaterized Variable not passing to downstream jobs

Open
#729 0 comments 0 reactions 0 assignees View on GitHub
component:parameterized-trigger-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
77
Forks
174
Avg merge
22h 27m
Merged PRs (30d)
1

Description

I have a webhook from gitlab that kicks off a jenkins job.  I am writing the GIT_COMMIT environment variable to a file, and using the paramterized build to pass that key:value string to the next job.

However, when the next job kicks off, which runs an ansible playbook, I noticed that the variable I am passing via the parameterized trigger plugin is empty.  To verify its not an issue with ansible, I ran a shell command at the start of the second job, to echo out the variable.  The echo command produced no output.

 

I am setting the value in the first jenkins job via a shell command

echo "GIT_KEY=${GIT_COMMIT}" >/tmp/git_tag_test.txt

 

And then in a post build action, I select Trigger parmeterized builds on other projects.  I am using the properties from the file above, and I verified the properties file contains the GIT_KEY=githashvalue.

After searching for similar issues, I also set the following in the JAVA_OPTS for jenkins, in hopes this would help, but it had no impact.

-Dhudson.model.ParametersAction.keepUndefinedParameters=true

---
Originally reported by tman, imported from: Parmaterized Variable not passing to downstream jobs


  • assignee: huybrechts
  • status: Open
  • priority: Major
  • component(s): parameterized-trigger-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 2
  • imported: 2025-12-07

Raw content of original issue

I have a webhook from gitlab that kicks off a jenkins job.  I am writing the GIT_COMMIT environment variable to a file, and using the paramterized build to pass that key:value string to the next job.

However, when the next job kicks off, which runs an ansible playbook, I noticed that the variable I am passing via the parameterized trigger plugin is empty.  To verify its not an issue with ansible, I ran a shell command at the start of the second job, to echo out the variable.  The echo command produced no output.

 

I am setting the value in the first jenkins job via a shell command
echo "GIT_KEY=${GIT_COMMIT}" >/tmp/git_tag_test.txt

 

And then in a post build action, I select Trigger parmeterized builds on other projects.  I am using the properties from the file above, and I verified the properties file contains the GIT_KEY=githashvalue.

After searching for similar issues, I also set the following in the JAVA_OPTS for jenkins, in hopes this would help, but it had no impact.

-Dhudson.model.ParametersAction.keepUndefinedParameters=true

  • environment: Jenkins 2.54 running on ubuntu 16.04. Using git plugin 3.3.0 and parameterized trigger plugin 2.33

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.