walter-cd / walter

Tiny deployment pipeline
http://walter-cd.net
Apache License 2.0
438 stars 39 forks source link

Support environment variables in the Walter configuration file #77

Closed takahi-i closed 9 years ago

takahi-i commented 9 years ago

Motivation is discussed in #67.

The following is a sample the format of configuration files with environment variables.

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"

NOTE

Environment variables are not supported in block key in the yaml formatted file. For example, the following configuration is invalid

${env.BLOCKNAME} : command