Working with Dinghy Templates
Working with Dinghy TemplatesDinghy is powerful tool, but to enable its full potential we at Armory created a series of modules and Dinghy files for you to ramp up on Dinghy.This are hosted on Github and are public, any comments, pr with fixes, issues against it is welcomed.https://github.com/armory/dinghyPipelineshttps://github.com/armory/dinghyTemplatesTLDR;Fork the repos.Create a Webhook for both repositories pointing to https:///webhooks/git/github (if you have a separate DNS name or port for Gate) https:///api/v1/webhooks/git/github (if you’re using a different path for Gate) Open Whatever dinghyFiles uses a pipeline you like and change the variables necessary for your environment.On this tutorial we are going to use a dinghyFile that uses 2 modules to bake and deploy a Helm Template into K8sWe recommend usage of the Armory Dinghy CLI located at:https://github.com/armory-io/armIt's a helpful tool that will make your life easier.If you haven't read the dinghy usage documentation you can find it here.https://docs.armory.io/docs/spinnaker/using-dinghy/Now, let's jump to the templates.https://github.com/armory/dinghyPipelines/tree/master/bakeAndDeployManifestIt uses 2 modules, let's check the first one.https://github.com/armory/dinghyTemplates/blob/master/stage.bakeManifest.module
{
"name": "{{ var "name" ?: "Bake (Manifest)" }}",
"type": "bakeManifest",
"refId": "{{ var "refId" }}",
"requisiteStageRefIds": {{ var "requisiteStageRefIds" ?: [] }},
"templateRenderer": "{{ var "templateRenderer" ?: "HELM2" }}",
"outputName": "{{ var "outputName" ?: "bake artifact output" }}",
"namespace": "{{ var "namespace" }}",
"inputArtifacts": {{ var "inputArtifacts" ?: [] }},
"overrides": {{ var "overrides" ?: {} }},
"evaluateOverrideExpressions": {{ var "evaluateOverrideExpressions" ?: false }},
"expectedArtifacts": {{ var "expectedArtifacts" ?: [] }},
{{ module "section.notifications.module" }}
{{ module "section.executionOptions.module" }}
}This module represents a Bake (manifest) stage. If we go to the Spinnaker UI we can see all the values from the module line up.The dinghyFile calls the module and set the variables we need.Initial configuration all modules share:
With this, you can grab whatever dinghyFile looks good for you copy the stages you need and go from there.
Last updated
Was this helpful?