Working with Workflows - What am I missing?

workflow

#1

Hi there -

Looking for some assistance with the Workflows feature. For some reason I cannot get a workflow to er… work. The idea is to have two steps: build and deployment. The workflow should run the build job followed by the deployment job. The Circle file validates correctly using circleci config validate. Unfortunately as soon as I add the workflows: declaration CircleCI stops building the project altogether. No error message, nothing.

Here is what I have for .circleci/config.yml:

version: 2
jobs:
  build:
    machine:
      enabled: true
    reusable: true
    branches:
      only:
        - master
        - staging
    steps:
      - checkout
      - run: echo 'export ECR_REPO_PREFIX=$ECR_REPO_PREFIX' >> $BASH_ENV
      - run: echo 'export TAG=1.0.$CIRCLE_BUILD_NUM' >> $BASH_ENV
      - run: eval $(aws ecr get-login --no-include-email --region us-east-1)
      - run: docker build --compress -t $ECR_REPO_PREFIX/orgname/repo-name:$TAG .
      - run: docker push $ECR_REPO_PREFIX/orgname/repo-name:$TAG | cat
  deployment:
    machine:
      enabled: true
    reusable: true
    branches:
      only:
        - master
        - staging
    steps:
      - run: pip install container-transform
      - run: container-transform -i compose -o ecs docker-compose.yml >> ecs-task-definition.json
      - run: cat ecs-task-definition.json

workflows:
  version: 2
  build_and_deploy:
    jobs:
      - build
      - deployment:
        requires:
            - build

Can anybody spot an error? I am using the official docs and have tried on multiple projects. This service is very simple yet still not working.


#2

UI bug - awesome. Workflow errors were hidden - typing in the URL resolved.


#3

Did typing in the URL show you errors? A few months ago I created workflows and I think I had a YAML error or required missing key, and it was a bit of trial-and-error to guess what the problem was :smile_cat:


#4

How did you fix it by typing the url? I seem to be running into a similar problem.


#5