git-resource icon indicating copy to clipboard operation
git-resource copied to clipboard

specifying multiple tags in tag_filter?

Open jaychris opened this issue 6 years ago • 6 comments

Is there a way to specify multiple tags in tag_filter? The documentation indicates that it supports bash-compatible globs, but I can't seem to figure out a way to make it trigger off a specific list of tags like:

abc-* bcd-* cde-*

Basically, I only want to trigger a build if one of those tags is committed...

jaychris avatar Feb 28 '18 23:02 jaychris

Basically it only do a git tag --list $tag_filter

https://github.com/concourse/git-resource/blob/master/assets/check#L78

So you should be able to do something like

tag_filter: "abc-* bcd-* cde-*"

talset avatar Oct 31 '18 10:10 talset

@talset I would like to display "latest release = git tag -l | tail -1" in the concourse whenever the job is running with tag_filter. How can I do it?

- name: source-code
  type: git
  source:
    uri: [email protected]:concourse/git-resource.git
    branch: master
    tag_filter: "?????????????"

gowrisankar22 avatar Feb 02 '19 08:02 gowrisankar22

@gowrisankar22 Here is how tags are checked by default git tag --list "$tag_filter" --sort=creatordate | tail -1

So you might be able to put tag_filter: "*" to get the latest tag created.

talset avatar Feb 02 '19 09:02 talset

@talset thanks a lot for the info. Does this show up in the concourse ui as well ??

image

gowrisankar22 avatar Feb 02 '19 11:02 gowrisankar22

yes you should see a tag: foo field

talset avatar Feb 04 '19 09:02 talset

cool 👍 @talset let say I have git repo(a) which has a submodule(b). We have tags for release are there in submodule only. If I am using "a" only in the git resource, how can get the tags from submodule and display it?

gowrisankar22 avatar Feb 04 '19 09:02 gowrisankar22