Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Shorter syntax for configrepo preflight; add .gocd-cli.yaml file #40
Currently, in order to validate a repository with preflight api we use following command:
Or for many files something like
It makes sense, all arguments are absolutely required for the API call.
I'd like to propose following convention, in order to shorter above commands.
In config-repo users would add a file, say
--- config_repo_id: my-repo-id plugin_id: yaml.config.plugin file_pattern: "**/*.gocd.yaml" registered: true
The gocd-cli would search for such file in current directory. If file is found, then these values can be used instead providing them each time as arguments.
My point is that all these values are pretty much constant throughout the lifespan of the configuration repository - same repo_id, same plugin, same file pattern.
Extension in the longer term
Then user edits the
Then user runs
which adds repo to GoCD.
@arvindsv @tomzo regarding configrepo crud operations, I've already built that. I've got it in a local stash that I haven't pushed up yet because I wanted to review the interface again to make sure it feels consistent.
However, I never considered having a flag to control registration as @tomzo suggested. Currently, it's really a convenience over the API, but is pretty raw. I'll push that soon, and perhaps we can iterate over this idea and get it working.