0

This SO answer has the list of environment variables which gets injected automatically when a Jenkins job is triggered by a gerrit event, but if Jenkins is started manually with a gerrit number as input parameter, how to fetch those GERRIT_* env variables and inject? so the list of environment variables will be same for job started by gerrit event or started manually with gerrit number as input parameter.

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
rodee
  • 3,233
  • 5
  • 34
  • 70

1 Answers1

1

You can't do that easly, you would have to use the REST API to search for the GERRIT_* values you're interested in.

But there's another option that, maybe, can solve your problem:

You can re-trigger any job, as it had been trigged at that moment, with all environment variables set. Do the following:

  • Go to Jenkins web interface
  • Click on Jenkins > Query and Trigger Gerrit Patches
  • Search/select the Changes/Patchsets you want
  • Click on Trigger Selected