Do "tag" triggers interact with "branch" triggers?

git

#1

I’m trying to trigger a build based on a tag, but the tag is on a commit in a branch. When I push the tag, it doesn’t seem to trigger the build.

deploy:
  prodish:
    tag: /prodish-.*/
    commands:
      - ...
  dev:
    branch: dev_branch
    commands:
      - ...

If I push to dev_branch it triggers the dev_branch section, but if I then tag a specific commit in the dev_branch with prodish-v1.0.0 for example, it doesn’t trigger the prodish section.

I’m trying to build an artifact in the dev section, and then deploy that same artifact without rebuilding it in my deployment pipeline to the next stage once I’m happy with it.


#2

Figured it out. Builds triggered by tags only show up on the top level project link, they don’t create a line of their own, and they don’t show up on a branch if you tagged a commit on that branch.


#3

Glad you figured it out, thanks for posting the solution :slight_smile:


#4

I actually have the same problem, my build isn’t running when pushing a new tag.

deployment:
  production:
    tag: /production-.*/
    commands:
      - npm run build production
      - ./deploy_production.sh
  staging:
    branch: develop
    commands:
      - npm run build staging
      - ./deploy_staging.sh

When I added a commit to my develop branch, it got built and deployed to staging. But when I then tag that commit and push the tag, it does not trigger a production build. Nothing is happening in the dashboard at all.


#5