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

support CircleCI host & GHE url customizations (relevant for Server customers) #161

Closed kelvintaywl closed 1 year ago

kelvintaywl commented 1 year ago

[edited]

This is a PR against master, incorporating @rprince-anduril 's PR contributions (commits) at #156 (thank you @KyleTryon! 🙇 )

I am following up via a PR since I cannot push these changes directly to #156 i think (given that it originates from a fork).

This PR addresses the comments from @KyleTryon, specifically by making the CIRCLE_API_HOST env var populated via job parameters.

I followed the convention seen on continue job: https://github.com/CircleCI-Public/orb-tools-orb/blob/b28775abca733a2f36b92ba198b8ed1717cc9144/src/jobs/continue.yml#L23-L42

Here, we set up the CIRCLE_API_HOST env var with this param for steps running the scripts/pack.sh and scripts/publish.sh.

Confirmed the changes are valid as with Orb validation.

$ circleci orb process src/@orb.yml | circleci orb validate -

Orb input is valid.

$ circleci orb pack src | circleci orb validate -

Orb input is valid.
kelvintaywl commented 1 year ago

if merged, we can then close #156 in favour of this then, if i understand correctly. @rprince-anduril 's contributions is still reflected here, as with the commits they contributed.

orb-publisher commented 1 year ago

Your development orb has been published. It will expire in 30 days. You can preview what this will look like on the CircleCI Orb Registry at the following link: https://circleci.com/developer/orbs/orb/circleci/orb-tools?version=dev:d6fccc49a5289ece5e562bb90af7d352060166b2

KyleTryon commented 1 year ago

Ah a few failures were likely caused by a quirk of this repo (being orb tools relies on itself), it looks like after some failures the alpha version could not be updated which is needed for testing the newest changes. I just took care of that manually. Now everything is testing properly. I did make two changes that I do believe were needed as well. Looks like the tests pass but we'll need someone on server to truly test it, but all looks great now.

Going to merge now 👍 Thank you @kelvintaywl

orb-publisher commented 1 year ago

Your development orb has been published. It will expire in 30 days. You can preview what this will look like on the CircleCI Orb Registry at the following link: https://circleci.com/developer/orbs/orb/circleci/orb-tools?version=dev:b0813b8e16fdbdecaba21fd9b5de8634d3a29b18