You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Benefits
The result, would shorten the command to just
gocd configrepo preflight
It is also much less error prone. Getting the repo_id right can be annoying.
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
I suppose gocd-cli could be used in the future to add config repository to gocd through API, without ever going into the UI.
There could be an operation like this
gocd configrepo new -r my-new-id --yaml
It would:
create a boiler plate ci.gocd.yaml file
generate .gocd-cli.yaml with extra field registered: false to point that repo is not on gocd server yet.
Then user edits the ci.gocd.yaml as needed. During this time it is already OK to run:
@tomzo All that looks good to me. Anything to make it easier to use, I'm on board for. We need to put in a little bit of work soon towards this, to make it easier to use. At the very least, we need to make a release of this and make it easy to find and use.
@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.
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.
Feature proposition
I'd like to propose following convention, in order to shorter above commands.
In config-repo users would add a file, say
.gocd-cli.yaml
with following contentThe 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.
Benefits
repo_id
right can be annoying.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
I suppose
gocd-cli
could be used in the future to add config repository to gocd through API, without ever going into the UI.There could be an operation like this
It would:
ci.gocd.yaml
file.gocd-cli.yaml
with extra fieldregistered: false
to point that repo is not on gocd server yet.Then user edits the
ci.gocd.yaml
as needed. During this time it is already OK to run:Then user runs
which adds repo to GoCD.
Then commit and push.
@arvindsv @marques-work what do you think?
The text was updated successfully, but these errors were encountered: