Why isn't this very simple config working? Bug?

#1

I can’t figure out why the <<foobar>> interpolations aren’t working? I expected echo "hello".

version: 2
jobs:
  a:
    docker:
    - image: circleci/python:3.7
    steps:
    - run:
        name: ''
        command: |
          echo ""
workflows:
  ci:
    jobs:
    - a:
        context: org-global-v2
  version: 2

# Original config.yml file:
# version: 2.1
# 
# workflows:
#   ci:
#     jobs:
#       - a:
#           foobar: hello
#           context: org-global-v2
# 
# jobs:
#   a:
#     parameters:
#       foobar:
#         type: string
#     docker:
#       - image: circleci/python:3.7
#     steps:
#       - run:
#           name: << foobar >>
#           command: |
#             echo \"<<foobar>>\"
1 Like
#2

Hi Jason. I believe you need << parameters.foobar >>"

#3

Yep! Need some sleep I think :blush:

#4

@drazisil why isn’t an error raised?

For example, with a param name typo:

version: 2.1

workflows:
  ci:
    jobs:
      - a:
          foobar: hello
          context: org-global-v2

jobs:
  a:
    parameters:
      foobar:
        type: string
    docker:
      - image: circleci/python:3.7
    steps:
      - run:
          name: << foobarr >>
          command: |
            echo "<<foobarr>>"

❯ cci config process .circleci/config.yml
Error: Error calling workflow: 'ci'
Error calling job: 'a'
Arguments referenced without declared parameters: foobarr

But, since foobar is also never going to work, but instead must be parameters.foobar, why no clear error message in that case?

1 Like
#5

Sleep is highly recommended from time to time…or so they tell me. :smiley:

1 Like
#6

Great question. I’ll file a bug with that team.

1 Like
closed #7

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