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

Schema validation while importing pipeline configuration #113

Open
sheroy opened this issue Mar 26, 2019 · 2 comments
Open

Schema validation while importing pipeline configuration #113

sheroy opened this issue Mar 26, 2019 · 2 comments

Comments

@sheroy
Copy link

sheroy commented Mar 26, 2019

Currently the yaml config plugin doesn't have a mechanism to validate the schema of the YAML pipeline configuration. There is no indication of errors in YAML configuration due to non-conformance to the GoCD pipeline schema.

Example:

pipelines:
  pipe1:
    group: simple
    materials:
      mygit: 
        git: <Some URL>
    stages:
      - build: # name of stage
          elastic_profile_id: demo-app
          jobs:
            build: # name of the job
              tasks:
               - exec: # indicates type of task
command: echo "hello world"

This configuration should have thrown an error because the elastic_profile_id element is in the wrong location. Currently, there is no error or warning displayed anywhere to indicate something was misconfigured.

\cc: @tomzo @marques-work @arvindsv

@mirogta
Copy link

mirogta commented Apr 20, 2020

Is there the configuration schema defined as JSON Schema?

I couldn't find it (e.g. on http://schemastore.org/json/) but if there was one, it could be loaded to e.g. Visual Studio Code using https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml extension and provide a real-time validation while editing the YAML schema.

When I edit the YAML GoCD configuration in Visual Studio Code, it seems to know the available configuration keys, but it suggest to put any anywhere, i.e. even in incorrect places like suggested in this issue.

@arvindsv
Copy link
Contributor

@mirogta There isn't a schema as far as I am aware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants