-2

I want to pass the git change set information that is checked out of a multi-branch pipeline job to a downstream job that runs the test of this build and sends an email to committers if the build is broken after the test, is there anyway to do this?

zstring
  • 27
  • 5

1 Answers1

0

This has been answer here: Git Variables in Jenkins Workflow plugin

After you have the Git variables you can just pass them as standard parameters between jobs.

--- Update ---

An example build call might be:

build job: 'Trial_Test_Pipe',
      parameters: [string(name: 'GIT_BRANCH', value: ${GIT_BRANCH}),
                   string(name: 'GIT_COMMIT', value: ${GIT_COMMIT}),
                   string(name: 'GIT_COMMITTER_NAME', value: ${GIT_COMMITTER_NAME)]
Nick Holt
  • 158
  • 1
  • 10
  • When you say pass them as standard parameters do you mean string? How do I pass it to a job I call with "build job" – zstring May 28 '19 at 08:48
  • Hi @zstring, yes you could pass them as string parameters from the upstream to the downstream job – Nick Holt May 28 '19 at 09:42