Home > Enterprise >  Pipeline repository dependency
Pipeline repository dependency

Time:02-02

When you create new CI pipeline you can add agent job and agentless one.

My first question is: why is necessary to select a repository while you create an agentless job? Why is so repository dependent?

Is it possible to create a CI pipeline without selecting a repository?

Thank you in advance

Expecting to create an agentless CI without selecting a git repository in Azure Devops

CodePudding user response:

No, it is not possible to create a (YAML) CI pipeline without a repository. First, in the YAML case it has to store the YAML file somewhere (right: in the repo).

In your case, for an agentless job, just use an "empty" repo with only the YAML, which is then perfectly versioned through git ;-)

Form the master-CI repo do you want to trigger one or more builds? Or do you want to reuse the pipelines as templates? Like so:

[enter image description here]

In the other pipelines the template can then be used like:

resources:
  repositories:
  - repository: templates
    type: git
    name: Build-Templates
    ref: release/s97

extends:
  template: apps.yml@templates

CodePudding user response:

No, it is not possible to create a Pipeline without selecting a repository. The reason is that the repository needs to be selected on the Pipeline level, not on job level. This means that when we create a new Pipeline, it is configured to have multiple stage(s) and those stage(s) can have multiple jobs (agent/agentless). The repository needs to be added to add flexibility to the pipeline which should be able to refer an existing script or a YAML file in the source control that was configured earlier.

If in the future Azure DevOps looks to add feature to create standalone agentless jobs, then it would make sense not to have an option for repositories.

  • Related