Skip to content

Instantly share code, notes, and snippets.

@takahi-i
Last active August 29, 2015 14:15
Show Gist options
  • Save takahi-i/54e6ce5b87fc5218018f to your computer and use it in GitHub Desktop.
Save takahi-i/54e6ce5b87fc5218018f to your computer and use it in GitHub Desktop.
Walter: Support Environment Variable

Load the environment variable to the Walter configuration files.

We follow the format of environment varibale as the discussion in terraform

Sample

messenger:
      type: ${env.MESSENGER_TYPE}
      channel: ${env.SLACK_CHANNEL}
service:
      type: github
      token: ${env.GITHUB_KEY}
pipeline:
          - stage_name: command_stage_1
            stage_type: command
            command: echo "hello, world"
            run_after:
            -  stage_name: command_stage_2_group_1
                 stage_type: command
                 command: echo "${JAVA_HOME}-desu"
            -  stage_name: command_stage_3_group_1
                 stage_type: command
                 command: echo "hello, world, command_stage_3_group_1"

Limitation

Environment validables are not able to support following part of Walter configuration file.

  • block key
    • e.g. ${env.BLOCKNAME} : command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment