From fe11e2ff1532fd4b64a0cbf0fa5e3490c7665fcf Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Thu, 24 Sep 2020 17:26:07 +0000 Subject: [PATCH] Grab SHA1 into parent job's environment for human or program The Ceph SHA1 is divined by the -setup job, and not available in the parent job. That's easily fixed by the same method it's passed to the -build job: grab the file artifact and use it to inject SHA1 into the environment. This means the parent job can show the SHA1 in its build label for humans, and can also be searched by Jenkins API calls. Signed-off-by: Dan Mick --- .../config/definitions/ceph-dev-new-setup.yml | 2 +- ceph-dev-new/config/definitions/ceph-dev-new.yml | 6 ++++++ ceph-dev-setup/config/definitions/ceph-dev-setup.yml | 2 +- ceph-dev/config/definitions/ceph-dev.yml | 6 ++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ceph-dev-new-setup/config/definitions/ceph-dev-new-setup.yml b/ceph-dev-new-setup/config/definitions/ceph-dev-new-setup.yml index af3dafe5..1667540c 100644 --- a/ceph-dev-new-setup/config/definitions/ceph-dev-new-setup.yml +++ b/ceph-dev-new-setup/config/definitions/ceph-dev-new-setup.yml @@ -15,7 +15,7 @@ - github: url: https://github.com/ceph/ceph-ci - copyartifact: - projects: ceph-dev-new-build + projects: ceph-dev-new-build, ceph-dev-new parameters: - string: diff --git a/ceph-dev-new/config/definitions/ceph-dev-new.yml b/ceph-dev-new/config/definitions/ceph-dev-new.yml index 7f46df00..2fde222b 100644 --- a/ceph-dev-new/config/definitions/ceph-dev-new.yml +++ b/ceph-dev-new/config/definitions/ceph-dev-new.yml @@ -88,6 +88,12 @@ If this is checked, then the binaries will be built and pushed to chacra even if - name: ceph-dev-new-setup current-parameters: true exposed-scm: false + - copyartifact: + project: ceph-dev-new-setup + filter: dist/sha1 + which-build: multijob-build + - inject: + properties-file: ${WORKSPACE}/dist/sha1 - multijob: name: 'ceph dev build phase' condition: SUCCESSFUL diff --git a/ceph-dev-setup/config/definitions/ceph-dev-setup.yml b/ceph-dev-setup/config/definitions/ceph-dev-setup.yml index c10e3046..54d9a12a 100644 --- a/ceph-dev-setup/config/definitions/ceph-dev-setup.yml +++ b/ceph-dev-setup/config/definitions/ceph-dev-setup.yml @@ -15,7 +15,7 @@ - github: url: https://github.com/ceph/ceph - copyartifact: - projects: ceph-dev-build + projects: ceph-dev-build, ceph-dev parameters: - string: diff --git a/ceph-dev/config/definitions/ceph-dev.yml b/ceph-dev/config/definitions/ceph-dev.yml index 9792fce6..6bc8d50e 100644 --- a/ceph-dev/config/definitions/ceph-dev.yml +++ b/ceph-dev/config/definitions/ceph-dev.yml @@ -88,6 +88,12 @@ If this is checked, then the binaries will be built and pushed to chacra even if - name: ceph-dev-setup current-parameters: true exposed-scm: false + - copyartifact: + project: ceph-dev-setup + filter: dist/sha1 + which-build: multijob-build + - inject: + properties-file: ${WORKSPACE}/dist/sha1 - multijob: name: 'ceph dev build phase' condition: SUCCESSFUL -- 2.39.5