Skip to content

No way to support conditional arguments in generate-monitor due to variable auto-quoting #29

@adalessandro

Description

@adalessandro

Related to https://gitlab.collabora.com/obs/ci-to-obs/-/merge_requests/26

The above MR aims to add support to conditionally download OBS results.
The idea is to have a CI variable/flag for this setting, then call generate-monitor with the proper parameters, adding/removing --download-build-results-to accordingly.

However, because of the limited syntax provided by the obs-runner, it doesn't seem to be possible at the moment.

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'
    ''

Calling generate-monitor with option --download-build-results-to '' will make it download results to the current directory.

Due to variable auto-quoting in the obs-runner, apparently there's no way to support this kind of variable based conditional arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions