Details
-
Type:
Improvement
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: branch-api-plugin
-
Labels:None
-
Similar Issues:
Description
Popular maven plugins designed to give you access to the git branch name are ineffective when using the workflow Multibranch Plugin.
- The JGit Build Number plugin at https://github.com/alx3apps/jgit-buildnumber falls back to coimmit id because GIT_BRANCH is not getting populated
- The Git Commit ID Maven Plugin from https://github.com/ktoso/maven-git-commit-id-plugin also fails to extract the branch (unsure why)
For multbranch builds it's reasonable to expect use cases where the branch info is use to augment artifact names and manifest entries so people can easily distinguish branch built artifacts from one.
Would be nice if the DSL just made this state available - but populating the env would be a nice start.
Attachments
Issue Links
- is blocking
-
JENKINS-30744 multibranch issues if branch contains /
-
- Closed
-
- is related to
-
JENKINS-24141 SCM with non-AbstractProject, revisited
-
- Closed
-
-
JENKINS-47226 Provide easy access to git branch name in (single branch) Pipeline build
-
- Open
-
-
JENKINS-32244 Environment variable for current branch
-
- Resolved
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Comment |
[ I tried to log out the env.JOB_NAME with echo " *** ${env.JOB_NAME} *** " and got ... Running: Print Message *** ${env.JOB_NAME} *** ... ] |
Labels | multibranch |
Remote Link | This issue links to "Stack Overflow (Web Link)" [ 13165 ] |
Link |
This issue is blocking |
Link |
This issue is related to |
Status | Open [ 1 ] | In Progress [ 3 ] |
Component/s | branch-api-plugin [ 18621 ] | |
Component/s | workflow-plugin [ 18820 ] |
Labels | multibranch |
Remote Link | This issue links to "PR 12 (Web Link)" [ 13403 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Link |
This issue is related to |
Workflow | JNJira [ 165345 ] | JNJira + In-Review [ 197691 ] |
Link | This issue is related to JENKINS-47226 [ JENKINS-47226 ] |
Depends on RFE to let SCM pass environment variables to a Run.
Workaround: env.JOB_NAME