CircleCI is running test workflow twice


#1

My workflow configuration looks like this:

workflows:
  version: 2
  test-and-deploy-if-tagged:
    jobs:
      - build-and-test:
          filters:
            tags:
              only: /.*/
      - deploy-to-qa:
          filters:
            tags:
              only: /^deploy.*/
            branches:
              ignore: /.*/

The deploy-to-qa workflow includes:

  deploy-to-qa:
    requires:
      - build-and-test

On a regular master commit the build-and-test workflow runs. This is what I want. :+1:

When I’m ready to cut a build, I…

  • make a new commit to bump the version number
  • tag the new commit (e.g. deploy-build-123)

After I push the new commit and tag, CircleCI runs build-and-test twice and deploy-to-qa once.

How can I configure it so a tagged release runs build-and-test only once, and if it passes, then run deploy-to-qa?


#2

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.