updated_tag variable not populated in CI build (OD-181)
Sebastien Collier opened 6 years ago

On a CI job set up to trigger on created tag, I am trying to use the variable @updated_tag@ to get the tag name. However this is not populated with anything. Maybe I've misinterpreted what this variable is for?

  • Robin Shen commented 6 years ago

    This variable is only populated when the build is triggered by tag creation. When manually triggering a build, this variable is not populated as a commit may be associated with multiple tags.

  • Robin Shen commented 6 years ago

    To get list of tags on a specific commit, you may call below command in your job commands:

    git fetch --tags
    git show-ref --tags -d | grep @commit_hash@ | sed -e 's,.* refs/tags/,,' -e 's/\^{}//'
    
  • Robin Shen commented 6 years ago

    Also for convenience, a separate job variable commit_tags will be added in next patch release. You may watch below issue to get notified when it is released:

    issue #183

  • Robin Shen changed state to 'Closed' 6 years ago
    Previous Value Current Value
    Open
    Closed
  • Sebastien Collier commented 6 years ago

    Right I see the issue here, there are some internet connectivity issues that caused the build triggered by the tag creation to fail, and after that I was manually re-triggering the build. Deleting the tag and re-creating it does not re-trigger the build, it just takes me back to the previous failed build with my only option to manually re-trigger it.

  • Sebastien Collier commented 6 years ago

    Deleting the build and the tag, then re-creating the tag will re-trigger the correct build. However the server we are running OneDev on currently has some networking issues where things often timeout, and the issue here is that our docker login command times out and it would definitely be easier to re-trigger the build with a button than to have to delete the build and tag and create the tag again. I understand that this is not an ideal situation but due to remote working circumstances at the moment we aren't in a position to fix the infuriating network issues :(

issue 1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (3)
Reference
OD-181
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover