Uploaded image for project: 'IT: Release Engineering'
  1. IT: Release Engineering
  2. RELENG-2568

Global-jjb release-job.sh fails on existing *lightweight* tag

Issue XMLXMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • Q4 2019 Tech Debt
    • None
    • Global JJB
    • None
    • ORAN

      The global-jjb shell script release-job.sh pushes the release version as a tag to the repo. However it checks first, and if the tag exists, it tries to do nothing. However, it fails to account for the difference between lightweight and annotated tags. An existing lightweight tag causes the following error:

      error: 1.0.4: cannot verify a non-tag object of type commit.
      

      The critical line in release-job.sh that breaks is in the tag function:

          if git tag -v "$VERSION"; then
      

      Here's an example of a release verify job that chokes on a change where the tag exists:

      https://jenkins.o-ran-sc.org/job/ric-plt-a1-release-verify/2/console

      Here's a bit of background:

      https://stackoverflow.com/questions/24545459/git-tagging-questions

      This solution may be to use git tag -l instead, which seems to work on both annotated and lightweight tags, as discussed here:

      https://stackoverflow.com/questions/17790123/shell-script-trying-to-validate-if-a-git-tag-exists-in-a-git-repository-in-an/36942600

              cl778h Chris Lott
              cl778h Chris Lott
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: