Parameters Screwdriver Yaml

Screwdriver Keywords parameter, parameters, parameters build, parameterized, parameterized build

Parameters are defined on the top level of screwdriver.yaml, see below as example.

Definition

There are 2 ways of defining parameters, see

parameters:
    nameA: "value1"
    nameB:
        value: "value2"
        description: "description of nameB"

Parameters is a dictionary which expects key:value pairs.

nameA: "value1"

key: string is a shorthand for writting as key:value

nameA:
    value: "value1"
    description: ""

These two are identical with description to be an empty string

Example

See Screwdriver pipeline

shared:
    image: node:8

parameters:
    region: "us-west-1"
    az:
        value: "1"
        description: "default availability zone"

jobs:
    main:
        requires: [~pr, ~commit]
        steps:
            - step1: 'echo "Region: $(meta get parameters.region.value)"'
            - step2: 'echo "AZ: $(meta get parameters.az.value)"'

You can also preview the parameters that being used during a build in Setup -> sd-setup-init step

Pipeline Preview Screenshot:

image

image

image

Further Reading

Please see Screwdriver's issue 1339 for more discussions. Feel free to reach out at slack or submit github issues if you have any questions, thanks!