CircleCI-Public / orb-tools-orb

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

dev publish with v12 workflow #200

Closed wyardley closed 1 year ago

wyardley commented 1 year ago

Describe Request:

Somewhere between a feature request and a question. With the new v12 workflow, can the dev orb be used (for private orbs) for testing in other repos, or only within the pipeline?

Based on this description:

  • The dynamic configuration system allows us to inject the orb directly into the pipeline as an "in-line" orb, allowing for orb testing without the need for access to a publishing token.

and from looking at the source code, it would seem like the ability to publish a dev version of a private orb for manual testing may now not be possible?

Examples:

Old config:

      - orb-tools/publish:
          name: publish-dev
          pub-type: dev

Supporting Documentation Links:

KyleTryon commented 1 year ago

Hey @wyardley , thanks for sharing. I just posted a response in your forum post here. I am going to just copy it here for ease of access


Hey @wyardley :wave:

how exactly can we use the old workflow with the new orb

We made sure to ensure this was possible, though this is not format the new template follows. Will expand a little below.

assuming there’s no way to use / test the packed private orb in a different project or workflow

This is correct, at least not with dynamically injected orbs, however, this is still completely possible in the way it was previously, by publishing a development version of the orb to a dev tag and testing it just as before.

Is there a way to still have it automatically publish / comment on the PR in dev mode.

Yes! Not only did we not remove this functionality, we improved it! You can now publish multiple development tags at once, anything you want custom.

The publish job has been updated, it is just no longer used for publishing development orbs in the orb tools 12 template

image

To publish a dev orb, it looks mostly the same:

- orb-tools/publish:
    orb_name: circleci/orb-tools
    vcs_type: <<pipeline.project.type>>
    pub_type: dev

pub_type here is not even necessary as dev is the default, but it is more readable this way in the config. By default, two tags will be produced for the dev version: dev:${CIRCLE_SHA1}, dev:alpha but you can add more now too!

Let me know what you think!

wyardley commented 1 year ago

Thanks!