Builds for tags not triggering

github
cci-20

#1

I have followed the documentation from here https://circleci.com/docs/2.0/workflows/#git-tag-job-execution and have a proper configuration in .circleci/config.yml for deploy step:

- deploy:
  requires:
   - build
  filters:
    tags:
      only: /\d+(\.\d+){2}(-(alpha|beta)(\d+)?)?/
    branches:
      ignore: /.*/

Unfortunately the build is not triggering whenever tags are pushed to GitHub and have to run deploy manually.

According to this post in the discussion (Git tag deploys in 2.0) tags should be working but they are not.


#2

Two questions.

  1. What is an example of a tag you’re using where this issue is occuring?

  2. Are you using this snippet for the build job as well?


#3
  1. The sample tags are 0.2.0, 0.2.1 etc.

  2. Yeah, I’m using similar configuration for other steps. My full config file is here: config.yml


#4

@FelicianoTech Any update on this bug?


#5

The main issue here looks to be that only the deploy job is configured to run for tag pushes. Since the deploy job has a dependency on build, build needs to run first and it isn’t configured to run on tag pushes.

Basically, all upstream jobs need to have:

    tags:
      only: /\d+(\.\d+){2}(-(alpha|beta)(\d+)?)?/

in order for deploy to run on tag pushes.

Also, just a suggestion, I wouldn’t use the cache to move your files through the Workflow. It isn’t the most efficient method. Please see: https://circleci.com/blog/persisting-data-in-workflows-when-to-use-caching-artifacts-and-workspaces/.

Considering they’re all sequential with no differences in which tags or branches they’d run for, you might want to combine checkout, dependencies, build, and test jobs into one.


#6

It’s been a while, but your suggestion doesn’t work t all. I simplified the config and both build and deploy jobs should run on tags. The build has configuration for filters:
filters:
branches:
only: /./
tags:
only: /.
/

This allows build job to run on every tag and every branch yet builds are not triggered for any tag. Something seems to be fundamentally broken with tags building.


#7

@LKay I thought I have the same issue but then realized I made a mistake in tag regex.
I believe you have the same problem and missed * after dot .
Try to make it as follows:

tags:
   only:
      /.*/

#8