Ignore eNB{,1,2}{UserName,IPAddress,Password} parameters
After having transitioned to direct node names in the XML, these
parameters are not relevant anymore.
The best way to view this patch is with
git show <SHA> --ignore-all-space
This commit is contained in:
@@ -98,18 +98,10 @@ pipeline {
|
|||||||
echo "no LockResources given"
|
echo "no LockResources given"
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_IPAddress == null) {
|
|
||||||
echo "no eNB_IPAddress given"
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB_SourceCodePath == null) {
|
if (params.eNB_SourceCodePath == null) {
|
||||||
echo "no eNB_SourceCodePath given"
|
echo "no eNB_SourceCodePath given"
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_Credentials == null) {
|
|
||||||
echo "no eNB_Credentials given"
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// the following 4 parameters should be pushed by the master trigger
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
// if not present, take the job GIT variables (used for developing)
|
// if not present, take the job GIT variables (used for developing)
|
||||||
if (params.eNB_Repository == null) {
|
if (params.eNB_Repository == null) {
|
||||||
@@ -188,7 +180,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||||
]) {
|
]) {
|
||||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||||
@@ -196,7 +187,7 @@ pipeline {
|
|||||||
if (fileExists(xmlFile)) {
|
if (fileExists(xmlFile)) {
|
||||||
try {
|
try {
|
||||||
timeout (time: 60, unit: 'MINUTES') {
|
timeout (time: 60, unit: 'MINUTES') {
|
||||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
@@ -204,7 +195,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,24 +91,9 @@ pipeline {
|
|||||||
echo "no LockResources given"
|
echo "no LockResources given"
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB_SourceCodePath == null) {
|
if (params.eNB_SourceCodePath == null) {
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_SourceCodePath == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// the following 4 parameters should be pushed by the master trigger
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
// if not present, take the job GIT variables (used for developing)
|
// if not present, take the job GIT variables (used for developing)
|
||||||
if (params.eNB_Repository == null) {
|
if (params.eNB_Repository == null) {
|
||||||
@@ -187,8 +172,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||||
]) {
|
]) {
|
||||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||||
@@ -197,7 +180,7 @@ pipeline {
|
|||||||
if (fileExists(xmlFile)) {
|
if (fileExists(xmlFile)) {
|
||||||
try {
|
try {
|
||||||
timeout (time: 60, unit: 'MINUTES') {
|
timeout (time: 60, unit: 'MINUTES') {
|
||||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath}"
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
@@ -205,7 +188,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,15 +92,9 @@ pipeline {
|
|||||||
echo "no LockResources given"
|
echo "no LockResources given"
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB_SourceCodePath == null) {
|
if (params.eNB_SourceCodePath == null) {
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// the following 4 parameters should be pushed by the master trigger
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
// if not present, take the job GIT variables (used for developing)
|
// if not present, take the job GIT variables (used for developing)
|
||||||
if (params.eNB_Repository == null) {
|
if (params.eNB_Repository == null) {
|
||||||
@@ -179,7 +173,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
withCredentials([
|
withCredentials([
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||||
]) {
|
]) {
|
||||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||||
@@ -188,7 +181,7 @@ pipeline {
|
|||||||
if (fileExists(xmlFile)) {
|
if (fileExists(xmlFile)) {
|
||||||
try {
|
try {
|
||||||
timeout (time: 60, unit: 'MINUTES') {
|
timeout (time: 60, unit: 'MINUTES') {
|
||||||
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
@@ -196,7 +189,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,15 +91,9 @@ pipeline {
|
|||||||
echo "no LockResources given"
|
echo "no LockResources given"
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB_SourceCodePath == null) {
|
if (params.eNB_SourceCodePath == null) {
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// the following 4 parameters should be pushed by the master trigger
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
// if not present, take the job GIT variables (used for developing)
|
// if not present, take the job GIT variables (used for developing)
|
||||||
if (params.eNB_Repository == null) {
|
if (params.eNB_Repository == null) {
|
||||||
@@ -170,25 +164,21 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
withCredentials([
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
]) {
|
for (xmlFile in myXmlTestSuite) {
|
||||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
|
||||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
|
||||||
for (xmlFile in myXmlTestSuite) {
|
|
||||||
if (fileExists(xmlFile)) {
|
if (fileExists(xmlFile)) {
|
||||||
try {
|
try {
|
||||||
timeout (time: 60, unit: 'MINUTES') {
|
timeout (time: 60, unit: 'MINUTES') {
|
||||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
buildStageStatus = false
|
buildStageStatus = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
}
|
||||||
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,11 +188,7 @@ pipeline {
|
|||||||
stage('Terminate eNB') {
|
stage('Terminate eNB') {
|
||||||
steps {
|
steps {
|
||||||
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
||||||
withCredentials([
|
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
|
||||||
]) {
|
|
||||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
@@ -218,15 +204,9 @@ pipeline {
|
|||||||
parallel {
|
parallel {
|
||||||
stage('Log Collection (eNB - Run)') {
|
stage('Log Collection (eNB - Run)') {
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||||
]) {
|
|
||||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
|
||||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
|
||||||
|
|
||||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
|
||||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
|
||||||
}
|
|
||||||
script {
|
script {
|
||||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||||
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
||||||
@@ -262,11 +242,7 @@ pipeline {
|
|||||||
failure {
|
failure {
|
||||||
script {
|
script {
|
||||||
if (!termStatusArray[termENB]) {
|
if (!termStatusArray[termENB]) {
|
||||||
withCredentials([
|
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
|
||||||
]) {
|
|
||||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,36 +81,9 @@ pipeline {
|
|||||||
echo "no LockResources given"
|
echo "no LockResources given"
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
// 1st eNB parameters
|
|
||||||
if (params.eNB_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB_SourceCodePath == null) {
|
if (params.eNB_SourceCodePath == null) {
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// 2nd eNB parameters
|
|
||||||
if (params.eNB1_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_SourceCodePath == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// 3rd eNB parameters
|
|
||||||
if (params.eNB2_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB2_SourceCodePath == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB2_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// the following 4 parameters should be pushed by the master trigger
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
// if not present, take the job GIT variables (used for developing)
|
// if not present, take the job GIT variables (used for developing)
|
||||||
if (params.eNB_Repository == null) {
|
if (params.eNB_Repository == null) {
|
||||||
@@ -181,27 +154,21 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
withCredentials([
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
for (xmlFile in myXmlTestSuite) {
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
if (fileExists(xmlFile)) {
|
||||||
]) {
|
try {
|
||||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
timeout (time: 60, unit: 'MINUTES') {
|
||||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||||
for (xmlFile in myXmlTestSuite) {
|
}
|
||||||
if (fileExists(xmlFile)) {
|
} catch (Exception e) {
|
||||||
try {
|
currentBuild.result = 'FAILURE'
|
||||||
timeout (time: 60, unit: 'MINUTES') {
|
buildStageStatus = false
|
||||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}"
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
buildStageStatus = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
}
|
||||||
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,11 +178,7 @@ pipeline {
|
|||||||
stage('Terminate eNB') {
|
stage('Terminate eNB') {
|
||||||
steps {
|
steps {
|
||||||
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
||||||
withCredentials([
|
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
|
||||||
]) {
|
|
||||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -224,15 +187,9 @@ pipeline {
|
|||||||
parallel {
|
parallel {
|
||||||
stage('Log Collection (eNB - Run)') {
|
stage('Log Collection (eNB - Run)') {
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||||
]) {
|
|
||||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
|
||||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
|
||||||
|
|
||||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
|
||||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
|
||||||
}
|
|
||||||
script {
|
script {
|
||||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||||
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
||||||
|
|||||||
@@ -83,36 +83,9 @@ pipeline {
|
|||||||
echo "no LockResources given"
|
echo "no LockResources given"
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
// 1st eNB parameters
|
|
||||||
if (params.eNB_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB_SourceCodePath == null) {
|
if (params.eNB_SourceCodePath == null) {
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// 2nd eNB parameters
|
|
||||||
if (params.eNB1_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_SourceCodePath == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB1_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// 3rd eNB parameters
|
|
||||||
if (params.eNB2_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB2_SourceCodePath == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB2_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// the following 4 parameters should be pushed by the master trigger
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
// if not present, take the job GIT variables (used for developing)
|
// if not present, take the job GIT variables (used for developing)
|
||||||
if (params.eNB_Repository == null) {
|
if (params.eNB_Repository == null) {
|
||||||
@@ -183,27 +156,21 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
withCredentials([
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
for (xmlFile in myXmlTestSuite) {
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
if (fileExists(xmlFile)) {
|
||||||
]) {
|
try {
|
||||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
|
timeout (time: 60, unit: 'MINUTES') {
|
||||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||||
for (xmlFile in myXmlTestSuite) {
|
}
|
||||||
if (fileExists(xmlFile)) {
|
} catch (Exception e) {
|
||||||
try {
|
currentBuild.result = 'FAILURE'
|
||||||
timeout (time: 60, unit: 'MINUTES') {
|
buildStageStatus = false
|
||||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --XMLTestFile=${xmlFile}"
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
buildStageStatus = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
}
|
||||||
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -212,15 +179,8 @@ pipeline {
|
|||||||
parallel {
|
parallel {
|
||||||
stage('Log Collection (eNB - Run)') {
|
stage('Log Collection (eNB - Run)') {
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||||
]) {
|
|
||||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
|
||||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
|
||||||
|
|
||||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
|
||||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
|
||||||
}
|
|
||||||
script {
|
script {
|
||||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||||
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
||||||
|
|||||||
@@ -96,15 +96,9 @@ pipeline {
|
|||||||
echo "no LockResources given"
|
echo "no LockResources given"
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_IPAddress == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
if (params.eNB_SourceCodePath == null) {
|
if (params.eNB_SourceCodePath == null) {
|
||||||
allParametersPresent = false
|
allParametersPresent = false
|
||||||
}
|
}
|
||||||
if (params.eNB_Credentials == null) {
|
|
||||||
allParametersPresent = false
|
|
||||||
}
|
|
||||||
// the following 4 parameters should be pushed by the master trigger
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
// if not present, take the job GIT variables (used for developing)
|
// if not present, take the job GIT variables (used for developing)
|
||||||
if (params.eNB_Repository == null) {
|
if (params.eNB_Repository == null) {
|
||||||
@@ -181,25 +175,21 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
withCredentials([
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
]) {
|
for (xmlFile in myXmlTestSuite) {
|
||||||
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
|
|
||||||
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
|
||||||
for (xmlFile in myXmlTestSuite) {
|
|
||||||
if (fileExists(xmlFile)) {
|
if (fileExists(xmlFile)) {
|
||||||
try {
|
try {
|
||||||
timeout (time: 60, unit: 'MINUTES') {
|
timeout (time: 60, unit: 'MINUTES') {
|
||||||
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBSourceCodePath=${params.eNB_SourceCodePath} --XMLTestFile=${xmlFile}"
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
buildStageStatus = false
|
buildStageStatus = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
}
|
||||||
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -209,11 +199,7 @@ pipeline {
|
|||||||
stage('Terminate eNB') {
|
stage('Terminate eNB') {
|
||||||
steps {
|
steps {
|
||||||
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
echo '\u2705 \u001B[32mTerminate eNB\u001B[0m'
|
||||||
withCredentials([
|
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
|
||||||
]) {
|
|
||||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
@@ -229,15 +215,8 @@ pipeline {
|
|||||||
parallel {
|
parallel {
|
||||||
stage('Log Collection (eNB - Run)') {
|
stage('Log Collection (eNB - Run)') {
|
||||||
steps {
|
steps {
|
||||||
withCredentials([
|
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
||||||
]) {
|
|
||||||
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
|
||||||
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --BuildId=${env.BUILD_ID}"
|
|
||||||
|
|
||||||
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
|
||||||
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
|
||||||
}
|
|
||||||
script {
|
script {
|
||||||
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||||
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
||||||
@@ -273,11 +252,7 @@ pipeline {
|
|||||||
failure {
|
failure {
|
||||||
script {
|
script {
|
||||||
if (!termStatusArray[termENB]) {
|
if (!termStatusArray[termENB]) {
|
||||||
withCredentials([
|
sh "python3 ci-scripts/main.py --mode=TerminateeNB"
|
||||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
|
||||||
]) {
|
|
||||||
sh "python3 ci-scripts/main.py --mode=TerminateeNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,44 +121,11 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
|
|||||||
SCA.ranTargetBranch=matchReg.group(1)
|
SCA.ranTargetBranch=matchReg.group(1)
|
||||||
CLUSTER.ranTargetBranch=matchReg.group(1)
|
CLUSTER.ranTargetBranch=matchReg.group(1)
|
||||||
elif re.match(r'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match(r'^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||||
if re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
print("parameters --eNB*IPAddress ignored")
|
||||||
matchReg = re.match(r'^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNBIPAddress=matchReg.group(1)
|
|
||||||
CONTAINERS.eNBIPAddress=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
|
||||||
matchReg = re.match(r'^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNB1IPAddress=matchReg.group(1)
|
|
||||||
CONTAINERS.eNB1IPAddress=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
|
||||||
matchReg = re.match(r'^\-\-eNB2IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNB2IPAddress=matchReg.group(1)
|
|
||||||
CONTAINERS.eNB2IPAddress=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match(r'^\-\-eNBUserName=(.+)$|^\-\-eNB[1-2]UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||||
if re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
|
print("parameters --eNB*UserName ignored")
|
||||||
matchReg = re.match(r'^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNBUserName=matchReg.group(1)
|
|
||||||
CONTAINERS.eNBUserName=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
|
|
||||||
matchReg = re.match(r'^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNB1UserName=matchReg.group(1)
|
|
||||||
CONTAINERS.eNB1UserName=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE):
|
|
||||||
matchReg = re.match(r'^\-\-eNB2UserName=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNB2UserName=matchReg.group(1)
|
|
||||||
CONTAINERS.eNB2UserName=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match(r'^\-\-eNBPassword=(.+)$|^\-\-eNB[1-2]Password=(.+)$', myArgv, re.IGNORECASE):
|
||||||
if re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
|
print("parameter --eNB*Password ignored")
|
||||||
matchReg = re.match(r'^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNBPassword=matchReg.group(1)
|
|
||||||
CONTAINERS.eNBPassword=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
|
|
||||||
matchReg = re.match(r'^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNB1Password=matchReg.group(1)
|
|
||||||
CONTAINERS.eNB1Password=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE):
|
|
||||||
matchReg = re.match(r'^\-\-eNB2Password=(.+)$', myArgv, re.IGNORECASE)
|
|
||||||
RAN.eNB2Password=matchReg.group(1)
|
|
||||||
CONTAINERS.eNB2Password=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match(r'^\-\-eNBSourceCodePath=(.+)$|^\-\-eNB[1-2]SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||||
if re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
if re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match(r'^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||||
@@ -167,13 +134,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,CONTAINERS,HELP,SCA,CLUSTER):
|
|||||||
SCA.eNBSourceCodePath=matchReg.group(1)
|
SCA.eNBSourceCodePath=matchReg.group(1)
|
||||||
CLUSTER.eNBSourceCodePath=matchReg.group(1)
|
CLUSTER.eNBSourceCodePath=matchReg.group(1)
|
||||||
elif re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match(r'^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
print("parameter --eNB1SourceCodePath ignored")
|
||||||
RAN.eNB1SourceCodePath=matchReg.group(1)
|
|
||||||
CONTAINERS.eNB1SourceCodePath=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match(r'^\-\-eNB2SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
print("parameter --eNB2SourceCodePath ignored")
|
||||||
RAN.eNB2SourceCodePath=matchReg.group(1)
|
|
||||||
CONTAINERS.eNB2SourceCodePath=matchReg.group(1)
|
|
||||||
elif re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match(r'^\-\-XMLTestFile=(.+)$', myArgv, re.IGNORECASE)
|
||||||
CiTestObj.testXMLfiles.append(matchReg.group(1))
|
CiTestObj.testXMLfiles.append(matchReg.group(1))
|
||||||
|
|||||||
@@ -230,23 +230,10 @@ class Containerize():
|
|||||||
self.ranAllowMerge = False
|
self.ranAllowMerge = False
|
||||||
self.ranCommitID = ''
|
self.ranCommitID = ''
|
||||||
self.ranTargetBranch = ''
|
self.ranTargetBranch = ''
|
||||||
self.eNBIPAddress = ''
|
|
||||||
self.eNBUserName = ''
|
|
||||||
self.eNBPassword = ''
|
|
||||||
self.eNBSourceCodePath = ''
|
self.eNBSourceCodePath = ''
|
||||||
self.eNB1IPAddress = ''
|
|
||||||
self.eNB1UserName = ''
|
|
||||||
self.eNB1Password = ''
|
|
||||||
self.eNB1SourceCodePath = ''
|
|
||||||
self.eNB2IPAddress = ''
|
|
||||||
self.eNB2UserName = ''
|
|
||||||
self.eNB2Password = ''
|
|
||||||
self.eNB2SourceCodePath = ''
|
|
||||||
self.forcedWorkspaceCleanup = False
|
self.forcedWorkspaceCleanup = False
|
||||||
self.imageKind = ''
|
self.imageKind = ''
|
||||||
self.proxyCommit = None
|
self.proxyCommit = None
|
||||||
self.eNB_instance = 0
|
|
||||||
self.eNB_serverId = ['', '', '']
|
|
||||||
self.yamlPath = ''
|
self.yamlPath = ''
|
||||||
self.services = ''
|
self.services = ''
|
||||||
self.deploymentTag = ''
|
self.deploymentTag = ''
|
||||||
@@ -266,20 +253,6 @@ class Containerize():
|
|||||||
# Container management functions
|
# Container management functions
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
|
|
||||||
def GetCredentials(self, server_id):
|
|
||||||
if server_id == '0':
|
|
||||||
ip, path = self.eNBIPAddress, self.eNBSourceCodePath
|
|
||||||
elif server_id == '1':
|
|
||||||
ip, path = self.eNB1IPAddress, self.eNB1SourceCodePath
|
|
||||||
elif server_id == '2':
|
|
||||||
ip, path = self.eNB2IPAddress, self.eNB2SourceCodePath
|
|
||||||
else:
|
|
||||||
raise ValueError(f"unknown server ID '{server_id}'")
|
|
||||||
if ip == '' or path == '':
|
|
||||||
HELP.GenericHelp(CONST.Version)
|
|
||||||
raise ValueError(f'Insufficient Parameter: IP/node {ip}, path {path}')
|
|
||||||
return (ip, path)
|
|
||||||
|
|
||||||
def BuildImage(self, ctx, node, HTML):
|
def BuildImage(self, ctx, node, HTML):
|
||||||
lSourcePath = self.eNBSourceCodePath
|
lSourcePath = self.eNBSourceCodePath
|
||||||
logging.debug('Building on server: ' + node)
|
logging.debug('Building on server: ' + node)
|
||||||
|
|||||||
@@ -52,10 +52,7 @@ def GitSrvHelp(repository,branch,commit,mergeallow,targetbranch):
|
|||||||
print(' --ranAllowMerge=[Allow Merge Request (with target branch) (true or false)] -- ' + mergeallow)
|
print(' --ranAllowMerge=[Allow Merge Request (with target branch) (true or false)] -- ' + mergeallow)
|
||||||
print(' --ranTargetBranch=[Target Branch in case of a Merge Request] -- ' + targetbranch)
|
print(' --ranTargetBranch=[Target Branch in case of a Merge Request] -- ' + targetbranch)
|
||||||
|
|
||||||
def eNBSrvHelp(ipaddr, username, password, sourcepath):
|
def eNBSrvHelp(sourcepath):
|
||||||
print(' --eNBIPAddress=[eNB\'s IP Address] -- ' + ipaddr)
|
|
||||||
print(' --eNBUserName=[eNB\'s Login User Name] -- ' + username)
|
|
||||||
print(' --eNBPassword=[eNB\'s Login Password] -- ' + password)
|
|
||||||
print(' --eNBSourceCodePath=[eNB\'s Source Code Path] -- ' + sourcepath)
|
print(' --eNBSourceCodePath=[eNB\'s Source Code Path] -- ' + sourcepath)
|
||||||
|
|
||||||
def XmlHelp(filename):
|
def XmlHelp(filename):
|
||||||
|
|||||||
+4
-4
@@ -425,7 +425,7 @@ elif re.match('^TerminateSPGW$', mode, re.IGNORECASE):
|
|||||||
elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
|
elif re.match('^LogCollectBuild$', mode, re.IGNORECASE):
|
||||||
logging.warning("Option LogCollectBuild ignored")
|
logging.warning("Option LogCollectBuild ignored")
|
||||||
elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
|
elif re.match('^LogCollecteNB$', mode, re.IGNORECASE):
|
||||||
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
|
if RAN.eNBSourceCodePath == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
if os.path.isdir('cmake_targets/log'):
|
if os.path.isdir('cmake_targets/log'):
|
||||||
@@ -481,12 +481,12 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
|||||||
logging.info('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
|
logging.info('\u001B[1m Starting Scenario: ' + CiTestObj.testXMLfiles[0] + '\u001B[0m')
|
||||||
logging.info('\u001B[1m----------------------------------------\u001B[0m')
|
logging.info('\u001B[1m----------------------------------------\u001B[0m')
|
||||||
if re.match('^TesteNB$', mode, re.IGNORECASE):
|
if re.match('^TesteNB$', mode, re.IGNORECASE):
|
||||||
if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
|
if RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBSourceCodePath == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
if RAN.ranRepository == '':
|
if RAN.ranRepository == '':
|
||||||
HELP.GitSrvHelp(RAN.ranRepository, RAN.ranBranch, RAN.ranCommitID, RAN.ranAllowMerge, RAN.ranTargetBranch)
|
HELP.GitSrvHelp(RAN.ranRepository, RAN.ranBranch, RAN.ranCommitID, RAN.ranAllowMerge, RAN.ranTargetBranch)
|
||||||
if RAN.eNBIPAddress == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '':
|
if RAN.eNBSourceCodePath == '':
|
||||||
HELP.eNBSrvHelp(RAN.eNBIPAddress, RAN.eNBUserName, RAN.eNBPassword, RAN.eNBSourceCodePath)
|
HELP.eNBSrvHelp(RAN.eNBSourceCodePath)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
else:
|
else:
|
||||||
if CiTestObj.ranRepository == '' or CiTestObj.ranBranch == '':
|
if CiTestObj.ranRepository == '' or CiTestObj.ranBranch == '':
|
||||||
|
|||||||
@@ -60,18 +60,7 @@ class RANManagement():
|
|||||||
self.ranAllowMerge = False
|
self.ranAllowMerge = False
|
||||||
self.ranCommitID = ''
|
self.ranCommitID = ''
|
||||||
self.ranTargetBranch = ''
|
self.ranTargetBranch = ''
|
||||||
self.eNBIPAddress = ''
|
|
||||||
self.eNBUserName = ''
|
|
||||||
self.eNBPassword = ''
|
|
||||||
self.eNBSourceCodePath = ''
|
self.eNBSourceCodePath = ''
|
||||||
self.eNB1IPAddress = ''
|
|
||||||
self.eNB1UserName = ''
|
|
||||||
self.eNB1Password = ''
|
|
||||||
self.eNB1SourceCodePath = ''
|
|
||||||
self.eNB2IPAddress = ''
|
|
||||||
self.eNB2UserName = ''
|
|
||||||
self.eNB2Password = ''
|
|
||||||
self.eNB2SourceCodePath = ''
|
|
||||||
self.Initialize_eNB_args = ''
|
self.Initialize_eNB_args = ''
|
||||||
self.imageKind = ''
|
self.imageKind = ''
|
||||||
self.air_interface = ''
|
self.air_interface = ''
|
||||||
|
|||||||
@@ -33,13 +33,11 @@ python3 main.py --mode=InitiateHtml --ranRepository=NONE --ranBranch=${CURRENT_B
|
|||||||
|
|
||||||
python3 main.py --mode=TesteNB --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \
|
python3 main.py --mode=TesteNB --ranRepository=NONE --ranBranch=${CURRENT_BRANCH} \
|
||||||
--ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \
|
--ranCommitID=${COMMIT_SHA} --ranAllowMerge=false \
|
||||||
--ranTargetBranch=NONE --eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE \
|
--ranTargetBranch=NONE \
|
||||||
--eNBSourceCodePath=${REPO_PATH} \
|
--eNBSourceCodePath=${REPO_PATH} \
|
||||||
--XMLTestFile=${TESTCASE} --local
|
--XMLTestFile=${TESTCASE} --local
|
||||||
RET=$?
|
RET=$?
|
||||||
|
|
||||||
python3 main.py --mode=FinalizeHtml \
|
python3 main.py --mode=FinalizeHtml --local
|
||||||
--local \
|
|
||||||
--eNBIPAddress=NONE --eNBUserName=NONE --eNBPassword=NONE
|
|
||||||
|
|
||||||
exit ${RET}
|
exit ${RET}
|
||||||
|
|||||||
@@ -22,9 +22,6 @@ python3 main.py \
|
|||||||
--ranCommitID=${commit} \
|
--ranCommitID=${commit} \
|
||||||
--ranAllowMerge=true \
|
--ranAllowMerge=true \
|
||||||
--ranTargetBranch=develop \
|
--ranTargetBranch=develop \
|
||||||
--eNBIPAddress=localhost \
|
|
||||||
--eNBUserName=NONE \
|
|
||||||
--eNBPassword=NONE \
|
|
||||||
--eNBSourceCodePath=NONE \
|
--eNBSourceCodePath=NONE \
|
||||||
--XMLTestFile=tests/test-runner/test.xml
|
--XMLTestFile=tests/test-runner/test.xml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user