CI: podman3 cannot run rootless and some little fixes in pipeline
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -241,6 +241,10 @@ pipeline {
|
|||||||
stage ("Terminate") {
|
stage ("Terminate") {
|
||||||
parallel {
|
parallel {
|
||||||
stage('Terminate UE') {
|
stage('Terminate UE') {
|
||||||
|
// Bypassing this stage if there are no abd server defined
|
||||||
|
when {
|
||||||
|
expression { params.ADB_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo '\u2705 \u001B[32mTerminate UE\u001B[0m'
|
echo '\u2705 \u001B[32mTerminate UE\u001B[0m'
|
||||||
withCredentials([
|
withCredentials([
|
||||||
@@ -275,6 +279,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Terminate SPGW') {
|
stage('Terminate SPGW') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
|
echo '\u2705 \u001B[32mTerminate SPGW\u001B[0m'
|
||||||
withCredentials([
|
withCredentials([
|
||||||
@@ -292,6 +300,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Terminate MME') {
|
stage('Terminate MME') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
|
echo '\u2705 \u001B[32mTerminate MME\u001B[0m'
|
||||||
withCredentials([
|
withCredentials([
|
||||||
@@ -309,6 +321,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Terminate HSS') {
|
stage('Terminate HSS') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
|
echo '\u2705 \u001B[32mTerminate HSS\u001B[0m'
|
||||||
withCredentials([
|
withCredentials([
|
||||||
@@ -371,6 +387,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Log Collection (SPGW)') {
|
stage('Log Collection (SPGW)') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
@@ -389,6 +409,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Log Collection (MME)') {
|
stage('Log Collection (MME)') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
@@ -407,6 +431,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Log Collection (HSS)') {
|
stage('Log Collection (HSS)') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
@@ -425,6 +453,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Log Collection (Ping)') {
|
stage('Log Collection (Ping)') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
@@ -443,6 +475,10 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Log Collection (Iperf)') {
|
stage('Log Collection (Iperf)') {
|
||||||
|
// Bypassing this stage if EPC server is not defined
|
||||||
|
when {
|
||||||
|
expression { params.EPC_IPAddress != "none" }
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
@@ -482,7 +518,7 @@ pipeline {
|
|||||||
// Making sure that we really shutdown every thing before leaving
|
// Making sure that we really shutdown every thing before leaving
|
||||||
failure {
|
failure {
|
||||||
script {
|
script {
|
||||||
if (!termStatusArray[termUE]) {
|
if ((!termStatusArray[termUE]) && (params.ADBIPAddress != "none")) {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||||
]) {
|
]) {
|
||||||
@@ -496,21 +532,21 @@ pipeline {
|
|||||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!termStatusArray[termSPGW]) {
|
if ((!termStatusArray[termSPGW]) && (params.EPC_IPAddress != "none")) {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
]) {
|
]) {
|
||||||
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
sh "python3 ci-scripts/main.py --mode=TerminateSPGW --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!termStatusArray[termMME]) {
|
if ((!termStatusArray[termMME]) && (params.EPC_IPAddress != "none")) {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
]) {
|
]) {
|
||||||
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
sh "python3 ci-scripts/main.py --mode=TerminateMME --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCType=${params.EPC_Type} --EPCSourceCodePath=${params.EPC_SourceCodePath}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!termStatusArray[termHSS]) {
|
if ((!termStatusArray[termHSS]) && (params.EPC_IPAddress != "none")) {
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||||
]) {
|
]) {
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ class Containerize():
|
|||||||
self.cli = 'docker'
|
self.cli = 'docker'
|
||||||
self.dockerfileprefix = '.ubuntu18'
|
self.dockerfileprefix = '.ubuntu18'
|
||||||
elif self.host == 'Red Hat':
|
elif self.host == 'Red Hat':
|
||||||
self.cli = 'podman'
|
self.cli = 'sudo podman'
|
||||||
self.dockerfileprefix = '.rhel8.2'
|
self.dockerfileprefix = '.rhel8.2'
|
||||||
|
|
||||||
imageNames = []
|
imageNames = []
|
||||||
|
|||||||
Reference in New Issue
Block a user