CircleCI-Public / orb-tools-orb

Various tools for authoring and publishing CircleCI orbs
https://circleci.com/orbs/registry/orb/circleci/orb-tools
MIT License
51 stars 74 forks source link

Add the ability to validate orbs that use a private dependent orb #154

Closed hsq-eshtivelberg closed 1 year ago

hsq-eshtivelberg commented 2 years ago

Describe Request:

Currently, the "orb-tools/pack" workflow fails when using a private orb as a dependency during the "validate" step in the workflow. I would like to add the ability to either skip validation or add an option for a private circle token to allow for validation of the orb.

Examples:

circleci orb validate /path/to/orb.yml --token ${CIRCLE_TOKEN} should be able to validate orbs that depend on private orbs. Also, the previous versions of the orb before v11 did have the ability to skip validation, though it would be preferable to just pass the token in so the orb could still be validated.

Supporting Documentation Links:

Here is the v10 version of the "orb-tools" orb that had a "validate" option: https://circleci.com/developer/orbs/orb/circleci/orb-tools?version=10#jobs-pack

jschwanz commented 2 years ago

I've hit this same issue. To drill a little deeper into it I've created a related bug in the circleci-cli project. I personally think it's a shortcoming of the CLI, and this Orb shouldn't need to work around the flaw in the CLI.

KyleTryon commented 1 year ago

Thanks folks, going to tackle this. Sorry for the delay.

KyleTryon commented 1 year ago

Actually good news, looks like we fixed this back in August, as it was also affecting server users. If anyone is still experiencing this issue on the latest version of Orb Tools, please let us know. https://github.com/CircleCI-Public/orb-tools-orb/pull/161

https://github.com/CircleCI-Public/orb-tools-orb/blob/master/src/scripts/validate.sh#L9

emillg commented 1 year ago

@KyleTryon I tried to set the context with CIRCLE_TOKEN in orb-tools/pack, but the validation still fails for our private orb. We use SaaS version CircleCI.

Can you check why?

      - orb-tools/pack:
          context: orb-publishing
          filters: *filters