Commit b2077c77 authored by Raphael Defosseux's avatar Raphael Defosseux

CI: fix Merge Request URL recovery

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 1f78950f
...@@ -121,7 +121,8 @@ pipeline { ...@@ -121,7 +121,8 @@ pipeline {
script { script {
sh "git clean -x -d -f > /dev/null 2>&1" sh "git clean -x -d -f > /dev/null 2>&1"
if ("MERGE".equals(env.gitlabActionType)) { if ("MERGE".equals(env.gitlabActionType)) {
gitlabMergeRequestLink = sh "curl --silent \"https://gitlab.eurecom.fr/api/v4/projects/oai%2Fcn5g%2Foai-cn5g-nrf/merge_requests/${env.gitlabMergeRequestIid}\" | jq .web_url | sed 's#\"##g'" gitlabMergeRequestLink = sh returnStdout: true, script: "curl --silent 'https://gitlab.eurecom.fr/api/v4/projects/oai%2Fcn5g%2Foai-cn5g-nrf/merge_requests/${env.gitlabMergeRequestIid}' | jq .web_url | sed 's#\"##g'"
gitlabMergeRequestLink = gitlabMergeRequestLink.trim()
echo "========= THIS IS A MERGE REQUEST ==========" echo "========= THIS IS A MERGE REQUEST =========="
echo "MR ID is ${env.gitlabMergeRequestIid}" echo "MR ID is ${env.gitlabMergeRequestIid}"
echo "MR LINK is ${gitlabMergeRequestLink}" echo "MR LINK is ${gitlabMergeRequestLink}"
......
...@@ -111,7 +111,7 @@ class HtmlReport(): ...@@ -111,7 +111,7 @@ class HtmlReport():
buildSummary += ' </tr>\n' buildSummary += ' </tr>\n'
if self.git_pull_request: if self.git_pull_request:
buildSummary += ' <tr>\n' buildSummary += ' <tr>\n'
buildSummary += ' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Source Branch</td>\n' buildSummary += ' <td bgcolor="lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Merge Request URL</td>\n'
buildSummary += ' <td><a href="TEMPLATE_MERGE_REQUEST_LINK">TEMPLATE_MERGE_REQUEST_LINK</a></td>\n' buildSummary += ' <td><a href="TEMPLATE_MERGE_REQUEST_LINK">TEMPLATE_MERGE_REQUEST_LINK</a></td>\n'
buildSummary += ' </tr>\n' buildSummary += ' </tr>\n'
buildSummary += ' <tr>\n' buildSummary += ' <tr>\n'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment