Skip to content

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

Merged
merged 3 commits into from
Aug 7, 2019

Conversation

mark-vieira
Copy link
Contributor

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.

@mark-vieira mark-vieira added the :Delivery/Build Build or test infrastructure label Aug 6, 2019
@mark-vieira mark-vieira requested review from rjernst and alpar-t August 6, 2019 22:37
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Member

@rjernst rjernst left a 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
Copy link
Member

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()
Copy link
Member

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?

Copy link
Contributor

@alpar-t alpar-t left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mark-vieira mark-vieira merged commit 6ee7c7f into elastic:master Aug 7, 2019
@mark-vieira mark-vieira deleted the improved-scm-scan-info branch August 7, 2019 16:04
mark-vieira added a commit that referenced this pull request Aug 7, 2019
mark-vieira added a commit that referenced this pull request Aug 7, 2019
lcawl pushed a commit to lcawl/elasticsearch that referenced this pull request Aug 7, 2019
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure Team:Delivery Meta label for Delivery team v6.8.3 v7.3.1 v7.4.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants