osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/42649?usp=email )
Change subject: jobs/gerrit: fix artifacts logic
......................................................................
jobs/gerrit: fix artifacts logic
The previous logic failed when there are no artifacts for archiving,
for multiple reasons. Fix all of them:
* "allow-empty" needs to be set, so jenkins doesn't fail the job when it
can't find any artifacts to archive.
* The "artifacts" string must not be empty even if "allow-empty" is set,
as otherwise it assumes a configuration error.
* The jenkins jobs fails in the archiving step if the workspace dir
doesn't exist.
Fixes: 4c392b9e ("jobs/gerrit: archive osmo-ccid-firmware artifacts")
Change-Id: If7a051d7be2beb617c2eda4fd1a669565c2c5b55
---
M jobs/gerrit-verifications.yml
1 file changed, 10 insertions(+), 3 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
jolly: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index faae9b9..1177a51 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -113,7 +113,10 @@
# Range from oldest supported Debian version to newest, see:
# https://gerrit.osmocom.org/c/osmo-ci/+/40861/comment/d35a8783_2a3833a4/
pipeline_binpkgs: "debian:11 debian:13"
- artifacts: ""
+ # When using an empty string, archiving fails even if allow-empty is set:
+ # "ERROR: Step ‘Archive the artifacts’ failed: No artifacts are configured
+ # for archiving."
+ artifacts: "nothing"
# in alphabetical order
repos:
@@ -856,14 +859,18 @@
builders:
- shell: '{obj:cmd}'
- # Remove workspace on success to free up space
+ # Replace workspace with empty dir to free up space. Having an empty dir
+ # is required so the artifacts logic doesn't fail (even if there is
+ # nothing to archive).
- shell: |
- if [ -z "{artifacts}" ]; then
+ if [ "{artifacts}" = "nothing" ]; then
rm -rf "$WORKSPACE"
+ mkdir "$WORKSPACE"
fi
publishers:
- archive:
+ allow-empty: true
artifacts: '{obj:artifacts}'
- warnings:
console-log-parsers:
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42649?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If7a051d7be2beb617c2eda4fd1a669565c2c5b55
Gerrit-Change-Number: 42649
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/42648?usp=email )
Change subject: jobs/gerrit-verifications: fix hwtest param
......................................................................
jobs/gerrit-verifications: fix hwtest param
This must be a bool instead of a string. Without this patch, the
condition checking for the bool is always true.
Fixes: 986c2648 ("jobs/gerrit: run osmo-ccid-firmware-hwtest")
Change-Id: I3117ddab888dd226ed57b62b9b9e672f1cb9127d
---
M jobs/gerrit-verifications.yml
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
jolly: Looks good to me, but someone else must approve
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index 09c465b..faae9b9 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -591,7 +591,7 @@
name: PIPELINE_BUILD
description: Enable the build job (runs contrib/jenkins.sh)
default: '{obj:pipeline_build}'
- - string:
+ - bool:
name: PIPELINE_HWTEST
description: |
Enable a hardware test job that uses artifacts from the build job.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42648?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I3117ddab888dd226ed57b62b9b9e672f1cb9127d
Gerrit-Change-Number: 42648
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Attention is currently required from: fixeria, jolly.
Hello Jenkins Builder, fixeria, jolly,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ci/+/42649?usp=email
to look at the new patch set (#2).
Change subject: jobs/gerrit: fix artifacts logic
......................................................................
jobs/gerrit: fix artifacts logic
The previous logic failed when there are no artifacts for archiving,
for multiple reasons. Fix all of them:
* "allow-empty" needs to be set, so jenkins doesn't fail the job when it
can't find any artifacts to archive.
* The "artifacts" string must not be empty even if "allow-empty" is set,
as otherwise it assumes a configuration error.
* The jenkins jobs fails in the archiving step if the workspace dir
doesn't exist.
Fixes: 4c392b9e ("jobs/gerrit: archive osmo-ccid-firmware artifacts")
Change-Id: If7a051d7be2beb617c2eda4fd1a669565c2c5b55
---
M jobs/gerrit-verifications.yml
1 file changed, 10 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/49/42649/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42649?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If7a051d7be2beb617c2eda4fd1a669565c2c5b55
Gerrit-Change-Number: 42649
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/42649?usp=email )
Change subject: jobs/gerrit: fix artifacts logic
......................................................................
jobs/gerrit: fix artifacts logic
The previous logic failed when there are not artifacts for archiving,
for multiple reasons. Fix all of them:
* "allow-empty" needs to be set, so jenkins doesn't fail the job when it
can't find any artifacts to archive.
* The "artifacts" string must not be empty even if "allow-empty" is set,
as otherwise it assumes a configuration error.
* The jenkins jobs fails in the archiving step if the workspace dir
doesn't exist.
Fixes: 4c392b9e ("jobs/gerrit: archive osmo-ccid-firmware artifacts")
Change-Id: If7a051d7be2beb617c2eda4fd1a669565c2c5b55
---
M jobs/gerrit-verifications.yml
1 file changed, 10 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/49/42649/1
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
index faae9b9..1177a51 100644
--- a/jobs/gerrit-verifications.yml
+++ b/jobs/gerrit-verifications.yml
@@ -113,7 +113,10 @@
# Range from oldest supported Debian version to newest, see:
# https://gerrit.osmocom.org/c/osmo-ci/+/40861/comment/d35a8783_2a3833a4/
pipeline_binpkgs: "debian:11 debian:13"
- artifacts: ""
+ # When using an empty string, archiving fails even if allow-empty is set:
+ # "ERROR: Step ‘Archive the artifacts’ failed: No artifacts are configured
+ # for archiving."
+ artifacts: "nothing"
# in alphabetical order
repos:
@@ -856,14 +859,18 @@
builders:
- shell: '{obj:cmd}'
- # Remove workspace on success to free up space
+ # Replace workspace with empty dir to free up space. Having an empty dir
+ # is required so the artifacts logic doesn't fail (even if there is
+ # nothing to archive).
- shell: |
- if [ -z "{artifacts}" ]; then
+ if [ "{artifacts}" = "nothing" ]; then
rm -rf "$WORKSPACE"
+ mkdir "$WORKSPACE"
fi
publishers:
- archive:
+ allow-empty: true
artifacts: '{obj:artifacts}'
- warnings:
console-log-parsers:
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42649?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If7a051d7be2beb617c2eda4fd1a669565c2c5b55
Gerrit-Change-Number: 42649
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>