Draft: ci-to-obs.v2.yml: Add support to conditionally download OBS results
Tested on pipeline https://gitlab.collabora.com/mediatek/aiot/pkg/linux/-/jobs/439776
having set OBS_DOWNLOAD_RESULTS
to 0
This commit adds variable OBS_DOWNLOAD_RESULTS to conditionally enable/disable downloading OBS build results to gitlab artifacts.
Signed-off-by: Ariel D'Alessandro ariel.dalessandro@collabora.com
Merge request reports
Activity
requested review from @sjoerd
added 1 commit
- 2d5b1a93 - ci-to-obs.v2.yml: Add support to conditionally storing OBS artifacts
From https://github.com/collabora/obs-gitlab-runner?tab=readme-ov-file#supported-syntax
There is no way to use a variable without auto-quoting its contents.
Calling
generate-monitor
with an empty quoted string will make it fail parsing arguments:generate-monitor $OBS_RUNNER_TAG --artifact-expiration '3 days' ''
The
obs-runner
syntax is rather limited. It doesn't seem to be a way to avoid passing the--download-build-results-to
argument.Currently, passing option
--download-build-results-to ''
will make it download results to the current directory.- https://github.com/collabora/obs-gitlab-runner/blob/main/src/handler.rs#L421
- https://github.com/collabora/obs-gitlab-runner/blob/main/src/pipeline.rs#L96
A possible implementation is picking this MR and hacking
obs-gitlab-runner
in the above lines to check if the parameter is empty.Will keep this as draft until further discussion.
Edited by Ariel D'Alessandro@adalessandro can you file an issue againsat obs-gitlab-runner for this? fwiw we could be more clever and only download if artifacts are in the job as well -- but that's a bit seperate