Des Moines : devops strategy - Эдуард Кабринский

Всё подряд, без разбора, но про САМБО. Разбор завалов по ходу.
Ответить
IZRAELEa
m
m
Сообщения: 830
Зарегистрирован: 25 июл 2019, 19:18
Откуда: USA
Контактная информация:

Des Moines : devops strategy - Эдуард Кабринский

Сообщение IZRAELEa » 22 май 2021, 13:12

Эдуард Кабринский - Azure devops parameters - Eduard Kabrinskiy


<h1>Azure devops parameters</h1>
<p>[youtube]</p>
Azure devops parameters <a href="http://remmont.com">Latest news online</a> Azure devops parameters
<h1>Improve your Azure Pipelines with the new Runtime Parameters</h1>
<h2>Ditch variables. Parameters have finally arrived.</h2>
<p style="clear: both"><img src="https://miro.medium.com/fit/c/96/96/0*V ... pkaRT1.jpg" /></p>
<p>The Azure DevOps team has finally released Sprint 166. It?s a very small</strong> update but introduces a new neat feature that was way too long overdue.</p>
<p>Chances are high that you are familiar with some true madness like this:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*Nd6iLY ... ySQR-g.png" /></p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*U2-Won ... 7bbgBA.png" /></p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*ABn3qQ ... 8eC5FQ.png" /></p>
<p>It takes you three clicks to modify a single value for every single variable and for every run. Tedious and annoying.</p>
<h2>Runtime Parameters Enter the Game</h2>
<p>With this update, we?re adding runtime parameters. Runtime parameters let you have more control over what values can be passed to a pipeline. Unlike variables, runtime parameters have data types and don?t automatically become environment variables.</p></blockquote>
<p>This is a real godsent because we turn the screens above into something beautiful like this that will save you a lot of time:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*_3Fo8z ... jlel8w.png" /></p>
<p>Let me quickly show you how so you don?t need to dig through the DevOps documentation.</p>
<p>My previous Pipeline definition used to look like this at the beginning of the YAML file:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*Gzz-Lc ... T6qaMQ.png" /></p>
<p>And in the variables pane I had to set additional variables for them to show up in new pipeline run blade:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*1OwzLl ... sKdEZQ.png" /></p>
<p>Why do we need to set variables in two different places?</p>
<p>First of all, let?s get rid of the variables in the variable pane and the YAML file.</p>
<p>Afterward, include the parameters key that takes a list of parameters. Let?s replace the build configuration variable with this:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*53iXtc ... iBheMA.png" /></p>
<p>Parameters are very versatile and can be restrained to many types you?re already used to such as strings</em>, booleans</em>, numbers</em>, objects</em>, but also steps</em>, jobs,</em> and stages</em> from your pipeline definition. Wowzers.</p>
<p>A neat addition is that you can also set default values to it.</p>
<p>Moving on to the other variables, we can simply introduce two additional boolean</em> parameters that are simpler than the one before:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*VZuZu7 ... Lgjong.png" /></p>
<p>Easy peasy. Now let?s replace all current variable references</strong> to parameters.</p>
<p>For this, you can simply swap out $(variableName) or variables.variableName to $<<parameters.parameterName>>) .</p>
<p>It?s important to know that parameters are only available at template parsing time</strong> and must be surrounded by $<<>> .</p>
<p>There is a special declaration type for all condition: keys. These don?t work for parameters, so you will need to replace declarations like these</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*8xdWbE ... 1HnrUw.png" /></p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*N82EuC ... aKT-kw.png" /></p>
<p>Actually, I?m lying, you can make use of template variables and surround them with $<<>> like this:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*WltUU_ ... m1hCEg.png" /></p>
<p>But hear me out:</strong> This is probably something you are not used to and kinda feels weird at a first glance, but in the longterm, it helps you to organize and navigate to conditional steps in your definitions with ease because they are easier to spot than conditions and foremost they aren?t part of the parsed template and hence won?t show up in the jobs summary:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*5MIQYj ... 4jrK8w.png" /></p>
<p>Voil?. Now it?s time to save and commit your modifications and run your facelifted pipeline. You?ll be greeted with this handsome blade:</p>
<p style="clear: both"><img src="https://miro.medium.com/max/60/1*_3Fo8z ... jlel8w.png" /></p>
<p>And that?s how you could enhance your Azure DevOps Pipelines within 2 minutes. Worth it.</p>
<h2>Here are some possible use cases for you to try out</h2>
<ul>
<li>Pass a Docker image tag as a parameter</li>
<li>Select the environment you would like to deploy to</li>
<li>Determine whether or not you would like to run integration tests</li>
<li>Set the version of your assembly/library/whatever</li>
<li>Pass your current mood as parameter and print with echo so your mates know how you are doing because why not</li>
</ul>
<p>Cheers and have fun. Feel free to follow my profile for future posts.</p>
<h2>Azure devops parameters</h2>

<h3>Azure devops parameters</h3>
<p>[youtube]</p>
Azure devops parameters <a href="http://remmont.com">Top stories</a> Azure devops parameters
<h4>Azure devops parameters</h4>
Ditch variables. Parameters have finally arrived and can improve your Pipeline definitions by a huge margin.
<h5>Azure devops parameters</h5>
Azure devops parameters <a href="http://remmont.com">Azure devops parameters</a> Azure devops parameters
SOURCE: <h6>Azure devops parameters</h6> <a href="https://dev-ops.engineer/">Azure devops parameters</a> Azure devops parameters
#tags#[replace: -,-Azure devops parameters] Azure devops parameters#tags#

Kabrinskiy Eduard
local news
Arguments: all bank credit card offers
Fresh News.

Ответить

Вернуться в «Общие вопросы | General questions»