Skip to content

[Feature Request] environment variable support in when conditions #45

Description

@andrewtremblay

when doesn't currently support environment variables. The current workaround is to add env var checks inside our own scripts.

if [ SOME_ENV_VAR = true ]; then run commands; else echo "skip commands"; fi

It would be very useful to have access to env variables in the when condition so that these scripts do not have to be more complicated.

...
blocks:
  - name: 'Distribute iOS build'
    skip: 
      when: $PLATFORM == 'android'
...

If other env notation is not usable, it could be at the same level as the change_in function:

...
blocks:
  - name: 'Distribute Android build'
    skip: 
      when: "env(PLATFORM) == 'ios'"
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions