Skip to content

Support variables:expand #1675

@HauserV

Description

@HauserV

Is your feature request related to a problem? Please describe.

I would like to use run pipelines using the gitlab-ci-utils templates by Aaron Goldenthal. This currently seems impossible because his prepare_release job embedded in virtually all templates uses the variables:expand keyword which prevents gitlab-ci-local from parsing the pipeline.

Here's a simple MWE:

mwe:
  variables:
    RELEASE:
      value: '{"defaults":{"name":"$$CHANGELOG","description":"$$CHANGELOG"}}'
      expand: false
  script:
    - echo $RELEASE

and the output from gitlab-ci-local:

$ gitlab-ci-local 
mwe has invalid variables hash of key value pairs. RELEASE=[object Object]

Describe the solution you'd like
gitlab-ci-local should parse the pipeline code, start the job and, ideally, print the unexpanded $RELEASE variable.

Describe alternatives you've considered
I have tried overriding the job which uses this syntax but it didn't help because gitlab-ci-local exits before evaluating my overrides.

Additional context

$ gitlab-ci-local --version
4.63.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature missing according to gitlab ci standard

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions