Pushing a commit and then a tag causes Workflow to stall

workflow
getting-started

#1

Hi,

I am trying to configure circle-ci so that any pushes to a branch build that branch. Any tags pushed to the branch will cause a release to happen.

What I am seeing is if I push the commit then the workflow executes the first correctly. If I then subsequently push the tag then the workflow runs again including the release step.

HOWEVER, if I push the commit and then immediately push the tags before the workflow responding to the previous commit has finished then the second workflow just sits there waiting (seemingly) indefinitely.

I am on the free plan so I would expect the second workflow instance to wait until the first one has finished, the problem being that the paused instance doesn’t seem to notice the first workflow instance has finished.

My (newbie attempt at a) workflow:

> cat .circleci/config.yml 
version: 2.0
jobs:

          build:
              docker:
                - image: circleci/clojure:lein-2.7.1
              environment:
                LEIN_ROOT: nbd
                JVM_OPTS: -Xmx3200m
              steps:
                - checkout
                - restore_cache:
                    key: playground-{{ checksum "project.clj" }}
                - run: lein deps
                - save_cache:
                    paths:
                      - ~/.m2
                    key: playground-{{ checksum "project.clj" }}
                - run: lein do test, uberjar
                - store_artifacts:
                    path: target
          deploy:
              docker:
                - image: circleci/clojure:lein-2.7.1
              environment:
                LEIN_ROOT: nbd
                JVM_OPTS: -Xmx3200m
              steps:
                - checkout
                - restore_cache:
                    key: playground-{{ checksum "project.clj" }}
                - run: lein deps
                - save_cache:
                    paths:
                      - ~/.m2
                    key: playground-{{ checksum "project.clj" }}
                - run: lein do test, uberjar
                - store_artifacts:
                    path: target
                # download ghr
                - run:
                    name: "Download ghr"
                    command: |
                      echo "downloading ghr"
                      wget -c https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_linux_amd64.zip
                      unzip ghr_v0.5.4_linux_amd64.zip
                      cp ghr bin
                - deploy:
                    name: Release to GitHub
                    command: bin/release-in-github.sh
workflows:
  version: 2
  build-test-and-deploy:
          jobs:
                  - build:
                      filters:
                          tags:
                             only: /.*/
                  - deploy:
                          requires:
                              - build
                          filters:
                            tags:
                              only: /^release.*/
                            branches:
                              ignore: /.*/

#2

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