# Job triggered by tag but TRAVIS\_BRANCH is different to TRAVIS\_TAG

**URL:** <https://travis-ci.community/t/job-triggered-by-tag-but-travis-branch-is-different-to-travis-tag/14050>\
**Category:** Deployment\
**Tags:** bug\
**Created:** [November 6, 2023, 2:56pm UTC](https://travis-ci.community/t/job-triggered-by-tag-but-travis-branch-is-different-to-travis-tag/14050 "2023-11-06T14:56:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdhayhurst](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jdhayhurst/32/8959_2.png) [@jdhayhurst](https://travis-ci.community/u/jdhayhurst)\
**Post date:** [November 6, 2023, 2:56pm UTC](https://travis-ci.community/t/job-triggered-by-tag-but-travis-branch-is-different-to-travis-tag/14050/1 "2023-11-06T14:56:01Z")

</div>

Link to build with example of bug: [Travis CI - Test and Deploy with Confidence](https://app.travis-ci.com/github/opentargets/platform-api/jobs/612780169#L394)

In the documentation, the TRAVIS\_BRANCH environment variable should be equal to the TRAVIS\_TAG when the build is triggered by a tag:

> for builds triggered by a tag, this is the same as the name of the tag (`TRAVIS_TAG` )

Link to documentation section: [Environment Variables - Travis CI](https://docs.travis-ci.com/user/environment-variables/#default-environment-variables)

In the build linked above, the two variable are different, despite the build being triggered by a tag. Builds that we ran last week did not exhibit this behaviour.

Many thanks!

---

<div class="post-metadata">

**Author:** ![Montana](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/montana/32/9566_2.png) [@Montana](https://travis-ci.community/u/Montana)\
**Post date:** [November 7, 2023, 4:34pm UTC](https://travis-ci.community/t/job-triggered-by-tag-but-travis-branch-is-different-to-travis-tag/14050/2 "2023-11-07T16:34:54Z")

</div>

Hi @jdhayhurst,

This should resolved now.
