Question: How to create a pipeline with pipeline template using spin cli?


Answer: Create a JSON file as follows:

{

  "schema": "v2",

  "name": "SimpleDeployment",

  "application":"admiral",

   "variables": {

    "account": "my-k8s-v2-account",

    "namespace": "target"   

  },

  "template": {

    "artifactAccount": "front50ArtifactCredentials",

    "reference": "spinnaker://k8s-deployment",

    "type": "front50/pipelineTemplate"

  },

  "type": "templatedPipeline",

  "notifications": [],

  "parameterConfig": [],

  "stages": []

}


k8s-deployment (after spinnaker://) is the pipeline-template name. Change the other values as appropriate.


Create a pipeline using :

spin pipeline save -f <pipeline.json> # pipeline.json is the filename see above