Trigger IaS support with 'Use YAML from Repository', git repo?

I’ve output my YAML from pipelines into .yml files via codefresh get pip -o yaml and committed to our IaS git repo. triggers, steps and most everything else are listed under spec in the yaml, but when I select ‘Use YAML from Repository’ in the pipeline UI, it gives me the error ‘spec is not allowed’. Pulling triggers to the top level of the YAML gives errors too. What is the correct way for me to commit my trigger YAML into a git repo we’ve designated for IaS, and then point Codefresh to them?

Hello

First of all, if you are going this route with Codefresh I strongly suggest you look at these two blog posts that talk about your scenario:

You might also find our terraform provider interesting https://registry.terraform.io/providers/codefresh-io/codefresh/latest

Now to answer your question, the pipeline yaml that you export from the CLI is a superset of what is available on the UI. So when you try to use the UI it finds more information that it needs in your file.

The general rule is that pipelines that are exported from the UI, can be be imported back from the UI, and pipelines exported from the CLI can be imported with the CLI.

So to answer your question, if you want to point Codefresh to the pipeline that you have created you need to use the CLI again. Probably the create commands

  1. codefresh create project my-project
  2. codefresh create pipeline -f my-pipeline-spec.yml

Let me know if that helps.