Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pipeline Resource * Input Must be Valid

I'm following pipeline resource triggers docs and I constructed my pipeline that looks like this.

15 resources:
16   pipelines:
17     - pipeline: buildPipeline
18       source: template-ci # azure devops pipeline name (defined in ADO UI!)
19       project: $(System.TeamProject) # azure devops project name
20       trigger:
21         branches:
22           include:
23           - main

Unfortunately, the above definition throws this error /devops/ct.yml (Line: 17, Col: 17): Pipeline Resource buildPipeline Input Must be Valid.

When I look at line 17 - pipeline: buildPipeline it looks perfectly fine what I'm doing wrong?

like image 492
Lukasz Dynowski Avatar asked Dec 16 '25 23:12

Lukasz Dynowski


2 Answers

I had the same error message but in my case the problem was that there were two pipelines with the name specified for the source parameter (template_ci) in the example above. When I renamed one of them it worked.

like image 164
sussexrick Avatar answered Dec 19 '25 23:12

sussexrick


Context

Turns out that the error is not referring to a single line (17) of configuration but, to the resource definition (pipeline resource) that, in my case, is defined from line 17 to 23.

Problem

My pipeline problem lies on the line number 19. Apparently, Azure Pipelines don't like runtime expression project: $(System.TeamProject) for pipeline resource definition.

Solutions

  1. Removing line 19 fixed the problem.
  2. Replace $(System.TeamProject) with the project name specified in azure devops. e.g for this url https://dev.azure.com/your-org-name/Your Project Name the project name would be Your Project Name. Resulting with yaml config that looks like below.
19       project: Your Project Nam
like image 45
Lukasz Dynowski Avatar answered Dec 19 '25 23:12

Lukasz Dynowski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!