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

Can't use local env vars in template strings in workflow steps #2235

Closed
eysi09 opened this issue Feb 2, 2021 · 0 comments · Fixed by #2247
Closed

Can't use local env vars in template strings in workflow steps #2235

eysi09 opened this issue Feb 2, 2021 · 0 comments · Fixed by #2247
Assignees
Labels

Comments

@eysi09
Copy link
Collaborator

eysi09 commented Feb 2, 2021

Bug

Current Behavior

I'm getting a validation error when using local env vars in workflow steps, see repro below.

Reproducible example

Create a workflow like this:

kind: Workflow
name: run-tests
steps:
  - name: run-tests
    skip: ${local.env.SKIP != ''}
    command: [test]

Run garden validate and observe the error:

Error validating workflow: key .steps[0][skip] must be a boolean

Workaround

This only seems to be an issue with local env vars so the following should work:

kind: Project
variables:
  skip: ${local.env.SKIP}

---

kind: Workflow
name: run-tests
steps:
  - name: run-tests
    skip: ${var.SKIP != ''}
    command: [test]

Suggested solution(s)

Additional context

This was written in a hurry, @thsig feel free to elaborate.

Your environment

  • OS:
  • How I'm running Kubernetes:

garden version

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

Successfully merging a pull request may close this issue.

3 participants