Possible to publish private orb with orb-tools?

The title pretty much says it all. I need to publish an orb as private to an organization, but reading through the orb-tools documentation, I don’t see an option to specify public vs. private in the publish job.

Am I missing something, or is it really only possible to publish a private orb via the CLI?

You can! There is no difference in the process. The orb just needs to be created using the --private flag.

Just to be 100% sure, I went to the source to check: circleci-cli/orb.go at ec7d8d3bff677e0bdce7830fdefaee6dcab64da7 · CircleCI-Public/circleci-cli · GitHub

Thanks for taking a look, @KyleTryon!

I’m not sure if you misunderstood my question, or if I’m still just confused. I’m aware of the ability to publish a private orb using the CLI with the --private flag as shown in the link you posted. What I’m trying to figure out is how to accomplish that when using the orb-tool orb’s publish command. It looks like that orb just calls the CLI publish command but doesn’t provide a parameter to specify to pass in the --private flag: orb-tools-orb/publish.sh at master · CircleCI-Public/orb-tools-orb · GitHub

Does that make sense?

1 Like

Totally makes sense.

The publish command does not need this flag. The orb itself is private, any and all versions from here on out will always be private (and you can not un-private). So the orb-tools orb process is actually 100% the same for private and non-private orbs. The only difference is making sure that when you create the orb originally, it has the private flag.

private is not a flag available on the orb publish command.

Ah, I see. I totally overlooked that the --private flag is passed to the init command, not the publish command :man_facepalming:.

And orb-tools appears not to include the init functionality, which makes sense since it’s something that would just be run once via the CLI.

Thanks for clarifying!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.