Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any variables: Template strings in nested map variables aren't executed #1511

Closed
pd93 opened this issue Feb 19, 2024 · 1 comment · Fixed by #1526
Closed

Any variables: Template strings in nested map variables aren't executed #1511

pd93 opened this issue Feb 19, 2024 · 1 comment · Fixed by #1526
Labels
area: variables Changes related to variables.

Comments

@pd93
Copy link
Member

pd93 commented Feb 19, 2024

When you create a map variable using the any variables experiment, any strings that contain templating are not evaluated by the templating engine. Instead, the raw, unevaluated string is returned.

version: '3'

vars:
  IMAGE_TAG: 'latest'

tasks:
  default:
    vars:
      works: '{{.IMAGE_TAG}}'
      # TASK_X_ANY_VARIABLES=1
      does:
        not:
          work: '{{.IMAGE_TAG}}'
      # TASK_X_ANY_VARIABLES=2
      does:
        map:
          not:
            work: '{{.IMAGE_TAG}}'
    cmds:
      - 'echo {{.works}}'
      - 'echo {{.does.not.work}}'

Originally posted by @cwrau in #1415 (comment)

  • Task version: v1.34.1
  • Operating system: Linux
  • Experiments enabled: Any Variables 1/2
@pd93 pd93 added type: bug Something not working as intended. area: variables Changes related to variables. labels Feb 19, 2024
@pd93
Copy link
Member Author

pd93 commented Feb 19, 2024

I think #1477 may also be caused by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: variables Changes related to variables.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant