Commit f275e130 authored by Raphael Defosseux's avatar Raphael Defosseux

Adding copy artifacts from slave

Signed-off-by: Raphael Defosseux's avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent fcd7a4e8
Pipeline #10241 passed with stage
in 0 seconds
......@@ -15,6 +15,8 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
}
}
def slaveJobStatus
pipeline {
agent {
label 'bellatrix'
......@@ -88,13 +90,20 @@ pipeline {
}
stage ("Test slave job") {
steps {
build job: 'CI-Sandbox4-slave',
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
booleanParam(name: 'eNB_manageMergeRequest', value: Boolean.valueOf(params.eNB_manageMergeRequest))
]
script {
slaveJobStatus = build job: 'CI-Sandbox4-slave',
parameters: [
string(name: 'eNB_Repository', value: String.valueOf(GIT_URL)),
string(name: 'eNB_Branch', value: String.valueOf(GIT_BRANCH)),
string(name: 'eNB_CommitID', value: String.valueOf(GIT_COMMIT)),
booleanParam(name: 'eNB_manageMergeRequest', value: Boolean.valueOf(params.eNB_manageMergeRequest))
]
}
}
post {
always {
copyArtifacts(projectName: 'CI-Sandbox4-slave', filter: "test-result*.txt", selector: specific("${slaveJobStatus.number}"))
}
}
}
}
......
......@@ -50,6 +50,12 @@ pipeline {
} else {
echo "Some parameters are missing"
}
sh "echo ${JOB_NAME} > test-result.txt"
sh "echo ${BUILD_ID} >> test-result.txt"
sh "echo ${NODE_NAME} >> test-result.txt"
if (fileExists('test-result.txt')) {
archiveArtifacts artifacts: 'test-result.txt'
}
}
}
}
......
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