Commit cf236eea authored by Raphael Defosseux's avatar Raphael Defosseux

fix(ci): little typo at the start of pipeline

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 1590ebcb
...@@ -106,7 +106,7 @@ pipeline { ...@@ -106,7 +106,7 @@ pipeline {
// Filling the committer email in case of error // Filling the committer email in case of error
gitCommitAuthorEmailAddr = env.gitlabUserEmail gitCommitAuthorEmailAddr = env.gitlabUserEmail
try { try {
myShCmd('docker image inspect --format="Size = {{.Size}} bytes" vpp-upf-base:' + VPP_UPF_U18_BASE_IMAGE_TAG, rem_u18_host_flag, rem_u18_host_user, rem_u18_host) myShCmdNoDir('docker image inspect --format="Size = {{.Size}} bytes" vpp-upf-base:' + VPP_UPF_U18_BASE_IMAGE_TAG, rem_u18_host_flag, rem_u18_host_user, rem_u18_host)
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
echo '\u26D4 \u001B[31mUbuntu18 Base Image does not exist\u001B[0m' echo '\u26D4 \u001B[31mUbuntu18 Base Image does not exist\u001B[0m'
...@@ -114,7 +114,7 @@ pipeline { ...@@ -114,7 +114,7 @@ pipeline {
} }
if (rem_rhel_host_flag) { if (rem_rhel_host_flag) {
try { try {
myShCmd('sudo podman image inspect --format="Size = {{.Size}} bytes" vpp-upf-base:' + VPP_UPF_RHEL7_BASE_IMAGE_TAG, rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host) myShCmdNoDir('sudo podman image inspect --format="Size = {{.Size}} bytes" vpp-upf-base:' + VPP_UPF_RHEL7_BASE_IMAGE_TAG, rem_rhel_host_flag, rem_rhel_host_user, rem_rhel_host)
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
echo '\u26D4 \u001B[31mRHEL7 Base Image does not exist\u001B[0m' echo '\u26D4 \u001B[31mRHEL7 Base Image does not exist\u001B[0m'
...@@ -516,6 +516,14 @@ def myShCmd(cmd, flag, user, host) { ...@@ -516,6 +516,14 @@ def myShCmd(cmd, flag, user, host) {
} }
} }
def myShCmdNoDir(cmd, flag, user, host) {
if (flag) {
sh "ssh -t -t ${user}@${host} '${cmd}'"
} else {
sh "${cmd}"
}
}
def myShRetCmd(cmd, flag, user, host) { def myShRetCmd(cmd, flag, user, host) {
if (flag) { if (flag) {
ret = sh returnStdout: true, script: "ssh -t -t ${user}@${host} 'cd /tmp/CI-CN-UPF-VPP && ${cmd}'" ret = sh returnStdout: true, script: "ssh -t -t ${user}@${host} 'cd /tmp/CI-CN-UPF-VPP && ${cmd}'"
......
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