Reputation: 3171
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.
Upvotes: 0
Views: 489
Reputation: 22411
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:
Upvotes: 1