-
Notifications
You must be signed in to change notification settings - Fork 123
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
[CLI-FEATURE] add registries options for oc publish #1277
Conversation
src/cli/commands.ts
Outdated
registries: { | ||
array: true, | ||
description: | ||
'registries to publish, overriding your configuration in oc.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List of registries to publish to. This setting will take precedence over oc.json file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
test/unit/cli-facade-publish.js
Outdated
@@ -101,6 +102,20 @@ describe('cli : facade : publish', () => { | |||
}); | |||
}); | |||
|
|||
it('should take precedence the registries set through options', done => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should take precedence over the registries set through oc.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Right now, to publish to registries you need to have set a
oc.json
file with your registries. This works well when you only publish to one registry, or you always publish to all the registries at the same time (so you can have your oc.json versioned in your repo and just use it).The problem is that that solution doesn't work as well when your deployment setup is to publish to a different registry depending on your environment (1 or more registries on each environment). In that case, for every deployment, you have to go and edit the oc.json before being able to call
oc publish
.For those cases, I'm adding a new option
--registries
that allows you to pass a list of registries that will override your oc.json configuration. So when you want to publish you can just dowithout needing a oc.json