Commit 11eab688 authored by hardy's avatar hardy

fix executor agent syntax

parent fceea50a
...@@ -51,15 +51,12 @@ def StatusForDb = "" ...@@ -51,15 +51,12 @@ def StatusForDb = ""
pipeline { pipeline {
agent none agent {label pythonExecutor}
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1) lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
} }
stages {
stage ("Py Exec"){
agent {label pythonExecutor}
stages { stages {
stage("Build Init") { stage("Build Init") {
steps { steps {
...@@ -276,31 +273,21 @@ pipeline { ...@@ -276,31 +273,21 @@ pipeline {
} }
} }
} }
} stage ("SQL Collect"){
} agent {label DataBaseHost}
} steps {
} script {
if (currentBuild.result=='FAILURE') {StatusForDb = 'FAIL'} else {StatusForDb = 'PASS'}
sh "python3 /home/oaicicd/mysql/sql_connect.py ${JOB_NAME} ${params.eNB_MR} ${params.eNB_Branch} ${env.BUILD_ID} ${env.BUILD_URL} ${StatusForDb} ''"
stage ("DB Host"){ }
agent {label DataBaseHost} }
stages {
stage("SQL Collect ") {
steps {
script {
if (currentBuild.result=='FAILURE') {StatusForDb = 'FAIL'} else {StatusForDb = 'PASS'}
sh "python3 /home/oaicicd/mysql/sql_connect.py ${JOB_NAME} ${params.eNB_MR} ${params.eNB_Branch} ${env.BUILD_ID} ${env.BUILD_URL} ${StatusForDb} ''"
} }
} }
} }
} }
}
}
post { post {
always { always {
node(pythonExecutor){
script { script {
if (params.pipelineZipsConsoleLog != null) { if (params.pipelineZipsConsoleLog != null) {
if (params.pipelineZipsConsoleLog) { if (params.pipelineZipsConsoleLog) {
...@@ -314,6 +301,5 @@ pipeline { ...@@ -314,6 +301,5 @@ pipeline {
} }
} }
} }
}
} }
} }
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