From a126392466d4a0eee08f92b33767d8f37d155642 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Tue, 7 Feb 2023 16:19:25 +0100 Subject: [PATCH] change report fields. add status field --- Jenkinsfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a9a8f92..2d9463c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,7 +60,7 @@ pipeline { echo "#Build ${PIPELINE_BUILD_NUMBER},,,,," > $PUSH_REPORT echo "#StartTime ${date},,,,," >> $PUSH_REPORT echo "#Release ${gCube_release_version},,,,," >> $PUSH_REPORT - echo "ArtifactID,Version,SCM URL,Build Number,Component Tag,Release Tag" >> $PUSH_REPORT + echo "ArtifactID,Version,SCM URL,Build Number,Push response" >> $PUSH_REPORT ''' } } @@ -72,7 +72,7 @@ pipeline { echo "About to push ${components[i]['name']} with version ${components[i]['version']}" checkout_from_reference(components[i]['name'], components[i]['gitRepo'], components[i]['commitID'], components[i]['version'], gCube_release_version) - sh "echo -e ${components[i]['name']},${components[i]['version']},${components[i]['gitRepo']},${components[i]['commitID']},v${components[i]['version']},r${gCube_release_version} >> $PUSH_REPORT" + // sh "echo -e ${components[i]['name']},${components[i]['version']},${components[i]['gitRepo']},${components[i]['commitID']},v${components[i]['version']},r${gCube_release_version} >> $PUSH_REPORT" } } } @@ -134,8 +134,12 @@ def checkout_from_reference(repo_name, repo_url, commit, version, gCube_release_ ] ]) if (params.Type == "PUSH") { - push(repo_url, repo_name, "v${version}", "r${gCube_release_version}", commit) + def status=push(repo_url, repo_name, "v${version}", "r${gCube_release_version}", commit) + sh "echo -e ${components[i]['name']},${components[i]['version']},${components[i]['gitRepo']},${components[i]['commitID']},status >> $PUSH_REPORT" + }else{ + sh "echo -e ${components[i]['name']},${components[i]['version']},${components[i]['gitRepo']},${components[i]['commitID']},unsent >> $PUSH_REPORT" } + } /**