Skip to content
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

resolve hardcoded github.com in variable-functions #18040

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions buildenv/jenkins/common/variables-functions.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1005,13 +1005,6 @@ def add_string_params(PARAMETERS_TO_ADD) {
}
}

def add_pr_to_description() {
if (params.ghprbPullId) {
def TMP_DESC = (currentBuild.description) ? currentBuild.description + "<br>" : ""
currentBuild.description = TMP_DESC + "<a href=https://github.com/${params.ghprbGhRepository}/pull/${params.ghprbPullId}>PR #${params.ghprbPullId}</a>"
}
}

def setup() {
set_job_variables(params.JOB_TYPE)

Expand Down Expand Up @@ -1075,10 +1068,9 @@ def set_job_variables(job_type) {
set_node(job_type)
// set variables for a build job
set_build_variables()
add_pr_to_description()
break
case "pipeline":
currentBuild.description = "<a href=\"${RUN_DISPLAY_URL}\">Blue Ocean</a>"
currentBuild.description += "<br><a href=\"${RUN_DISPLAY_URL}\">Blue Ocean</a>"
// set variables for a pipeline job
set_repos_variables()
set_adoptopenjdk_tests_repository()
Expand All @@ -1088,7 +1080,6 @@ def set_job_variables(job_type) {
set_test_misc()
set_slack_channel()
set_restart_timeout()
add_pr_to_description()
break
case "wrapper":
//set variable for pipeline all/personal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ try {
buildFile.setup_pull_request()
}

// Add link of PullRequest in description, if it is set
if (ghprbPullLink) {
def ghprbPullLink_hyperlink_tag = "<a href='${ghprbPullLink}'>PR #${ghprbPullId}</a>: ${ghprbPullTitle}"
CUSTOM_DESCRIPTION = ((CUSTOM_DESCRIPTION) ? CUSTOM_DESCRIPTION + "<br>" : "") + ghprbPullLink_hyperlink_tag
}

BUILD_SPECS.putAll(variableFile.get_specs(SPECS))

// parse variables file and initialize variables
Expand Down