<p><a href="https://t.umblr.com/redirect?z=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fldong1%2F&t=MTNjMzZlOGIyOWQ3YjNjMjlhZDIzNDY4ODhjYzhiZmUzYWRlMjVkNSxiQlZHTms0dw%3D%3D&b=t%3AjoJeie323MzP-suSfk7unw&p=https%3A%2F%2Fblog.screwdriver.cd%2Fpost%2F186844366322%2Fartifacts-preview&m=1">Alan Dong</a>, Software Engineer, Verizon Media</p><p><a href="https://screwdriver.cd">Screwdriver</a> team is constantly evolving and building new features for its users. Today, we are announcing a nuanced feature: Build Parameters, aka Parameterized Builds, which enables users to have more control over build pipelines.</p><h2>Purpose</h2><p>The Build Parameters feature allows users to define a set of parameters on the pipeline level; users can customize runtime parameters either through using the UI or API to kickoff builds. This means users can now implement reactive behaviors based on the parameters passed in as well.</p><!-- more --><h2>Definition</h2><p>There are 2 ways of defining parameters, see</p><pre><code>paramters:
nameA: "value1"
nameB:
value: "value2"
description: "description of nameB"
</code></pre><p><b>Parameters</b> is a dictionary which expects <code>key:value</code> pairs.</p><pre><code>nameA: "value1"
</code></pre><p><code>key: string</code> is a shorthand for writting as <code>key: value</code></p><pre><code>nameA:
value: "value1"
description: ""
</code></pre><p>These two are identical with description to be an empty string.</p><h2>Example</h2><p>See <a href="https://cd.screwdriver.cd/pipelines/3449/events">Screwdriver pipeline</a></p><pre><code>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)"'
</code></pre><p>You can also preview the parameters that being used during a build in <code>Setup</code> -> <code>sd-setup-init</code> step</p><p>Pipeline Preview Screenshot:</p><figure data-orig-width="1389" data-orig-height="614" class="tmblr-full"><img src="https://66.media.tumblr.com/d427dc000fb3357a25a206afa254af4f/0ed827bd92d2c256-66/s540x810/2c966b5c0ab26610bf3c5396dd93a1a1aa0cae6c.png" alt="image" data-orig-width="1389" data-orig-height="614"/></figure><figure data-orig-width="1251" data-orig-height="595" class="tmblr-full"><img src="https://66.media.tumblr.com/bb3aa18847bb24050dc203b6866b42b3/0ed827bd92d2c256-b4/s540x810/09b1a60f9af92165e64addd36c87c60b6598cb0f.png" alt="image" data-orig-width="1251" data-orig-height="595"/></figure><figure data-orig-width="1399" data-orig-height="742" class="tmblr-full"><img src="https://66.media.tumblr.com/49c0bb43afdb541ea6481c7e0455bb4d/0ed827bd92d2c256-2d/s540x810/67737e9fe28e65627c7aeab0bbc0fb5055c50d4f.png" alt="image" data-orig-width="1399" data-orig-height="742"/></figure><h2>Compatibility List</h2><p>In order to use this feature, you will need these minimum versions:</p><ul><li><a href="https://github.com/screwdriver-cd/screwdriver/releases/tag/v0.5.780">API</a> - v0.5.780</li>
<li><a href="https://github.com/screwdriver-cd/ui/releases/tag/v1.0.466">UI</a> - v1.0.466</li>
</ul><h2>Contributors</h2><p>Thanks to the following contributors for making this feature possible:</p><ul><li><a href="https://t.umblr.com/redirect?z=https%3A%2F%2Fgithub.com%2Fadong&t=NTU5ZDUzOWU2ZmRlZjYxYzFiZGRjYTdmM2YxMDk0MDU2ZTk1NDVmMixiQlZHTms0dw%3D%3D&b=t%3AjoJeie323MzP-suSfk7unw&p=https%3A%2F%2Fblog.screwdriver.cd%2Fpost%2F186844366322%2Fartifacts-preview&m=1">adong</a></li>
</ul><p><b>Questions & Suggestions</b></p><p>We’d love to hear from you. If you have any questions, please feel free to reach out <a href="https://t.umblr.com/redirect?z=https%3A%2F%2Fdocs.screwdriver.cd%2Fabout%2Fsupport&t=NmJiNjk2YTgzOGU3MTMzMjIzNjE1MjNmZWQyNGE5NmUzMGFhYzgwZCxiQlZHTms0dw%3D%3D&b=t%3AjoJeie323MzP-suSfk7unw&p=https%3A%2F%2Fblog.screwdriver.cd%2Fpost%2F186844366322%2Fartifacts-preview&m=1">here</a>. You can also visit us on <a href="https://t.umblr.com/redirect?z=https%3A%2F%2Fgithub.com%2Fscrewdriver-cd&t=MjI1YzllNDlhZmZmOTJjMDhiZWVkMDY2ZTQ5ODU0NDdmN2VjYzhmNyxiQlZHTms0dw%3D%3D&b=t%3AjoJeie323MzP-suSfk7unw&p=https%3A%2F%2Fblog.screwdriver.cd%2Fpost%2F186844366322%2Fartifacts-preview&m=1">Github</a> and <a href="https://t.umblr.com/redirect?z=https%3A%2F%2Fslack.screwdriver.cd&t=YjA1NDIyZGM5N2RmZmMyOWQ1ZmQ5OWYyZGQ4NWI0ODBlZDRhYzZmOCxiQlZHTms0dw%3D%3D&b=t%3AjoJeie323MzP-suSfk7unw&p=https%3A%2F%2Fblog.screwdriver.cd%2Fpost%2F186844366322%2Fartifacts-preview&m=1">Slack</a>.</p>