<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Armory Docs – Pipelines-as-Code</title><link>/plugins/pipelines-as-code/</link><description>Recent content in Pipelines-as-Code on Armory Docs</description><generator>Hugo -- gohugo.io</generator><atom:link href="/plugins/pipelines-as-code/index.xml" rel="self" type="application/rss+xml"/><item><title>Plugins: Get Started with Pipelines-as-Code</title><link>/plugins/pipelines-as-code/install/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/pipelines-as-code/install/</guid><description/></item><item><title>Plugins: Architecture of Pipelines-as-Code for Spinnaker and Armory Continuous Deployment</title><link>/plugins/pipelines-as-code/architecture/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/pipelines-as-code/architecture/</guid><description>
&lt;h2 id="components">Components&lt;/h2>
&lt;p>The Pipelines-as-Code feature has the following components:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>&lt;em>Dinghy&lt;/em> Service:&lt;/p>
&lt;ul>
&lt;li>Keeps your repo pipeline definitions in sync with the corresponding pipelines in Spinnaker&lt;/li>
&lt;li>Communicates with repos over SSL or TLS&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Spinnaker Plugin: extends Gate and Echo by adding endpoints that the Dinghy service uses&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h2 id="database">Database&lt;/h2>
&lt;p>Dinghy works out-of-the-box with in-cluster Redis. You can configure Pipelines-as-Code to use an external Redis or a MySQL database.&lt;/p>
&lt;h2 id="how-pipelines-as-code-works">How Pipelines-as-Code works&lt;/h2>
&lt;pre class="mermaid">sequenceDiagram
actor User
participant Repo
participant Dinghy Service
participant Spinnaker Plugin
User-&amp;gt;&amp;gt;Repo: update pipeline template
Repo-&amp;gt;&amp;gt;Dinghy Service: send notification
Dinghy Service-&amp;gt;&amp;gt;Repo: fetch updated .dinghyfile
Dinghy Service-&amp;gt;&amp;gt;Spinnaker Plugin: update pipeline&lt;/pre>
&lt;br>
&lt;ol>
&lt;li>Your repo sends webhooks when you modify either the Templates or the Module definitions.&lt;/li>
&lt;li>The Pipelines-as-Code service looks for and fetches all dependent modules and parses the template. Then the service updates the pipelines in Spinnaker.&lt;/li>
&lt;li>The pipelines are automatically updated whenever a module that is used by a pipeline is updated in the version control system. This is done by maintaining a dependency graph. The Pipelines-as-Code service looks for a &lt;code>dinghyfile&lt;/code> in all directories, not just the root path. The only exception is when you have modules in a local setting. In this case, you must update the &lt;code>dinghyfile&lt;/code> in order to pull new updates from modules it is using.&lt;/li>
&lt;li>Dinghy processes changes found in a specific branch. By default, this branch is &lt;code>master&lt;/code>. If you are using a repo that uses a different branch for the base branch, an administrator must configure the service to track that branch. For more information, see &lt;a href="/plugins/pipelines-as-code/install/configure/#custom-branches">Custom branches&lt;/a>.&lt;/li>
&lt;/ol></description></item><item><title>Plugins: Use Pipelines-as-Code in Armory Continuous Deployment</title><link>/plugins/pipelines-as-code/use/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/pipelines-as-code/use/</guid><description>
&lt;h2 id="intended-workflow">Intended workflow&lt;/h2>
&lt;p>The Pipelines-as-Code feature is intended to make it much faster and easier
for developers to get a brand new application up and running. The general
workflow for new projects is:&lt;/p>
&lt;ol>
&lt;li>Developer creates a new project in source control&lt;/li>
&lt;li>They create a Dinghyfile to build the application and pipelines in Spinnaker (even easier if there is a Module Repo set up with a templatized set of pipelines)&lt;/li>
&lt;li>When the code is committed to the branch that the Dinghy service tracks, Armory picks up the Dinghyfile, renders it, and applies it to Spinnaker, creating the application and the pipelines.&lt;/li>
&lt;/ol>
&lt;p>Job done! If everything&amp;rsquo;s been configured properly, your developers should
be able to deploy their code using a previously-proven pipeline model
without ever having had to go into Spinnaker to configure anything.&lt;/p>
&lt;p>As an added bonus, the pipeline definitions have now been saved in source
control, along with the rest of the project&amp;rsquo;s files. If changes are made
to the Dinghyfile, when committed/merged into the tracked branch, Spinnaker automatically updates the
pipelines.&lt;/p>
&lt;h2 id="basic-format">Basic format&lt;/h2>
&lt;p>A &lt;code>Dinghyfile&lt;/code> is a JSON (or HCL or YAML, &lt;a href="#alternate-template-formats">see
below&lt;/a>) dictionary that wraps a
few top-level elements to instruct Dinghy where to create/update the
pipelines that are being defined. This outer layer identifies the
application that the pipelines should live in. Dinghy creates
the application if it doesn&amp;rsquo;t already exist. You can also provide
settings for the application within this file as well. Finally, the
&lt;code>pipelines&lt;/code> key is an array of pipeline definitions that will be
created/updated in that application.&lt;/p>
&lt;p>Here is an example Dinghyfile:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;helloworldapp&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;save_app_on_update&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;spec&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;appmetadata&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;dataSources&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;enabled&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;securityGroups&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;loadBalancers&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;executions&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;serverGroups&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;disabled&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;canaryConfigs&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;cloudProviders&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;kubernetes&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;aws&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;customBanners&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;backgroundColor&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;var(--color-alert)&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;enabled&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;text&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Your custom banner text&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;textColor&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;var(--color-text-on-dark)&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;helloworldapp&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;my-pipeline-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;one&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Make sure you specify the following fields so that the Dinghyfile can create a pipeline with stages:&lt;/p>
&lt;ul>
&lt;li>&lt;code>.application&lt;/code>: The name of the application where pipelines will be created or updated. If the application does not exist, it will be created.&lt;/li>
&lt;li>&lt;code>.globals&lt;/code>: Configuration used to define top-level variables. See &lt;a href="#top-level-variables">top-level variables&lt;/a> for more information.&lt;/li>
&lt;li>&lt;code>.globals.save_app_on_update&lt;/code>: Flag that allows updates to application properties. See &lt;a href="#application-updates">Application updates&lt;/a> for more information.&lt;/li>
&lt;li>&lt;code>.appmetadata&lt;/code>: Key/value pairs where you can define application metadata, such as whether Canary analysis is enabled. You can retrieve a list of potential configs by opening the developer console for your browser when viewing the &lt;strong>Config&lt;/strong> page of an application. Look for the possible parameters under the &lt;code>spinnaker.application.attributes&lt;/code> key. Note that no validation is done for this field.&lt;/li>
&lt;li>&lt;code>.appmetadata.dataSources.enabled&lt;/code>: An array of features that will be displayed on Armory Continuous Deployment.&lt;/li>
&lt;li>&lt;code>.appmetadata.dataSources.disabled&lt;/code>: An array of features that will not be displayed on Armory Continuous Deployment.&lt;/li>
&lt;li>&lt;code>.appmetadata.customBanners[*]&lt;/code>: An array of banners that will be displayed on Armory Continuous Deployment. Must only have one item checked as enabled.&lt;/li>
&lt;li>&lt;code>.appmetadata.cloudProviders[*]&lt;/code>: An array of cloud providers for the application.&lt;/li>
&lt;li>&lt;code>.pipelines&lt;/code>: An array of pipelines; each item defines a pipeline within the pipeline. You can have zero, one, or more pipelines in a Dinghyfile.&lt;/li>
&lt;li>&lt;code>.pipelines[*].application&lt;/code>: The name of the application where pipelines will be created or updated. It must match the top-level &lt;code>.application&lt;/code> field.&lt;/li>
&lt;li>&lt;code>.pipelines[*].name&lt;/code>: The name of the pipeline.&lt;/li>
&lt;li>&lt;code>.pipelines[*].stages&lt;/code>: An array of stages that make up the pipeline.&lt;/li>
&lt;/ul>
&lt;h3 id="stage-fields">Stage fields&lt;/h3>
&lt;p>Each pipeline should have a field called &lt;code>stages&lt;/code>, which is an array of the definitions of the stages that make up the pipeline. Each stage definition should have these fields:&lt;/p>
&lt;ul>
&lt;li>&lt;code>name&lt;/code> (&lt;em>string&lt;/em>): The name of the stage. This can be any string.&lt;/li>
&lt;li>&lt;code>type&lt;/code> (&lt;em>string&lt;/em>): The type of the stage. Must match a stage type; the types available depend on Armory Continuous Deployment&amp;rsquo;s configuration. For example, AWS stages can only be used if the AWS provider is enabled.&lt;/li>
&lt;li>&lt;code>refId&lt;/code> (&lt;em>string&lt;/em>): A locally unique string that identifies the stage. It is often (but not necessarily) numerical.&lt;/li>
&lt;li>&lt;code>requisiteStageRefIds&lt;/code> (&lt;em>array of strings&lt;/em>): The list of stages that must complete before this stage runs, referenced by their &lt;code>refId&lt;/code>. See the &lt;a href="#stage-dependency-graph">Stage Dependency Graph&lt;/a> section for details.&lt;/li>
&lt;/ul>
&lt;p>In addition to the above, this is a non-exhaustive list of fields supported on all stage types:&lt;/p>
&lt;ul>
&lt;li>&lt;code>stageEnabled&lt;/code> (&lt;em>string&lt;/em>): Spring Expression Language expression; if this is set, the stage will only continue if this expression evaluates to non-false.&lt;/li>
&lt;li>&lt;code>comments&lt;/code> (&lt;em>string&lt;/em>): Comments for the stage, which are visible when viewing the state of the stage.&lt;/li>
&lt;li>&lt;code>sendNotifications&lt;/code> (&lt;em>boolean&lt;/em>): Whether to notify on the notifications configurations. Used in conjunction with the &lt;code>notifications&lt;/code> field.&lt;/li>
&lt;li>&lt;code>notifications&lt;/code> (&lt;em>array&lt;/em>): An array of notification settings, to be used to notify on stage conditions. Used in conjunction with the &lt;code>sendNotifications&lt;/code> array.&lt;/li>
&lt;li>&lt;code>completeOtherBranchesThenFail&lt;/code> (&lt;em>boolean&lt;/em>): If set to true, the following happens when the stage fails: other branches will be allowed to complete, but the pipeline as a whole fails.&lt;/li>
&lt;li>&lt;code>continuePipeline&lt;/code> (&lt;em>boolean&lt;/em>): If set to true, continue the current branch of the pipeline even if the stage fails.&lt;/li>
&lt;li>&lt;code>failPipeline&lt;/code> (&lt;em>boolean&lt;/em>): If set to true, fail the whole pipeline immediately if the stage fails.&lt;/li>
&lt;li>&lt;code>failOnFailedExpressions&lt;/code> (&lt;em>boolean&lt;/em>): If set to true, fail the stage if it contains invalid Spring Expression Language.&lt;/li>
&lt;li>&lt;code>restrictExecutionDuringTimeWindow&lt;/code> (&lt;em>boolean&lt;/em>): If set to true, only run the stage during whitelisted execution windows (indicated in the &lt;code>restrictedExecutionWindow&lt;/code> object).&lt;/li>
&lt;li>&lt;code>restrictedExecutionWindow&lt;/code> (&lt;em>object&lt;/em>): A set of fields used to control when the stage is allowed to run. By default, stages are unrestricted. Used in conjunction with &lt;code>restrictExecutionDuringTimeWindow&lt;/code>.&lt;/li>
&lt;/ul>
&lt;p>Additionally, each stage type supports one or more stage-specific fields. For example, the &lt;code>wait&lt;/code> stage type has an integer field called &lt;code>waitTime&lt;/code>, which is the number of seconds the stage will wait.&lt;/p>
&lt;p>Additional stage fields can be identified by configuring the stage through the UI and examining the Stage JSON that gets generated.&lt;/p>
&lt;h3 id="stage-dependency-graph">Stage dependency graph&lt;/h3>
&lt;p>While a JSON array is an ordered list, the order of the stages in your pipeline&amp;rsquo;s &lt;code>stages&lt;/code> array isn&amp;rsquo;t used for stage order. Instead, Spinnaker stages each have a &lt;code>refId&lt;/code>, a unique string within the pipeline that identifies the stage and an array of stages that the stage depends on. Note that &lt;code>refId&lt;/code> is often a numerical value but does not need to be one. For example, this is a four-stage pipeline:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;helloworld&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;helloworld&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;my-pipeline-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;one&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">10&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;first-stage&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;two-a&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">15&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;my-second-stage&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;first-stage&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;two-b&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">30&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;my-other-second-stage&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;first-stage&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;last&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">20&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;my-final-stage&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;my-second-stage&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;my-other-second-stage&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The above Dinghyfile defines a single pipeline with four stages. Here is how the pipeline behaves:&lt;/p>
&lt;ul>
&lt;li>The stage called &lt;code>one&lt;/code> (with &lt;code>refId&lt;/code> &lt;code>first-stage&lt;/code> and no &lt;code>requisiteStageRefIds&lt;/code>), runs first. It will take 10 seconds to complete.&lt;/li>
&lt;li>Once the stage &amp;ldquo;one&amp;rdquo; is complete, stages &amp;ldquo;two-a&amp;rdquo; and &amp;ldquo;two-b&amp;rdquo; start in parallel because they both have &lt;code>first-stage&lt;/code> as a requisite stage. This means they both depend on &lt;code>first-stage&lt;/code> completing.&lt;/li>
&lt;li>Stage &lt;code>two-a&lt;/code> will complete in fifteen seconds.&lt;/li>
&lt;li>Stage &lt;code>two-b&lt;/code>, which started at the same, will complete in thirty seconds (fifteen seconds after stage &amp;ldquo;two-a&amp;rdquo; completes).&lt;/li>
&lt;li>Stage &lt;code>last&lt;/code>, which depends on both &lt;code>two-a&lt;/code> and &lt;code>two-b&lt;/code> (identified by their &lt;code>refIds&lt;/code> of &lt;code>my-second-stage&lt;/code> and &lt;code>my-other-second-stage&lt;/code>), starts once both stage &lt;code>two-a&lt;/code> and &lt;code>two-b&lt;/code> are complete.&lt;/li>
&lt;/ul>
&lt;h4 id="application-permissions">Application permissions&lt;/h4>
&lt;p>You can define in the &lt;code>spec&lt;/code> block the permissions to set on the application.
The items in the &lt;code>spec&lt;/code> field only apply if they are defined for a new
Spinnaker application. One note of caution here, if you set the WRITE
permissions to a group that the Dinghy service is NOT part of, Dinghy will not
be able to update anything within that application. Pipelines will not get created
or updated.&lt;/p>
&lt;p>Here&amp;rsquo;s an example Dinghyfile that has no pipelines but creates an application named &lt;code>mynewapp&lt;/code> along with a few options:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;mynewapp&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;spec&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;permissions&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;READ&amp;#34;&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;myproductteam&amp;#34;&lt;/span>, &lt;span style="color:#f1fa8c">&amp;#34;mysalesteam&amp;#34;&lt;/span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;EXECUTE&amp;#34;&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;mydevteam&amp;#34;&lt;/span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;WRITE&amp;#34;&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;mydevopsteam&amp;#34;&lt;/span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that only the &lt;code>application&lt;/code> and &lt;code>pipelines&lt;/code> keys are required; everything else is optional.&lt;/p>
&lt;h2 id="primitives">Primitives&lt;/h2>
&lt;ul>
&lt;li>&lt;strong>Modules&lt;/strong>: These are templates that define a Stage/Task in the pipeline. They are kept in a single GitHub repo that is configurable when the dinghy service starts. eg:&lt;/li>
&lt;/ul>
&lt;figure>
&lt;img src="/images/dinghy-template-repo.png"/>
&lt;/figure>
&lt;p>They are JSON files with replacable values in them. e.g., a module that defines a wait stage in a pipeline might look like:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">42&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>&lt;strong>Pipeline definitions&lt;/strong>: These define a pipeline for an application in a file called &lt;code>dinghyfile&lt;/code>. The &lt;code>dinghyfile&lt;/code> usually resides at the root level of the application repo. eg:&lt;/li>
&lt;/ul>
&lt;figure>
&lt;img src="/images/dinghyfile.png"/>
&lt;/figure>
&lt;p>You can compose stage/task templates to make a full definition. e.g., a Pipeline definition that has a single wait stage might look like:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;keepWaitingPipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;limitConcurrent&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;triggers&amp;#34;&lt;/span>: []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="template-variables-and-substitution">Template variables and substitution&lt;/h2>
&lt;p>Pipeline definitions can include Modules defined in another GitHub Repo. e.g.:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;keepWaitingPipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;limitConcurrent&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;wait.stage.module&amp;#34;&lt;/span> }} &lt;span style="color:#6272a4">// Module created in dinghy-templates repo
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4">&lt;/span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;triggers&amp;#34;&lt;/span>: []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that modules can be stored on a subfolder of your repository. To reference these modules, add a snippet like the following:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{{ module &lt;span style="color:#ff79c6">&amp;#34;my/path/to/module/wait.stage.module&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;blockquote>
&lt;p>Using the path &amp;ldquo;/my/path/to/module/wait.stage.module&amp;rdquo; with a leading slash (&lt;code>/&lt;/code>)is not supported in Armory 2.19.8 and earlier.&lt;/p>
&lt;/blockquote>
&lt;p>The &lt;code>{{ module &amp;quot;wait.stage.module&amp;quot; }}&lt;/code> takes the wait.stage.module file inside the dinghy-templates repo, and includes it in the current template. Note that modules are simply text inserted into the JSON they are referenced by; if you wanted to add another stage after the module in the example above, you would need to add the comma after the substitution so the resulting JSON was correct.&lt;/p>
&lt;p>We can also pass variables to our modules like so:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;keepWaitingPipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;limitConcurrent&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;wait.stage.module&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span> &lt;span style="color:#bd93f9">200&lt;/span> }} &lt;span style="color:#6272a4">// Pass the &amp;#34;waitTime&amp;#34; variable with value 200 to wait.stage.module
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4">&lt;/span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;triggers&amp;#34;&lt;/span>: []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Any number of variables can be passed to a module by simply specifying them as arguments, e.g.: {{ module &amp;ldquo;wait.stage.module&amp;rdquo; &amp;ldquo;waitTime&amp;rdquo; 100 &amp;ldquo;name&amp;rdquo; &amp;ldquo;simpleWait&amp;rdquo; }}`.&lt;/p>
&lt;p>Inside wait.stage.module, we can then include these variables inline:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>name&lt;span style="color:#f1fa8c">&amp;#34; ?: &amp;#34;&lt;/span>defaultname&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: {{ var &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span> ?: &lt;span style="color:#bd93f9">10&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The &lt;code>{{ var }}&lt;/code> function is used to access variables passed to the &lt;code>{{ module }}&lt;/code> call.
The first parameter is the variable name: &lt;code>{{ var &amp;quot;waitName&amp;quot; }}&lt;/code>
Optionally, you can include a default parameter: &lt;code>{{ var &amp;quot;waitName&amp;quot; ?: &amp;quot;defaultValue&amp;quot; }}&lt;/code>.&lt;/p>
&lt;p>Let us create a more realistic pipeline using templates. One that would look like this:&lt;/p>
&lt;figure>
&lt;img src="/images/Screen-Shot-2018-03-12-at-11.18.38-AM.png"/>
&lt;/figure>
&lt;p>You would use the following JSON to create such. Note that any of the stages could have come from an imported module, but we show the full JSON here for readability:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;keepWaitingPipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;limitConcurrent&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;step1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;continuePipeline&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;failPipeline&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;job&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;armory/job/armory-hello-deploy/job/master&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;master&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Armory Jenkins&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Jenkins&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;parameters&amp;#34;&lt;/span>: {},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;105&amp;#34;&lt;/span>, &lt;span style="color:#6272a4">// a unique id that&amp;#39;s unique between pipelines.stages[*].refId
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4">&lt;/span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;jenkins&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;baseLabel&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;release&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;baseOs&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;ubuntu&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;cloudProviderType&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;aws&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;extendedAttributes&amp;#34;&lt;/span>: {},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;bake in eu-central-1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;package&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;myapp_1.27-h343&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;101&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;regions&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;eu-central-1&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;105&amp;#34;&lt;/span> &lt;span style="color:#6272a4">// this means: stage &amp;#34;105&amp;#34; comes before this stage
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4">&lt;/span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;storeType&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;ebs&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;bake&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;user&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;LeSandeep&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;vmType&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;hvm&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;failPipeline&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;run tests&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;102&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;101&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;script&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;user&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;LeSandeep&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitForCompletion&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;canary&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;103&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;101&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module deploy.stage.module &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span> [&lt;span style="color:#f1fa8c">&amp;#34;102&amp;#34;&lt;/span>, &lt;span style="color:#f1fa8c">&amp;#34;103&amp;#34;&lt;/span>] }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;triggers&amp;#34;&lt;/span>: []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The file &lt;code>deploy.stage.module&lt;/code> would look like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;clusters&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;deploy to stage&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;104&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: {{ var &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span> ?: [] }},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;deploy&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="multiple-level-inheritance">Multiple level inheritance&lt;/h2>
&lt;p>In the below example, we show a pipeline that is created with multiple levels of module inheritance. The application&amp;rsquo;s dinghyfile looks like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;dinghytest&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;simple.pipeline.module&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;application&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;dinghytest&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The dinghyfile inherits its pipeline from a &lt;em>module&lt;/em> named &lt;code>simple.pipeline.module&lt;/code> that looks as shown below. Note that it also overrides the application name in the module to avoid conflict.&lt;/p>
&lt;blockquote>
&lt;p>It is worth noting in the below example, where we are substituting a string variable, the call to &lt;code>{{ var ... }}&lt;/code> is also surrounded by quotes, unlike when substituting non-string variables (ie, int, array, json&amp;hellip;)&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>application&lt;span style="color:#f1fa8c">&amp;#34; ?: &amp;#34;&lt;/span>yourspinnakerapplicationname&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;keepWaitingPipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;limitConcurrent&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;wait.stage.module&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span> &lt;span style="color:#bd93f9">200&lt;/span> }},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;deploy.stage.module&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span> [&lt;span style="color:#f1fa8c">&amp;#34;1&amp;#34;&lt;/span>] }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;triggers&amp;#34;&lt;/span>: []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This module inherits two stages and overrides variables within them. The &lt;code>wait.stage.module&lt;/code> is same as the one shown above. The &lt;code>deploy.stage.module&lt;/code> looks like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;clusters&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;deploy to stage&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;104&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: {{ var &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span> ?: [] }},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;deploy&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note how the &lt;code>requisiteStageRefIds&lt;/code> is overwritten while calling the module so that the deploy stage &lt;em>depends on&lt;/em> the wait stage. This pipeline would look like this in the spinnaker UI:&lt;/p>
&lt;figure>
&lt;img src="/images/Screen_Shot_2018-03-26_at_5_06_25_PM.png"/>
&lt;/figure>
&lt;h2 id="local-module-functionality">Local module functionality&lt;/h2>
&lt;p>Depending on how long your &lt;code>dinghyfiles&lt;/code> are, consider using a local module instead of a module.&lt;/p>
&lt;p>Local modules behave exactly the same as modules but with a couple differences:&lt;/p>
&lt;ol>
&lt;li>The location of the file. A module needs to exist in the configured template repository. A local module does not. Instead, the local module file needs to be inside the repository that you used to make the push. Given the following scenario:&lt;/li>
&lt;li>An end user must update the &lt;code>dinghyfile&lt;/code> in order to pull new updates from modules it is using.&lt;/li>
&lt;/ol>
&lt;p>&lt;code>my_repository&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├── dinghyfile
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>└── local_modules
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>    └── stage.minimal.wait.localmodule
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>template_repository&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>└── stage.minimal.wait.module
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Inside the &lt;code>dinghyfile&lt;/code>, &lt;code>stage.minimal.wait.localmodule&lt;/code> and &lt;code>stage.minimal.wait.module&lt;/code> you can see this.&lt;/p>
&lt;p>&lt;code>dinghyfile&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodules&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;42&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitname&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodule default-name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodules&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ local_module &lt;span style="color:#ff79c6">&amp;#34;/local_modules/stage.minimal.wait.localmodule&amp;#34;&lt;/span> }},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ local_module &lt;span style="color:#ff79c6">&amp;#34;/local_modules/stage.minimal.wait.localmodule&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;waitname&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;localmodule overwrite-name&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;100&amp;#34;&lt;/span> }},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;stage.minimal.wait.module&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;waitname&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;global module overwrite-name&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;100&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>stage.minimal.wait.localmodule&lt;/code> and &lt;code>stage.minimal.wait.module&lt;/code> have the same content:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>waitname&lt;span style="color:#f1fa8c">&amp;#34; ?: &amp;#34;&lt;/span>Local Module Wait&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>waitTime&lt;span style="color:#f1fa8c">&amp;#34; ?: 10 }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The rendered file looks like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodules&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;42&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitname&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodule default-name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodules&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodule default-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;42&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodule overwrite-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;100&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;global module overwrite-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;100&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that you can use both local modules and modules in one &lt;code>dinghyfile&lt;/code>.&lt;/p>
&lt;h3 id="using-local-modules-and-modules">Using local modules and modules&lt;/h3>
&lt;p>As shown in the previous example, you can use a local module and module without any issues from any &lt;code>dinghyfile&lt;/code>. The rendering functionality is implemented in the Armory CLI tool, so you can validate your &lt;code>dinghyfiles&lt;/code> with local module.&lt;/p>
&lt;h3 id="local-modules-limitations">Local modules limitations&lt;/h3>
&lt;p>You can reference module and local_module from any local module. However, you cannot call a local_module from a module. Given this scenario:&lt;/p>
&lt;p>&lt;code>my_repository&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├── dinghyfile
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>└── local_modules
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>    └── stage.minimal.wait.localmodule
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>template_repository&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>└── stage.minimal.wait.module
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>And inside the &lt;code>dinghyfile&lt;/code>, &lt;code>stage.minimal.wait.localmodule&lt;/code> and &lt;code>stage.minimal.wait.module&lt;/code> you can see this.&lt;/p>
&lt;p>&lt;code>dinghyfile&lt;/code>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodules&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;42&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitname&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodule default-name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;localmodules&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;stage.minimal.wait.module&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>stage.minimal.wait.module&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>waitname&lt;span style="color:#f1fa8c">&amp;#34; ?: &amp;#34;&lt;/span>Local Module Wait&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>waitTime&lt;span style="color:#f1fa8c">&amp;#34; ?: 10 }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{{ local_module &lt;span style="color:#ff79c6">&amp;#34;/local_modules/stage.minimal.wait.localmodule&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When the Pipelines-as-Code service (Dinghy) sees that there&amp;rsquo;s a local module being sent inside a module, it throws the following error message: &lt;code>calling local_module from a module is not allowed&lt;/code>. For the given example scenario, the following error occurs:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-v" data-lang="v">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#50fa7b">Parsing&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">dinghyfile&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">failed&lt;/span>: &lt;span style="color:#8be9fd;font-style:italic">template&lt;/span>: &lt;span style="color:#8be9fd;font-style:italic">dinghy&lt;/span>&lt;span style="color:#ff79c6">-&lt;/span>&lt;span style="color:#8be9fd;font-style:italic">render&lt;/span>:&lt;span style="color:#bd93f9">12&lt;/span>:&lt;span style="color:#bd93f9">11&lt;/span>: &lt;span style="color:#8be9fd;font-style:italic">executing&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;dinghy-render&amp;#34;&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">at&lt;/span> &amp;lt;&lt;span style="color:#ff79c6">module&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;stage.minimal.wait.module&amp;#34;&lt;/span>&amp;gt;: &lt;span style="color:#8be9fd">error&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">calling&lt;/span> &lt;span style="color:#ff79c6">module&lt;/span>: &lt;span style="color:#8be9fd">error&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">rendering&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">imported&lt;/span> &lt;span style="color:#ff79c6">module&lt;/span> &lt;span style="color:#f1fa8c">&amp;#39;stage.minimal.wait.module&amp;#39;&lt;/span>: &lt;span style="color:#8be9fd;font-style:italic">template&lt;/span>: &lt;span style="color:#8be9fd;font-style:italic">dinghy&lt;/span>&lt;span style="color:#ff79c6">-&lt;/span>&lt;span style="color:#8be9fd;font-style:italic">render&lt;/span>:&lt;span style="color:#bd93f9">6&lt;/span>:&lt;span style="color:#bd93f9">3&lt;/span>: &lt;span style="color:#8be9fd;font-style:italic">executing&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;dinghy-render&amp;#34;&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">at&lt;/span> &amp;lt;&lt;span style="color:#8be9fd;font-style:italic">local_module&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;/local_modules/stage.minimal.wait.localmodule&amp;#34;&lt;/span>&amp;gt;: &lt;span style="color:#8be9fd">error&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">calling&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">local_module&lt;/span>: &lt;span style="color:#ff79c6">/&lt;/span>&lt;span style="color:#8be9fd;font-style:italic">local_modules&lt;/span>&lt;span style="color:#ff79c6">/&lt;/span>&lt;span style="color:#8be9fd;font-style:italic">stage&lt;/span>.&lt;span style="color:#8be9fd;font-style:italic">minimal&lt;/span>.&lt;span style="color:#8be9fd;font-style:italic">wait&lt;/span>.&lt;span style="color:#8be9fd;font-style:italic">localmodule&lt;/span> &lt;span style="color:#ff79c6">is&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">a&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">local_module&lt;/span>, &lt;span style="color:#8be9fd;font-style:italic">calling&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">local_module&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">from&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">a&lt;/span> &lt;span style="color:#ff79c6">module&lt;/span> &lt;span style="color:#ff79c6">is&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">not&lt;/span> &lt;span style="color:#8be9fd;font-style:italic">allowed&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="deleting-stale-pipelines">Deleting stale pipelines&lt;/h2>
&lt;p>If you want any pipelines in the spinnaker application that are not part of the &lt;code>dinghyfile&lt;/code> to be deleted automatically when the &lt;code>dinghyfile&lt;/code> is updated, then you can set &lt;code>deleteStalePipelines&lt;/code> to &lt;code>true&lt;/code> in the JSON like so:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;deleteStalePipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="triggering-other-pipelines-with-a-stage">Triggering other pipelines with a stage&lt;/h2>
&lt;p>The spinnaker &lt;code>pipeline&lt;/code> stage allows you to trigger other pipelines. However, typically you need the UUID of the pipeline to be triggered. To make it easier to write dinghy templates, we have a &lt;code>pipelineID&lt;/code> function which can be used in dinghyfiles to trigger pipelines. Consider the below example (&lt;code>pipeline.stage.module&lt;/code>):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;pipelineidexample&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;failPipeline&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Pipeline&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipeline&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ pipelineID &amp;#34;&lt;/span>default-app&lt;span style="color:#f1fa8c">&amp;#34; &amp;#34;&lt;/span>default-pipeline&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;pipeline&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitForCompletion&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example, we are triggering a pipeline by the name &lt;code>default-pipeline&lt;/code> under &lt;code>default-app&lt;/code> spinnaker application. The app name and the pipeline name can be overwritten when calling this module. At any higher level, simply pass in &lt;code>&amp;quot;triggerApp&amp;quot;&lt;/code> and &lt;code>&amp;quot;triggerPipeline&amp;quot;&lt;/code> like so: &lt;code>{{ module &amp;quot;pipeline.stage.module&amp;quot; &amp;quot;triggerApp&amp;quot; &amp;quot;pipelineidtest&amp;quot; &amp;quot;triggerPipeline&amp;quot; &amp;quot;testpipelinename&amp;quot; }}&lt;/code>&lt;/p>
&lt;h2 id="advanced-features">Advanced features&lt;/h2>
&lt;h3 id="monorepo">Monorepo&lt;/h3>
&lt;p>Dinghy supports multiple spinnaker applications under the same git repo. eg:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>monorepo/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>├── app1
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>│   ├── bin
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>│   ├── lib
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>│   ├── pkg
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>│   └── src
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>│   ├── app1.go
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>│   └── dinghyfile
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>└── app2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ├── bin
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ├── lib
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ├── pkg
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> └── src
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ├── app2.go
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> └── dinghyfile
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Notice both &lt;code>app1&lt;/code> and &lt;code>app2&lt;/code> are under the same repo, each app has its own &lt;code>dinghyfile&lt;/code> and its own spinnaker application that can be referenced in the &lt;code>dinghyfile&lt;/code>.&lt;/p>
&lt;h3 id="template-validation">Template validation&lt;/h3>
&lt;p>If, while rendering a &lt;code>dinghyfile&lt;/code>, a malformed JSON file is encountered, the logs should indicate the line number and the column number of the error. The &lt;code>arm cli&lt;/code> can be used to validate &lt;code>dinghyfile&lt;/code>s and &lt;code>module&lt;/code>s locally without having to put them in source control.&lt;/p>
&lt;p>Armory CLI: &lt;a href="https://github.com/armory-io/arm">https://github.com/armory-io/arm&lt;/a>&lt;/p>
&lt;h3 id="newlines">Newlines&lt;/h3>
&lt;p>For ease of readablilty, you can split a single call to &lt;code>module&lt;/code> across multiple lines. For example, the following two &lt;code>dinghyfile&lt;/code>s are both valid &amp;amp; produce identical pipelines in Spinnaker:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;wait.stage.module&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;wait-for-cache-warm-up&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span> &lt;span style="color:#bd93f9">42&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> module &lt;span style="color:#ff79c6">&amp;#34;wait.stage.module&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;wait-for-cache-warm-up&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span> &lt;span style="color:#bd93f9">42&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="top-level-variables">Top-level variables&lt;/h3>
&lt;p>When passing in variables to modules, you have the option of defining variables at the top-level &lt;code>dinghyfile&lt;/code> like so:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;42&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;default-name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;wait.stage.module&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the above example, the variables &lt;code>waitTime&lt;/code> and &lt;code>name&lt;/code> (used inside &lt;code>wait.stage.module&lt;/code>) are defined at the top level, and not explicitly defined when the call to &lt;code>wait.stage.module&lt;/code> is made.&lt;/p>
&lt;p>Note that top-level variables are overwritten by variables in the call to module if both are present. For instance, in the below example, the &lt;code>waitTime&lt;/code> after the &lt;code>dinghyfile&lt;/code> is rendered would be &lt;code>43&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;42&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;default-name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;yourspinnakerapplicationname&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;wait.stage.module&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;43&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="nested-variables">Nested variables&lt;/h3>
&lt;p>Another neat little trick with variables is support for nested variables. Consider the following variable usage in a module:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>name&lt;span style="color:#f1fa8c">&amp;#34; ?: &amp;#34;&lt;/span>some-name&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Here, if the variable &lt;code>&amp;quot;name&amp;quot;&lt;/code> was passed in, or is a top-level variable in the &lt;code>dinghyfile&lt;/code>, then use that value, or else &lt;em>default to&lt;/em> &lt;code>some-name&lt;/code>.&lt;/p>
&lt;p>With nested variables, instead of using a hardcoded default value, the default can come from another variable. eg:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>name&lt;span style="color:#f1fa8c">&amp;#34; ?: &amp;#34;&lt;/span>@different_var&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Here, if the variable &lt;code>&amp;quot;name&amp;quot;&lt;/code> was not passed into the module call and is not a top-level variable in the &lt;code>dinghyfile&lt;/code>, its value will come from a variable called &lt;code>&amp;quot;different_var&amp;quot;&lt;/code> that is either a top-level variable or another variable passed in when the module is called. Note the &lt;code>@&lt;/code> syntax for the nested variable. The &lt;code>@&lt;/code> symbol is only used where the variable is used, not when it is passed in.
le&lt;/p>
&lt;h3 id="create-a-dinghyfile-from-an-existing-pipeline">Create a dinghyfile from an existing pipeline&lt;/h3>
&lt;p>If you have already created a pipeline in the Spinnaker UI, you can create a dinghy file with some simple steps.&lt;/p>
&lt;ol>
&lt;li>
&lt;p>You need to go to the Spinnaker UI and click on the &lt;code>Configure&lt;/code> option of the pipeline you want.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Click on the &lt;code>Pipeline Actions&lt;/code> dropdown and select &amp;lsquo;Edit as JSON&amp;rsquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Copy/paste this data into a new file, you will need to wrap this JSON with the following&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;YourSpinnakerApplicationName&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;the name of your pipeline&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;YourSpinnakerApplicationName&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;{ The rest of the JSON obtained from the UI }&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Add the following parameters to each pipeline in the collection within the root of its JSON:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f1fa8c">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;YourSpinnakerApplicationName&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;&amp;lt;the name of the pipeline you wish to create&amp;gt;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Note that the value you set for &lt;code>&amp;quot;application&amp;quot;&lt;/code> must be the same as the value in step 3.
For example, if your pipeline called &amp;ldquo;Wait Pipeline&amp;rdquo; has a JSON definition that looks like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;keepWaitingPipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;lastModifiedBy&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;justin@acompany.com&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;limitConcurrent&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">30&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;triggers&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;updateTs&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;1572455128000&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then a Dinghy file managing this pipeline in the &amp;ldquo;helloworld&amp;rdquo; application looks like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;helloworld&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;helloworld&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Wait Pipeline&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;keepWaitingPipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;lastModifiedBy&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;justin@acompany.com&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;limitConcurrent&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;isNew&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;refId&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;1&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;requisiteStageRefIds&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">30&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;triggers&amp;#34;&lt;/span>: [],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;updateTs&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;1572455128000&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Save this file as &lt;code>dinghyfile&lt;/code> in the root of your project and push it to your repository.
You may want to follow the &lt;a href="#deleting-stale-pipelines">deleting stale pipelines&lt;/a> instructions.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;h2 id="alternate-template-formats">Alternate template formats&lt;/h2>
&lt;p>When using an alternate template format all of your modules must also be in that same format.&lt;/p>
&lt;h3 id="yaml-template-format">YAML template format&lt;/h3>
&lt;p>YAML formatting works just like the JSON formatting does. However, all of your templates will need to be YAML if you&amp;rsquo;ve configured dinghy to use YAML as its template format.&lt;/p>
&lt;p>Example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>---
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">application&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;My awesome application&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4"># You can do inline comments now&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">globals&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">waitTime&lt;/span>: &lt;span style="color:#bd93f9">42&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">retries&lt;/span>: &lt;span style="color:#bd93f9">5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">pipelines&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>- &lt;span style="color:#ff79c6">application&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;My awesome application&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">name&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;My cool pipeline&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">appConfig&lt;/span>: {}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">keepWaitingPipelines&lt;/span>: &lt;span style="color:#ff79c6">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">limitConcurrent&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">stages&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">name&lt;/span>: Wait For It...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">refId&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#39;1&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">requisiteStageRefIds&lt;/span>: []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">type&lt;/span>: wait
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">waitTime&lt;/span>: &lt;span style="color:#bd93f9">4&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &amp;#34;some.stage.module&amp;#34; &amp;#34;something&amp;#34; }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">triggers&lt;/span>: []
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>Note: YAML has strict spacing requirements. Your modules must indent properly for the template to be rendered correctly.&lt;/em>&lt;/p>
&lt;h3 id="hcl-template-format">HCL template format&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-hcl" data-lang="hcl">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f1fa8c">&amp;#34;application&amp;#34; = &amp;#34;Some App&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f1fa8c">&amp;#34;globals&amp;#34;&lt;/span> &lt;span style="color:#ff79c6">=&lt;/span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;waitTime&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#bd93f9">42&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f1fa8c">&amp;#34;pipelines&amp;#34;&lt;/span> &lt;span style="color:#ff79c6">=&lt;/span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;appConfig&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> {}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;application&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;Some App&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;keepWaitingPipelines&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#8be9fd">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;limitConcurrent&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#8be9fd">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;name&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;Foo&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;stages&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;name&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;Wait For It..!&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;refId&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;1&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;requisiteStageRefIds&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;type&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;waitTime&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> &lt;span style="color:#bd93f9">5&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ &lt;span style="color:#ff79c6">module&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;some.stage.module&amp;#34; &amp;#34;something&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;#34;triggers&amp;#34; &lt;span style="color:#ff79c6">=&lt;/span> []
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>]
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>Note: HCL format can have some quirks. Though the spec allows you to specify arrays and objects in various ways, that may not always serialize to json correctly once dinghy submits the pipeline to the Spinnaker api. The above form is recommended when specifying arrays of objects.&lt;/em>&lt;/p>
&lt;h2 id="conditionals">Conditionals&lt;/h2>
&lt;p>Dinghy supports all of the usual Go template conditionals. In addition to that, Dinghy also provides the git webhoook content in the template, allowing you to use the raw push data in the template itself.&lt;/p>
&lt;p>Example:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;conditionals&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;conditionals&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;my-pipeline-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ if eq .RawData.pusher.name &lt;span style="color:#ff79c6">&amp;#34;Samtribal&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;this_is_true&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ else }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;this_is_false&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ end }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">10&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="iterating-over-a-map">Iterating over a map:&lt;/h3>
&lt;p>In certain situations, you may want to iterate over a list of items. Dinghy supports the &lt;code>makeSlice&lt;/code> function. Here&amp;rsquo;s an example of how to do this:&lt;/p>
&lt;p>Given a stage that looks like this (filename &lt;code>stage.minimal.wait.module&lt;/code>)&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>waitname&lt;span style="color:#f1fa8c">&amp;#34; ?: &amp;#34;&lt;/span>Wait&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then a Dinghyfile that looks like this (note the commas in order for the loop to function properly):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;example&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Loop Example&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;example&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ $stages := makeSlice &lt;span style="color:#ff79c6">&amp;#34;First Wait&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;Second Wait&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ range $stages }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> module &lt;span style="color:#ff79c6">&amp;#34;stage.minimal.wait.module&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;waitname&amp;#34;&lt;/span> .
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }},
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ end }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> module &lt;span style="color:#ff79c6">&amp;#34;stage.minimal.wait.module&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;waitname&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;Final Wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Will result in a pipeline that looks like this (after JSON formatting):&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;example&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Loop Example&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;example&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;First Wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Second Wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Final Wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="rawdata">RawData&lt;/h3>
&lt;p>The top level of the data passed in is always &lt;code>.RawData&lt;/code>. From there, you can use the JSON fields as they appear in the payload. For example, GitHub&amp;rsquo;s payload looks like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pusher&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Octocat&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In the template, the access path for that variable is: &lt;code>.RawData.pusher.name&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;my fancy application (author: {{ .RawData.pusher.name }})&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ $mods := makeSlice &lt;span style="color:#ff79c6">&amp;#34;mod1&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;mod2&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ range $mods }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module . }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ end }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;deep.pipeline.module&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;artifact&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;artifact11&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;artifact2&amp;#34;&lt;/span> &lt;span style="color:#f1fa8c">&amp;#34;artifact22&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;em>Note: The structure of the webhook data passed to Dinghy&amp;rsquo;s template engine depends on the Git service that sends the webhook. This example uses a GitHub webhook.&lt;/em>&lt;/p>
&lt;h2 id="example-templates">Example Templates&lt;/h2>
&lt;p>Armory provides example dinghy templates you can copy and extend. You can find the examples in the &lt;a href="https://github.com/armory/dinghyTemplates">Armory GitHub repo&lt;/a>.&lt;/p>
&lt;h2 id="webhook-secret-validation">Webhook secret validation&lt;/h2>
&lt;p>You can add a layer of security or restrict which repositories dinghy will process by using webhook secret validation. Enabling webhook secret validation ensures that your service provider is the only one that can trigger your pipelines, not an imposter.&lt;/p>
&lt;p>This feature supports &lt;strong>GitHub&lt;/strong> webhooks.&lt;/p>
&lt;h3 id="enable-or-disable-webhook-secret-validation">Enable or disable webhook secret validation&lt;/h3>
&lt;p>When you enable webhook secret validation, &lt;strong>ALL&lt;/strong> webhooks for that provider are validated for a secret.&lt;/p>
&lt;p>Add the &lt;code>webhookValidationEnabledProviders&lt;/code> element to the &lt;code>dinghy&lt;/code> configuration in the &lt;code>SpinnakerService&lt;/code> manifest. Add the providers as a list. To disable webhooks secrets, delete the &lt;code>webhookValidationEnabledProviders&lt;/code> element with the list of providers.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">apiVersion&lt;/span>: spinnaker.armory.io/v1alpha2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kind&lt;/span>: SpinnakerService
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">metadata&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">name&lt;/span>: spinnaker
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">spec&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">spinnakerConfig&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">config&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">armory&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">dinghy&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">webhookValidationEnabledProviders&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - github
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ... &lt;span style="color:#6272a4"># Rest of config omitted for brevity&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then update the SpinnakerService with your updated manifest:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>kubectl -n spinnaker apply -f spinnakerservice.yml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="webhook-validation-fields">Webhook validation fields&lt;/h3>
&lt;p>When you enable &lt;code>webhook secret validation&lt;/code>, Dinghy validates all the webhooks it receives from the specified provider.&lt;/p>
&lt;p>A webhook validation has the following fields:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>organization&lt;/strong>: Organization for the repository.&lt;/li>
&lt;li>&lt;strong>repo&lt;/strong>: Repository name.&lt;/li>
&lt;li>&lt;strong>enabled&lt;/strong>: true or false.
&lt;ul>
&lt;li>&lt;strong>true&lt;/strong>: Validation will be performed against the secret in the Webhook validation.&lt;/li>
&lt;li>&lt;strong>false&lt;/strong>: Validation for this repo will be considered as disabled, so no validation and direct dinghy execution will be done regardless secret is not good.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;strong>secret&lt;/strong>: Secret configured.&lt;/li>
&lt;/ul>
&lt;h3 id="webhook-validation-default-secret">Webhook validation default secret&lt;/h3>
&lt;p>You can specify a default secret to use when your GitHub organization has multiple repositories with the same secret. The repository name is &lt;code>default-webhook-secret&lt;/code> and must be enabled.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>organization&lt;/strong>: Organization for the repository.&lt;/li>
&lt;li>&lt;strong>repo&lt;/strong>: default-webhook-secret&lt;/li>
&lt;li>&lt;strong>enabled&lt;/strong>: true&lt;/li>
&lt;li>&lt;strong>secret&lt;/strong>: Secret configured.&lt;/li>
&lt;/ul>
&lt;h2 id="add-or-edit-webhook-validations">Add or Edit Webhook Validations&lt;/h2>
&lt;p>Add the &lt;code>webhookValidations&lt;/code> element to the &lt;code>dinghy&lt;/code> configuration in the &lt;code>SpinnakerService&lt;/code> manifest.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">apiVersion&lt;/span>: spinnaker.armory.io/v1alpha2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kind&lt;/span>: SpinnakerService
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">metadata&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">name&lt;/span>: spinnaker
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">spec&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">spinnakerConfig&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">config&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">armory&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">dinghy&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">webhookValidations&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">enabled&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">versionControlProvider&lt;/span>: github
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">organization&lt;/span>: testorg
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">repo&lt;/span>: testrepo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">secret&lt;/span>: testSecret
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#ff79c6">enabled&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">versionControlProvider&lt;/span>: github
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">organization&lt;/span>: armory
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">repo&lt;/span>: test-repo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">secret&lt;/span>: testSecret
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ... &lt;span style="color:#6272a4"># Rest of config omitted for brevity&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>kubectl -n spinnaker apply -f spinnakerservice.yml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="delete-webhook-validations">Delete Webhook Validations&lt;/h3>
&lt;p>Delete a &lt;code>webhookValidations&lt;/code> element by deleting it from the manifest and then applying the manifest.&lt;/p>
&lt;h2 id="application-updates">Application updates&lt;/h2>
&lt;p>The Dinghy service behavior for applications and pipelines are different:&lt;/p>
&lt;ul>
&lt;li>Applications: Dinghy creates the application with the configuration initially sent. The application does not get updated after that even if the Dinghy file changes after the initial read.&lt;/li>
&lt;li>Pipelines: Any &lt;code>dinghyfiles&lt;/code> are reread on every push and update.&lt;/li>
&lt;/ul>
&lt;p>However, you can change this behavior by adding a global variable: &lt;code>save_app_on_update&lt;/code>. This behavior is good if you want to have your application to always adhere to the code implemented since it overwrites notifications every single time.&lt;/p>
&lt;p>An example of this can be:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;testingappupdate&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;save_app_on_update&amp;#34;&lt;/span> : &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;spec&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;permissions&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;READ&amp;#34;&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;role&amp;#34;&lt;/span>],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;EXECUTE&amp;#34;&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;role&amp;#34;&lt;/span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;WRITE&amp;#34;&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;role&amp;#34;&lt;/span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;notifications&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;slack&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;when&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;pipeline.complete&amp;#34;&lt;/span>, &lt;span style="color:#f1fa8c">&amp;#34;pipeline.failed&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;address&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;slack-channel&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;email&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;when&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;pipeline.starting&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;address&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;email1@email.com&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;cc&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;email2@email.com&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="application-notifications">Application notifications&lt;/h2>
&lt;p>Application notifications can be declared as:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;testingappupdate&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;save_app_on_update&amp;#34;&lt;/span> : &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;spec&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;notifications&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;slack&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;when&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;pipeline.complete&amp;#34;&lt;/span>, &lt;span style="color:#f1fa8c">&amp;#34;pipeline.failed&amp;#34;&lt;/span>, &lt;span style="color:#f1fa8c">&amp;#34;pipeline.starting&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;message&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipeline.starting&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;text&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;custom message&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;address&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;slack-channel&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;email&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;when&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;pipeline.starting&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;address&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;email1@email.com&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;cc&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;email2@email.com&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Here, you can see that &lt;code>notifications&lt;/code> is under &lt;code>spec&lt;/code> and then configurations can be inserted.
They key for the key-value relationship should be the notification type: &lt;code>googlechat&lt;/code>, &lt;code>slack&lt;/code>, &lt;code>bearychat&lt;/code>, &lt;code>email&lt;/code>, and &lt;code>pubsub&lt;/code>.&lt;/p>
&lt;p>Under pipelines there&amp;rsquo;s always a field &lt;code>when&lt;/code> that supports the following values: &lt;code>pipeline.complete&lt;/code>, &lt;code>pipeline.failed&lt;/code> and &lt;code>pipeline.starting&lt;/code>.&lt;/p>
&lt;p>Here&amp;rsquo;s a table with the mapping for the possible values for notifications.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Type&lt;/th>
&lt;th>&lt;code>address&lt;/code> field&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>googlechat&lt;/td>
&lt;td>Chat Webhook&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>slack&lt;/td>
&lt;td>Slack Channel&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>bearychat&lt;/td>
&lt;td>Email Address&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>email&lt;/td>
&lt;td>Email Address&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>pubsub&lt;/td>
&lt;td>Publisher Name&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="slack-application-notifications">Slack application notifications&lt;/h2>
&lt;p>If Slack is configured for &lt;code>pipeline.complete&lt;/code> or &lt;code>pipeline.failed&lt;/code>, a notification gets sent for those channels. Given this configuration:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;testingslack&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;globals&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;save_app_on_update&amp;#34;&lt;/span> : &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;spec&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;notifications&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;slack&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;when&amp;#34;&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;pipeline.complete&amp;#34;&lt;/span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;address&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;slack-channel-good&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;when&amp;#34;&lt;/span>: [ &lt;span style="color:#f1fa8c">&amp;#34;pipeline.failed&amp;#34;&lt;/span>],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;address&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;slack-channel-bad&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;when&amp;#34;&lt;/span>: [&lt;span style="color:#f1fa8c">&amp;#34;pipeline.complete&amp;#34;&lt;/span>, &lt;span style="color:#f1fa8c">&amp;#34;pipeline.failed&amp;#34;&lt;/span>],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;address&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;slack-channel-both&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Dinghy sends a notification to channel &lt;code>slack-channel-good&lt;/code> and &lt;code>slack-channel-both&lt;/code> if a pipeline renders correctly and a notification to &lt;code>slack-channel-bad&lt;/code> and &lt;code>slack-channel-both&lt;/code> if a pipeline fails to render.&lt;/p>
&lt;h2 id="repository-template-processing">Repository Template processing&lt;/h2>
&lt;p>Imagine you have a template and a couple of modules and &lt;code>dinghyfiles&lt;/code> pointing at them. You modify a module and this module is using Rawdata. At this moment the commited Rawdata is from the template repository, so there can be two possible scenarios:&lt;/p>
&lt;ul>
&lt;li>The Rawdata from the template repository is taken in order to render all the dependent &lt;code>dinghyfiles&lt;/code> again. Use the &lt;code>repositoryRawdataProcessing = false&lt;/code> config for this behavior.&lt;/li>
&lt;li>The Rawdata from the specific &lt;code>dinghyfile&lt;/code> re-rendered is taken to render the &lt;code>dinghyfile&lt;/code>. Use the &lt;code>repositoryRawdataProcessing = true&lt;/code> config for this behavior.&lt;/li>
&lt;/ul>
&lt;p>By default Dinghy uses the Rawdata from the template repository. However, you can enable the second behavior in which the Rawdata from the latest push gets used for that &lt;code>dinghyfile&lt;/code> in the specific repository.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">apiVersion&lt;/span>: spinnaker.armory.io/v1alpha2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kind&lt;/span>: SpinnakerService
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">metadata&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">name&lt;/span>: spinnaker
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">spec&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">spinnakerConfig&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">config&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">armory&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">dinghy&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">repositoryRawdataProcessing&lt;/span>: &lt;span style="color:#ff79c6">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ... &lt;span style="color:#6272a4"># Rest of config omitted for brevity&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then, update the SpinnakerService with your updated manifest:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>kubectl -n spinnaker apply -f spinnakerservice.yml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="repository-template-processing-example">Repository Template processing example&lt;/h3>
&lt;p>Given the following scenario:&lt;/p>
&lt;p>&lt;code>dinghyfile&lt;/code> in &lt;code>armory/my-repository&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;processtemplate&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;pipelines&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;processtemplate&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;my-pipeline-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;stages&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ .RawData.repository.full_name }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#bd93f9">10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> },
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {{ module &lt;span style="color:#ff79c6">&amp;#34;stage.minimal.wait.module&amp;#34;&lt;/span> }}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;code>stage.minimal.wait.module&lt;/code> in &lt;code>armory/template-repo&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>waitname&lt;span style="color:#f1fa8c">&amp;#34; ?: &amp;#34;&lt;/span>Wait module&lt;span style="color:#f1fa8c">&amp;#34; }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;{{ var &amp;#34;&lt;/span>waitTime&lt;span style="color:#f1fa8c">&amp;#34; ?: 10 }}&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When you make a commit to change &lt;code>stage.minimal.wait.module&lt;/code> in &lt;code>armory/template-repo&lt;/code>, all the dependent pipelines get rendered again (in this case the dinghyfile from armory/my-repository). For that the string &lt;code>{{ .RawData.repository.full_name }}&lt;/code> will be:&lt;/p>
&lt;ul>
&lt;li>With &lt;code>repositoryRawdataProcessing=false&lt;/code> the result is &lt;code>armory/template-repo&lt;/code>&lt;/li>
&lt;li>With &lt;code>repositoryRawdataProcessing=true&lt;/code> the result is &lt;code>armory/my-repository&lt;/code>&lt;/li>
&lt;/ul></description></item><item><title>Plugins: Use the ARM CLI to Render Pipeline JSON</title><link>/plugins/pipelines-as-code/arm-cli/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/pipelines-as-code/arm-cli/</guid><description>
&lt;p>&lt;img src="/images/proprietary.svg" alt="Proprietary">&lt;/p>
&lt;h2 id="before-you-begin">Before you begin&lt;/h2>
&lt;ul>
&lt;li>You have installed Pipelines-as-Code in your Spinnaker Armory CD instance.&lt;/li>
&lt;li>You know how to &lt;a href="/plugins/pipelines-as-code/use/">use&lt;/a> Pipelines-as-Code.&lt;/li>
&lt;li>Your &lt;code>dinghyfile&lt;/code> and module repo must be available locally so that the ARM CLI can reference them.&lt;/li>
&lt;/ul>
&lt;h2 id="install-the-arm-cli">Install the ARM CLI&lt;/h2>
&lt;p>You can either run the ARM CLI in a Docker container or install and run it locally.&lt;/p>
&lt;h3 id="docker-container">Docker container&lt;/h3>
&lt;p>The ARM CLI is available on &lt;a href="https://hub.docker.com/r/armory/arm-cli">Docker Hub&lt;/a>. To download and run the ARM CLI, use the following commands:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4"># Pull the latest container for the CLI&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>docker pull armory/arm-cli:latest
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#6272a4"># Run the container&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>docker run -it armory/arm-cli /bin/sh
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can use the CLI by running the &lt;code>arm&lt;/code> command in the container. For example, &lt;code>arm help&lt;/code>&lt;/p>
&lt;h3 id="download-and-install">Download and install&lt;/h3>
&lt;p>To install the ARM CLI, perform the following steps:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Download the latest for your operating system: &lt;a href="https://github.com/armory-io/arm/releases">https://github.com/armory-io/arm/releases&lt;/a>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Unzip the package.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add the ARM CLI to your $PATH by creating a symbolic link:&lt;/p>
&lt;p>For example, the following command adds &lt;code>arm-2.1.1-darwin-amd64&lt;/code> in the root directory of the user &lt;code>milton&lt;/code> to the $PATH:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>ln -sf /Users/milton/arm-2.1.1-darwin-amd64 /usr/local/bin/arm
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Adjust the example for your environment and version.&lt;/p>
&lt;/li>
&lt;/ol>
&lt;p>You can now run the CLI by using the &lt;code>arm&lt;/code> command. For example: &lt;code>arm help&lt;/code>&lt;/p>
&lt;blockquote>
&lt;p>MacOS: The first time you run the ARM CLI, you may encounter several warning messages depending on your security settings. These messages appear because the ARM CLI is not signed. To resolve the issue, open your &lt;strong>Security &amp;amp; Privacy &amp;gt; General &amp;gt; Allow apps downladed from:&lt;/strong> and select &lt;strong>Allow Anyway&lt;/strong> for the ARM CLI.&lt;/p>
&lt;/blockquote>
&lt;h2 id="integrate-with-intellij">Integrate with IntelliJ&lt;/h2>
&lt;p>Optionally, you can integrate the ARM CLI with IntelliJ. This integration allows you to edit and then validate pipeline JSON directly in IntelliJ instead of having to switch to the command line. This process involves adding the CLI as an external tool to IntelliJ:&lt;/p>
&lt;ol>
&lt;li>
&lt;p>Open IntelliJ and go to &lt;strong>Preferences &amp;gt; Tools &amp;gt; External Tools&lt;/strong>.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Add an External Tool.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Complete the &lt;strong>Create Tool&lt;/strong> wizard using the following values for &lt;strong>Tool Settings&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Name:&lt;/strong> Name it something descriptive, such as &amp;ldquo;ARM&amp;rdquo;&lt;/li>
&lt;li>&lt;strong>Program:&lt;/strong> Use the path to where the CLI is installed&lt;/li>
&lt;li>&lt;strong>Arguments:&lt;/strong> Use the following snippet and substitute the value for your &lt;code>module&lt;/code> directory: &lt;code>dinghy render $FilePathRelativeToProjectRoot$ --modules &amp;lt;directory where templates repository checked out locally&amp;gt;&lt;/code>&lt;/li>
&lt;li>&lt;strong>Working directory:&lt;/strong>: Use the following value: &lt;code>$ProjectFileDir$&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Add a keyboard shortcut for the ARM CLI.&lt;/p>
&lt;ol>
&lt;li>Go to &lt;strong>Preferences &amp;gt; Keymap &amp;gt; External Tools &amp;gt; Tool_Name &amp;gt; Add Keyboard Shortcut&lt;/strong>.&lt;/li>
&lt;li>Map the CLI to a shortcut.&lt;/li>
&lt;/ol>
&lt;/li>
&lt;/ol>
&lt;p>You can now run the CLI on open any &lt;code>dinghyfile&lt;/code> you have open in IntelliJ.&lt;/p>
&lt;h2 id="use-the-arm-cli">Use the ARM CLI&lt;/h2>
&lt;p>There is an example folder build in the release zip file.&lt;/p>
&lt;p>The command you run changes slightly based on whether the &lt;code>dinghyfile&lt;/code> uses modules (or other templating files) or rawdata (&lt;code>git push&lt;/code> information). You can execute &lt;code>dinghy render --help&lt;/code> anytime to get current supported parameters.&lt;/p>
&lt;p>JSON Example files:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Filename&lt;/th>
&lt;th>Module&lt;/th>
&lt;th>RawData&lt;/th>
&lt;th>Local Module&lt;/th>
&lt;th>Parameters&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>dinghyfile_basic&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_basic&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_rawdata&lt;/td>
&lt;td>No&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_rawdata --rawdata ./examples/RawData.json&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_conditionals&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_conditionals&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_globals&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_globals --modules ./examples/json/modules&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_makeSlice&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_makeSlice --modules ./examples/json/modules&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_makeSlice_conditional_rawdata&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_makeSlice_conditional_rawdata --modules ./examples/json/modules --rawdata ./examples/RawData.json&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_localmodule&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_localmodule --modules ./examples/json/modules&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_pipelineID&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_pipelineID&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_localmodule_parameter&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/json/dinghyfile_localmodule_parameter --modules ./examples/json/modules --local_modules ./&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>YAML Example files:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Filename&lt;/th>
&lt;th>Module&lt;/th>
&lt;th>RawData&lt;/th>
&lt;th>Local Module&lt;/th>
&lt;th>Parameters&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>dinghyfile_basic&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/yaml/dinghyfile_basic --type yaml&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_rawdata&lt;/td>
&lt;td>No&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/yaml/dinghyfile_rawdata --rawdata ./examples/RawData.json --type yaml&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_conditionals&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/yaml/dinghyfile_conditionals --type yaml&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_globals&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>`dinghy render ./examples/yaml/dinghyfile_globals &amp;ndash;modules ./examples/yaml/modules &amp;ndash;type yaml&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_makeSlice&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/yaml/dinghyfile_makeSlice --modules ./examples/yaml/modules --type yaml&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_makeSlice_conditional_rawdata&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/yaml/dinghyfile_makeSlice_conditional_rawdata --modules ./examples/yaml/modules --rawdata ./examples/RawData.json --type yaml&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_localmodule&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/yaml/dinghyfile_localmodule --modules ./examples/yaml/modules --type yaml&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_pipelineID&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>No&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/yaml/dinghyfile_pipelineID --type yaml&lt;/code>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>dinghyfile_localmodule_parameter&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>No&lt;/td>
&lt;td>Yes&lt;/td>
&lt;td>&lt;code>dinghy render ./examples/yaml/dinghyfile_localmodule_parameter --modules ./examples/yaml/modules --local_modules ./ --type yaml&lt;/code>&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="example">Example&lt;/h3>
&lt;p>The zip file that you downloaded for the ARM CLI includes several example &lt;code>dinghyfiles&lt;/code> that you can modify to meet your needs. The following example shows what happens when you render the &lt;code>dinghyfile_globals&lt;/code> example file:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>$ arm dinghy render ./examples/dinghyfile_globals --modules ./examples/modules --rawdata ./examples/RawData.json --output ./testing
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>INFO&lt;span style="color:#ff79c6">[&lt;/span>2020-05-08 15:49:29&lt;span style="color:#ff79c6">]&lt;/span> Checking dinghyfile
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>INFO&lt;span style="color:#ff79c6">[&lt;/span>2020-05-08 15:49:29&lt;span style="color:#ff79c6">]&lt;/span> Reading rawdata file
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>INFO&lt;span style="color:#ff79c6">[&lt;/span>2020-05-08 15:49:29&lt;span style="color:#ff79c6">]&lt;/span> Parsing rawdata json
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>INFO&lt;span style="color:#ff79c6">[&lt;/span>2020-05-08 15:49:29&lt;span style="color:#ff79c6">]&lt;/span> Parsing dinghyfile
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>INFO&lt;span style="color:#ff79c6">[&lt;/span>2020-05-08 15:49:29&lt;span style="color:#ff79c6">]&lt;/span> Parsed dinghyfile
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>INFO&lt;span style="color:#ff79c6">[&lt;/span>2020-05-08 15:49:29&lt;span style="color:#ff79c6">]&lt;/span> Output:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;global_vars&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;globals&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;42&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;waitname&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;default-name&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">}&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;pipelines&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">[&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;application&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;global_vars&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;Made By Armory Pipeline Templates&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;stages&amp;#34;&lt;/span>: &lt;span style="color:#ff79c6">[&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;default-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;42&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">}&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;name&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;overwrite-name&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;waitTime&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;100&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f1fa8c">&amp;#34;type&amp;#34;&lt;/span>: &lt;span style="color:#f1fa8c">&amp;#34;wait&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">]&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>INFO&lt;span style="color:#ff79c6">[&lt;/span>2020-05-08 15:49:29&lt;span style="color:#ff79c6">]&lt;/span> Final dinghyfile is a valid JSON Object.
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If the final JSON file is valid, the following message appears: &lt;code>Final dinghyfile is a valid JSON Object.&lt;/code>&lt;/p></description></item><item><title>Plugins: Armory Pipelines-as-Code Release Notes</title><link>/plugins/pipelines-as-code/release-notes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/plugins/pipelines-as-code/release-notes/</guid><description>
&lt;h2 id="release-notes">Release notes&lt;/h2>
&lt;p>&lt;a href="/continuous-deployment/feature-status/release-definitions/#ga">&lt;img src="/images/ga.svg" alt="Generally available">&lt;/a> &lt;img src="/images/proprietary.svg" alt="Proprietary">&lt;/p>
&lt;h2 id="230">2.30&lt;/h2>
&lt;h3 id="permissions-check-for-a-commit">Permissions check for a commit&lt;/h3>
&lt;p>&lt;code>userWritePermissionsCheckEnabled&lt;/code>&lt;/p>
&lt;p>This new feature, when enabled, verifies if the author of a commit that changed app parameters has sufficient WRITE permission for that app. Users can specify a list of authors whose permissions are not valid. This option’s purpose is to skip permissions checks for bots and tools.&lt;/p>
&lt;p>This feature is &lt;strong>disabled by default&lt;/strong>. To enable this feature, see &lt;a href="/plugins/pipelines-as-code/install/configure/#permissions-check-for-a-commit">Permissions check for a commit&lt;/a>.&lt;/p>
&lt;h3 id="known-issue">Known issue&lt;/h3>
&lt;h4 id="multiplebranchesenabled-false-not-working-as-expected">&lt;code>multipleBranchesEnabled: false&lt;/code> not working as expected&lt;/h4>
&lt;p>&lt;strong>Armory CD 2.30.3, 2.30.4, 2.30.5&lt;/strong>&lt;/p>
&lt;p>When &lt;code>multipleBranchesEnabled: false&lt;/code>, you may notice that the configuration &lt;code>multipleBranchesEnabled&lt;/code> is never set to even though it is set to false under the Dinghy profiles settings. This may cause &lt;code>dinghyfile&lt;/code> changes on the master/main branch to be pushed unexpectedly.&lt;/p>
&lt;p>You can read more about this issue in the &lt;a href="https://support.armory.io/support?id=kb_article_view&amp;amp;sysparm_article=KB0010817">KB article&lt;/a>.&lt;/p>
&lt;h2 id="227">2.27&lt;/h2>
&lt;h3 id="multi-branch-enhancement">Multi-branch enhancement&lt;/h3>
&lt;p>Now you can configure Pipelines-as-Code to pull Dinghy files from multiple branches in the same repo. Cut out the tedious task of managing multiple repos; have a single repo for Spinnaker application pipelines. See &lt;a href="/plugins/pipelines-as-code/install/configure/#multiple-branches">Multiple branches&lt;/a> for how to enable and configure this feature.&lt;/p>
&lt;h2 id="224">2.24&lt;/h2>
&lt;h3 id="mysql-as-backing-store">MySQL as backing store&lt;/h3>
&lt;p>Pipelines-as-Code now supports using MySQL as the backing store, which can provide more durability and scalability than Redis. This feature is currently in early access.&lt;/p>
&lt;p>For information about how to configure the backing store for Pipelines-as-Code, see &lt;a href="/plugins/pipelines-as-code/install/configure/#configuring-redis">Configuring SQL&lt;/a>.&lt;/p>
&lt;h2 id="221">2.21&lt;/h2>
&lt;h3 id="github-pull-request-validation">GitHub pull request validation&lt;/h3>
&lt;p>Pipelines-as-Code now supports pull request (PR) validation for GitHub. When a PR is submitted, you can ensure that the &lt;code>dinghyfile&lt;/code> is valid by enabling this feature.&lt;/p>
&lt;p>For more information, see &lt;a href="/plugins/pipelines-as-code/install/configure/#pull-request-validations">Pull Request Validation&lt;/a>.&lt;/p>
&lt;h2 id="known-issues">Known issues&lt;/h2>
&lt;h3 id="failed-to-load-configuration">Failed to load configuration&lt;/h3>
&lt;p>If Pipelines-as-Code crashes on start up and you encounter an error similar to:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8be9fd;font-style:italic">time&lt;/span>&lt;span style="color:#ff79c6">=&lt;/span>&lt;span style="color:#f1fa8c">&amp;#34;2020-03-06T22:35:54Z&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8be9fd;font-style:italic">level&lt;/span>&lt;span style="color:#ff79c6">=&lt;/span>fatal
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8be9fd;font-style:italic">msg&lt;/span>&lt;span style="color:#ff79c6">=&lt;/span>&lt;span style="color:#f1fa8c">&amp;#34;failed to load configuration: 1 error(s) decoding:\n\n* &amp;#39;Logging.Level&amp;#39; expected type &amp;#39;string&amp;#39;, got unconvertible type &amp;#39;map[string]interface {}&amp;#39;&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You probably configured global logging levels with &lt;code>spinnaker-local.yml&lt;/code>. The workaround is to override Dinghy&amp;rsquo;s logging levels:&lt;/p>
&lt;div class="highlight">&lt;div style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;display:grid;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;display:grid;">&lt;code>&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 1
&lt;/span>&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 2
&lt;/span>&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 3
&lt;/span>&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 4
&lt;/span>&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 5
&lt;/span>&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 6
&lt;/span>&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 7
&lt;/span>&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 8
&lt;/span>&lt;span style="background-color:#3d3f4a">&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"> 9
&lt;/span>&lt;/span>&lt;span style="background-color:#3d3f4a">&lt;span style="white-space:pre;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">10
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;display:grid;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">apiVersion&lt;/span>: spinnaker.armory.io/v1alpha2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">kind&lt;/span>: SpinnakerService
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">metadata&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">name&lt;/span>: spinnaker
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ff79c6">spec&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">spinnakerConfig&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">profiles&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ff79c6">dinghy&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex; background-color:#3d3f4a">&lt;span> &lt;span style="color:#ff79c6">Logging&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex; background-color:#3d3f4a">&lt;span> &lt;span style="color:#ff79c6">Level&lt;/span>: INFO&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item></channel></rss>