-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support to control which tags auto_tag creates #237
Comments
auto_tag is meant to be opinionated and simple. Either you use it as-is or you do not use it at all. There are too many ways to customize tags and if we go down this path, we have to consider other requests to customize auto_tag such as adding branch, commit sha, etc. I therefore prefer to keep auto_tag simple. Hover, I do think a good compromise would be to allow custom tag logic via an external starlark script that you checkin to your repository. Thoughts @tboerger ? |
We also have a related problem with several repositories where we release multiple services from one repo using tag prefixes. Auto tag cannot handle it tags like The - name: docker/foobar
image: plugins/docker
settings:
repo: dreg.example.com/project/foobar
dockerfile: contrib/drone/Dockerfile.foobar
when:
ref:
- refs/tags/cmd/foobar/** I could also write a separate drone plugin that can create |
I could maybe have a go at it experimenting some to get a POC.. I have been wanting to try use *lark for something but have not had a real project.. I'd guess that we would add in builtins for semver parsing (in go) so there are a reasonable set of utility to work with. Do any other drone plugin have lark scripting now? |
I'm not a big fan of changing the auto tag behavior, as brad said it's pretty simple intentionally. Every other special case can make use of the tags file. From my experience your use case seem to be more of a corner case. |
supporting multiple minor releases of software is certainly not unusual. |
Btw. my second example more or less maps to how go modules works for multi module repositories as well . From my experience it's the go to solution for when you want a lot of projects in one synchronized code base with git. |
My dilemma is a bit different but it may still worth discussing it here because as far as I can tell, the auto_tag feature silently ignores semver parsing failure and returns
I acknowledged that you are not accepting pull request to change the auto_tag behavior but would you @tboerger & @bradrydzewski be so kind to clarify why the current implementation behaves like this? Of course, it causes problems to us because our staging environment depends on (ie. pulls) the IMHO it would be better to make the build fail or use the provided tag as is. |
no reason. I probably did not consider this implications of this edge case when I wrote the code.
this seems reasonable to me. I think using the tag as-is if semver fails would seem to make sense. |
May I send a PR then? |
We release new versions of multiple minor version images in some builds which means that the
{image}:{major}
tag randomly switches depending on the last build of any 1.x release series .So either
auto_tag
can transform into in addition of being an boolean option also support a list of version tags or it's own option:The text was updated successfully, but these errors were encountered: