Whisk Deploy Interpolation

Here is the list of YAML key/value in manifest/deployment file for which Whisk Deploy supports interpolation including evaluating strings using environment variables. For example, $USERNAME and ${USERNAME} evaluates to environment variable USERNAME. It also supports double $ notation, for example, $${USERNAME} evaluates to ${USERNAME}.

Manifest File

Package Name

project:
    name: helloworld
    packages:
        $PACKAGE_NAME_1:
            actions:
                ...
        ${PACKAGE_NAME_2}:
            actions:
                ...
        ${PACKAGE_NAME_3}_package:
            actions:
                ...

Annotation (under Action, Sequence, Trigger, Rule, and Dependency)

project:
    name: helloworld
    packages:
        helloworld:
            actions:
                hello:
                    function: hello.js
                    annotation:
                        username: $USERNAME
                        password: ${PASSWORD}
                        host: http://${USERNAME}@${PASSWORD}/${URL}.com

Action Function

project:
    name: helloworld
    packages:
        helloworld:
            actions:
                hello1:
                    function: $OPENWHISK_FUNCTION_FILE
                    runtime: nodejs:default
                hello2:
                    function: ${OPENWHISK_FUNCTION_FILE}
                    runtime: nodejs:default
                hello3:
                    function: ${OPENWHISK_FUNCTION_PYTHON}.py
                hello4:
                    function: https://${OPENWHISK_FUNCTION_GITHUB_DIR}.js                    function: github.com/apache/openwhisk-test/packages/helloworlds

Trigger Feed

project:
    name: helloworld
    packages:
        helloworld:
            triggers:
                everyhour:
                    feed: /whisk.system/alarms/alarm
                message-trigger:
                    feed: Cloud_Functions_${KAFKA_INSTANCE}_Credentials-1/messageHubFeed
                github-trigger:
                    feed: ${GITHUB_PACKAGE}/webhook

Inputs (under Package, Action, Dependency, Trigger, and Trigger Feed)

project:
    name: helloworld
    packages:
        helloworld:
            actions:
                hello:
                    inputs:
                        username: $USERNAME
                        password: ${PASSWORD}
                        host: https://${USERNAME}@${PASSWORD}/github.com

Deployment File

Inputs (under Package, Action, and Trigger)

project:
    name: helloworld
    packages:
        helloworld:
            actions:
                hello:
                    inputs:
                        username: $USERNAME
                        password: ${PASSWORD}
                        host: https://${USERNAME}@${PASSWORD}/github.com