-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Improve SCM info in build scans #45264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve SCM info in build scans #45264
Conversation
Signed-off-by: Mark Vieira <[email protected]>
Pinging @elastic/es-core-infra |
Signed-off-by: Mark Vieira <[email protected]>
Signed-off-by: Mark Vieira <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
@@ -18,26 +18,32 @@ buildScan { | |||
value 'Jenkins Worker Label', it | |||
} | |||
|
|||
def isPrBuild = System.getenv('ROOT_BUILD_CAUSE_GHPRBCAUSE') != null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be boolean, no need for def?
link 'Source', "https://github.com/elastic/elasticsearch/tree/${System.getenv('ghprbActualCommit')}" | ||
link 'Pull Request', System.getenv('ghprbPullLink') | ||
} else { | ||
def branch = System.getenv('GIT_BRANCH').split('/').last() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be String, no need for def?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR removes usage of the Nebula SCM plugin info for decorating build scans. This information tended to be quite inaccurate in many scenarios so instead we just use known Jenkins environment variables for these things. We also include some additional information exposed by Jenkins for pull requests such as the PR number, target branch and link back to the original PR.