Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CICD Component: property 'tags' must not have fewer than 1 items #1503

Open
bataliero opened this issue Feb 16, 2025 · 0 comments · May be fixed by #1505
Open

CICD Component: property 'tags' must not have fewer than 1 items #1503

bataliero opened this issue Feb 16, 2025 · 0 comments · May be fixed by #1505

Comments

@bataliero
Copy link

bataliero commented Feb 16, 2025

Minimal .gitlab-ci.yml illustrating the issue

---
spec:
  inputs:
    job-tags:
      type: array
      description: "Tags for the job"
      default: []
---
job:
  stage: test
  image: alpine:latest
  script:
    - echo "test1"
  tags: $[[ inputs.job-tags ]]

Output

Invalid .gitlab-ci.yml configuration!
    • property 'tags' must not have fewer than 1 items at job.tags

For further troubleshooting, consider either of the following:
    • Copy the content of .gitlab-ci-local/expanded-gitlab-ci.yml (/path/to/expanded-gitlab-ci.yml) to the pipeline editor (https://docs.gitlab.com/ee/ci/pipeline_editor/) to debug it
    • Use --json-schema-validation=false to disable schema validation (not recommended)

Host information
Ubuntu
gitlab-ci-local 4.1.33

Host information
Description: Ubuntu 22.04.3 LTS / WSL
gitlab-ci-local 4.56.1

Containerd binary
Docker version 27.5.1

Additional context
Job works well when --json-schema-validation=false is passed to command line.
It's convenient to change inputs tags from top-level .gitlab-ci.yaml to run jobs (or multiple jobs in Component) on specific dedicated runner, but if tags is empty then property 'tags' must not have fewer than 1 items at job.tags is present in the output from gitlab-ci-local

@ANGkeith ANGkeith linked a pull request Feb 19, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant