GIT tags

Comments

9 comments

  • Official comment
    Avatar
    Mansi Shah

    This forum is only for reference, please redirect your queries to the GoCD community

    Comment actions Permalink
  • Avatar
    Srinivas Upadhya

    Hi Devin,

    We currently do not support Git tags.

    But we would like to know your use-case better. Can you please elaborate on how you intend to use git tags for go?

    Is it to make it more descriptive for deploy pipelines on which revision they pick for deployment?

    Regards,

    Srinivas

    0
    Comment actions Permalink
  • Avatar
    Devin Quince

    Currently we are using a branch parameter that we pass to git for cloning a repository as listed above and here

    <param name="Branch">master</param>

     <git url="git://gocentosagent01/lib.git" branch="#{Branch}" dest="Lib" />

    I am confused though, as I received this response from support that says I am should able to from Ankush Dadu, so which is correct?

    0
    Comment actions Permalink
  • Avatar
    Ankush Dadu

    Hi Devin,

    Sorry for the confusion. in the previous response we had said

    You can use parameters as part of the URL. 
    The following is the test we did on our local environment and it triggers with the correct head.

    <pipeline name="test"> 
    <params> 
    <param name="branchname">master</param> 
    </params> 
    <materials> 
    <git url="c:/users/username/git-repo" branch="#{branchname}" autoUpdate="false" materialName="gitm" /> 
    </materials> 
    <stage name="defaultStage"> 
    <jobs> 
    <job name="defaultJob"> 
    <tasks> 
    <exec command="ls" /> 
    </tasks> 
    </job> 
    </jobs> 
    </stage> 
    </pipeline>

    What this means is that you can parameterize a branch name for GIT i.e, when you specify branch='foo' , Go specifically looks for the 'foo' branch in the git repo. 

    However you cannot use tags in the same manner. Could you please provide us the use case of why you want to tags instead branch because they are not interchangeable.

    Thanks,
    Ankush 

    0
    Comment actions Permalink
  • Avatar
    Drew Blessing

    Devin,

    I'm honestly very surprised that Go doesn't support git tags (still, in 2014!). It would seem that Go should support any git reference - branch, sha, tag. Most systems do that. The use case is that tags are very descriptive, and (often) human-readable/meaningful. We create a tag every time we intend to deploy to production. It makes tracking very easy. Perhaps in a true continuous delivery environment tags are superfluous but I suspect many people still use tags and this is actually a blocker for using Go. Please support tags in the future.

    1
    Comment actions Permalink
  • Avatar
    Aravind SV

    I have a question about this. I understand why git tags are useful (of course). I don't see how the ability to specify a tag, instead of a branch, helps. A branch keeps moving. So, you can find that there are "new commits" and can trigger new builds. A tag, by definition (an unchanging link to a commit), will never really have new commits, when monitored. How is it useful to specify a git material using a tag?

    Also, the Go community pages have moved to mailing lists. You can find the links here: http://www.go.cd/community. There are more people there, to help.

    Regards,

    Aravind

    0
    Comment actions Permalink
  • Avatar
    Drew Blessing

    Aravind,

    A git tag doesn't make much sense to put as a default value and to use with polling. However, it makes much more sense for a manually triggered build where you want to insert a specific revision in the build parameters. 

    I will continue this discussion over in the mailing list. Thanks.

    0
    Comment actions Permalink
  • Avatar
    Stefan Motz

    Hi,

    I have to agree with Drew.

    Please support tags in Go. This blocks us from using Go because we have to deploy taged version to our productive environments.

     

    Regards,

    Stefan

    1
    Comment actions Permalink
  • Avatar
    Adeline Chew

    Hi, 

    Is tag supported in Go yet? Release branches changes all the time, for example release/2017/1/1 or release/2018/1/1 so we created a release tag that can always be constant and that gets updated each time a new release is cut. Is there a better way to poll for a new release branch? If not, please consider supporting tags.

    Thanks in advance.

    Regards,

    Adeline

    1
    Comment actions Permalink

Post is closed for comments.