Closed tdeekens closed 1 year ago
Hello @tdeekens While the git tag could match this pattern, the version of the orb itself could not. https://circleci.com/docs/orb-concepts#semantic-versioning
Each individual orb can only publish as X.Y.Z
and each version is immutable. With this fact, would being able to customize the got tag with a prefix still be preferable if the orb itself can not?
Hi,
thanks for getting back!
Yes, I am aware that each production published Orb is immutable and has to follow regular semantic version.
Even in this case it would still be preferable to prefix the git tag triggering a publish while the released Orb's version omits the prefix.
There are two scenarios I can see this being beneficial:
In both cases the prefix would solve the issues one otherwise faces.
Hi all,
I'm facing the same issue as described by @tdeekens, with multiple orbs living in the same repo. imho, the version pattern could still be checked (as it is now) but allowing us to pass the version as parameter would be awesome. You could still default to CIRCLE_TAG anyways.
It would greatly improve the flexibility and wouldn't hurt whoever uses it right now.
Thanks for chiming in,
just to clarify: the CRCLE_TAG
is what git tag
was previously when then pushed. If a tag is my-orb-v1.0.0
as a git tag
then that will be the CIRCLE_TAG
. This will then be configured as a filter
for a certain Orb to be packed and published.
I then see two options how the Orb can use the tag to know what version to publish:
tag_prefix
parameter which tells the Orb which part of the CIRCLE_TAG
to omit when intending to extract the version from the CIRCLE_TAG
containing the prefixThere might be better options obviously.
Personally, I prefer option (2) because of separation of concerns. If the job is to publish, it shouldn't (imho) care what's your naming convention.
I took the initiative and sent a draft PR with a suggestion to illustrate. Sorry if there's something incorrect - I was aiming just at sharing my way of thinking.
Did you find any workaround @tdeekens ?
No, I didn't. I don't think there is. The only work around I could think of is building my own orb-tools which suits my needs exactly. However, I still think this is a valid use case for the Orb and would help others if it was supported.
Hey all, I think i could be misunderstanding.
@tdeekens the tag is not decided by the orb, it id decided by the config file, are you not able to modify the tag regex string in the deploy job?
@KyleTryon thanks for getting back. Trying to follow along your question. I can configure the git tag RegExp on "my" job triggering orb-tools to publish. Still orb-tools requires then requires the git tag to follow this format. So If I'd configure my job to trigger on say my-orb-name-v1.2.3
to publish via orb-tools then orb-tools would fail the the CIRCLE_TAG doesn't match the required format by orb-tools.
I already opened an issue for a different (but related) issue: #172.
I would like to have the ability to specify a custom development version.
This used to be possible with the old orb version, but isn't anymore. See #172 for the reasoning why.
Alright folks I think I have a possible solution that should satisfy everyone. We will allow users to supply custom regex strings and we will grep out the version from the matched tag strings. I will follow up shortly with a PR
I've adopted what was released. Thanks for your work. Really helps us out!
Describe Request:
This Orb currently requires the git tag pushed to be e.g. v1.2.3.
At times an Orb will be developed in a repository along side other code.
In those cases demanding a git tag format to be vx.y.z is not sufficient. It would be better to allow a prefix to the tag.
As a result the tag could be circle-orb-v1.2.3 and circle-orb-2-v1.2.3.
As a result one could publish multiple Orbs from one repository as well as a repository in which the current tag is already in use.