Commit 5a4e7312 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 b275a6c7
...@@ -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-amf/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-amf/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}"
......
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