Reputation: 5
>> az --version
azure-cli 2.44.1
core 2.44.1
telemetry 1.0.8
Extensions:
azure-devops 0.25.0
Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
az devops configure --defaults organization=<org> project=<project>
> az pipelines create --name 'MyCi'
Error: The following arguments are required: --repository
However according to MicrosoftDoc the --repository parameter is Optional
> az pipelines create --name 'NameCI' --description 'pipeline for project' --repository AzureRepo
--branch main --repository-type tfsgit
Error: Page not found. Operation returned a 404 status code.
Upvotes: 0
Views: 1258
Reputation: 2196
According to the doc, I am trying to create an Azure Pipeline for a repository hosted in an Azure Repo in the same project.
az pipelines create --name 'ContosoBuild' --description 'Pipeline for contoso project' --repository SampleRepoName --branch master --repository-type tfsgit
I am receiving the same error message as yours.
By specifying the arguments "yml-path", the operation is successful.
Sample:
az pipelines create --name 'CreatedByCLI' --yml-path /azure-pipelines.yml --repository AzureCLIrepo --branch main --repository-type tfsgit
Output:
Upvotes: 0
Reputation: 1
You can't create pipelines from Azure DevOps CLI. There is no command az pipelines create thats why it returned Page not found. Operation returned a 404 status code.
Upvotes: 0