osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/30987 )
Change subject: jobs/gerrit-verifications-comment: rename ......................................................................
jobs/gerrit-verifications-comment: rename
Rename the jenkins job from gerrit-pipeline-result to gerrit-verifications-comment, as the next patch will not only use this job to post a comment at the end of the gerrit verification, but also at the beginning when the pipeline starts.
Give the pipeline_summary* scripts more generic names as well.
Change-Id: I1b947522aa5f2bb21f5e438db9df3420c998f1bc --- R jobs/gerrit-verifications-comment.yml M jobs/gerrit-verifications.yml R scripts/jenkins-gerrit/comment_generate.py R scripts/jenkins-gerrit/comment_send.sh 4 files changed, 9 insertions(+), 9 deletions(-)
Approvals: laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/jobs/gerrit-pipeline-result.yml b/jobs/gerrit-verifications-comment.yml similarity index 92% rename from jobs/gerrit-pipeline-result.yml rename to jobs/gerrit-verifications-comment.yml index e1a7a74..1c672b9 100644 --- a/jobs/gerrit-pipeline-result.yml +++ b/jobs/gerrit-verifications-comment.yml @@ -2,12 +2,12 @@ # post a list of failed/successful job links to gerrit and to vote +V/-V.
- project: - name: gerrit-pipeline-result + name: gerrit-verifications-comment jobs: - - 'gerrit-pipeline-result' + - 'gerrit-verifications-comment'
- job: - name: 'gerrit-pipeline-result' + name: 'gerrit-verifications-comment' project-type: freestyle node: osmocom-gerrit retry-count: 3 # scm checkout @@ -68,7 +68,7 @@ wipe-workspace: true
builders: - - shell: 'cd scripts/jenkins-gerrit && ./pipeline_summary_send.sh' + - shell: 'cd scripts/jenkins-gerrit && ./comment_send.sh'
wrappers: - ansicolor: diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 0f35fcd..1896a98 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -501,17 +501,17 @@ }} }} }} - stage("Result") {{ + stage("Result Comment") {{ steps {{ echo "PIPELINE_BUILD_PASSED=${{env.PIPELINE_BUILD_PASSED}}" echo "PIPELINE_LINT_PASSED=${{env.PIPELINE_LINT_PASSED}}" echo "PIPELINE_DEB_PASSED=${{env.PIPELINE_DEB_PASSED}}" echo "PIPELINE_RPM_PASSED=${{env.PIPELINE_RPM_PASSED}}"
- // Run the result job to get successful/failed links and add a + // Run the comment job to get successful/failed links and add a // comment + vote to gerrit script {{ - build job: 'gerrit-pipeline-result', parameters: [ + build job: 'gerrit-verifications-comment', parameters: [ string(name: "GERRIT_PROJECT", value: "${{env.GERRIT_PROJECT}}"), string(name: "GERRIT_CHANGE_NUMBER", value: "${{env.GERRIT_CHANGE_NUMBER}}"), string(name: "GERRIT_PATCHSET_NUMBER", value: "${{env.GERRIT_PATCHSET_NUMBER}}"), diff --git a/scripts/jenkins-gerrit/pipeline_summary.py b/scripts/jenkins-gerrit/comment_generate.py similarity index 98% rename from scripts/jenkins-gerrit/pipeline_summary.py rename to scripts/jenkins-gerrit/comment_generate.py index 53c0f4a..d4937c0 100755 --- a/scripts/jenkins-gerrit/pipeline_summary.py +++ b/scripts/jenkins-gerrit/comment_generate.py @@ -28,7 +28,7 @@
def stage_from_job_name(job_name): - if job_name == "gerrit-pipeline-result": + if job_name == "gerrit-verifications-comment": # The job that runs this script. Don't include it in the summary. return None if job_name == "gerrit-lint": diff --git a/scripts/jenkins-gerrit/pipeline_summary_send.sh b/scripts/jenkins-gerrit/comment_send.sh similarity index 92% rename from scripts/jenkins-gerrit/pipeline_summary_send.sh rename to scripts/jenkins-gerrit/comment_send.sh index 29ea860..bd7b81d 100755 --- a/scripts/jenkins-gerrit/pipeline_summary_send.sh +++ b/scripts/jenkins-gerrit/comment_send.sh @@ -16,7 +16,7 @@
set -x
-./pipeline_summary.py "$PIPELINE_BUILD_URL" \ +./comment_generate.py "$PIPELINE_BUILD_URL" \ -o gerrit_report.json \ $arg_notify