Tagged vs untagged build configuration woes

Here’s my workflow:

#   ____________
#__/ Workflows  \_______________________________________________________________
workflows:
  version: 2
  untaggedd:
    jobs:
      - latex:
          filters:
            tags:
              ignore: /.*/
  tagged:
    jobs:
      - latex:
          filters:
            tags:
              only: /.*/
            branches:
              ignore: /.*/
      - publish-tag:
          requires:
            - latex
          filters:
            tags:
              only: /.*/
            branches:
              ignore: /.*/

I am expecting that if I have a tag, only the tagged workflow is executed.

What is happening is:

  1. Both of the workflows (tagged and untagged) are executed: Why?

  2. The tagged workflow fails with:

    Either git or ssh (required by git to clone through SSH) is not installed in the image. Falling back to CircleCI’s native git client but the behavior may be different from official git. If this is an issue, please use an image that has official git and ssh installed.
    Enumerating objects: 77, done.
    Counting objects: 100% (77/77), done.
    Compressing objects: 100% (54/54), done.
    Total 77 (delta 31), reused 63 (delta 17), pack-reused 0

    object not found

That is mighty strange as it is the exact same workflow that works fine in the untagged build: same code.

I am utterly baffled: what am I doing wrong here?

This is the job that fails in tagged but works fine in untagged as defined above.

  #   ____________
  #__/ Job: build \_____________________________________________________________
  latex:
    docker:
      - image: ubuntu:latest
    steps:
      - attach_workspace:
          at: ~/
      - checkout
      - run:
          name: Install LaTeX
          command: |
            DEBIAN_FRONTEND=noninteractive apt-get update -y
            DEBIAN_FRONTEND=noninteractive apt-get install -y \
              texlive-full texlive-latex-extra make graphviz
      - run:
          name: LaTeX build via make.
          command: |
            cp ~/project/.circleci/latexmkrc ~/.latexmkrc
            make
      - store_artifacts:
          path: ~/project/build/
      - persist_to_workspace:
          root: ~/
          paths:
            - ./project/

Anyone? … :frowning:

I fixed that. Apparently OpenSSH and git are not necessarily pre-loaded. Fine. I added a step to install those. It is working.

The rest is still not working: on a tag, I get a tagged and untagged builds starting.

1 Like

Hi @yanngolanski! You haven’t mentioned what you’re pushing. Your untagged workflow’s job is configured to ignore all tags, but it’ll run in response to anything else you push. It might be helpful to know what git operations you’re running.

Thank you @thekatertot, I tend to do things like this:

git add .circleci/config.yml 
git commit -m 'CircleCI publish 4'
git tag -a 'test' -m 'Testing CircleCI.'
git push --tag
git push
1 Like

Based on what you’ve provided this is some strange behavior. We’re going to have to investigate a little deeper.

If you haven’t already, would you mind opening a support ticket? You can link to this thread. Support can dig into your actual account and workflows to better understand what’s going on. We’d really appreciate it!

1 Like