Azure DevOps does not find my azure-pipelines.yaml file - azure-devops

I've just created ~\azure-pipelines.yaml, committed and pushed but when I go into Azure DevOps > Pipelines and add a new build, choose my repo (also Azure DevOps) then I just get the options for the classic wizard style builds.
How do I choose my YAML file?

Azure DevOps Pipelines should have seen your YAML file as soon as you pushed and your build should be visible with an empty list of build history, and an Edit button in the top right where you can change the YAML contents.
You can manually add a new pipeline and choose Existing Azure Pipelines YAML file from the list, near the bottom and then type in the path to your YAML file.
Otherwise, rename your file to .yml extension and DevOps will automatically see it if its in the root.

Related

Azure DevOps - can I specify the location for the automatically-generated pipeline?

When I push a new repository with an azure-pipelines.yml file in the base folder, a pipeline is automatically created. When I view the Pipelines page, I see that it is it is created at location (root)\($projectname)\($projectname).
Can I configure the yml to create the pipeline in a different location, or do I have to do this manually?
You may add any path here (under review your pipeline YAML):

My "Edit Build Pipeline" Permissions in Azure DevOps are set to Deny but I can still edit the YAML file in both classic/repo?

I have a build pipeline permissions question in Azure DevOps.
I have selected "deny" for "edit build pipeline" which Microsoft docs describes as: "Can create pipelines and save any changes to a build pipeline, including configuration variables, triggers, repositories, and retention policy."
However, I can still edit and save changes (like triggers) to the build pipeline by going to Pipelines > selecting the Pipeline > View (making changes) > Save.
I am in a security group that is denied all Build permissions at top level, and only granted view, view build pipeline, stop and queue for this pipeline.
How can I make it so I can see the pipeline and run it but not be able to edit it / save any changes to it?
Since the YAML files are stored as the source files in the corresponding Git repository, if you have the permissions to edit the source files in the repository, you can edit the YAML files. It is not affected by the "Edit build pipeline" option.
For the YAML pipeline, the "Edit build pipeline" option is affecting the options on the UI settings page.

No option to select existing Azure yaml file in one of our Azure DevOps projects

When creating a new Pipeline in Azure DevOps projects, for one of our Azure projects, I don't get the option to select an existing yaml file. I've compared settings with our different projects but I don't understand why the wizard jumps straight past the Configure option without ability to go back.
Specifically, after creating "New pipeline"->"Azure Repos Git"->"Select a repository" the wizard jumps straight past the Configure option to Review tab. At this point I only get the option to review my YAML file (and rename the file - no option to pick branch or existing file).
The configure screen options I'm expecting but don't get:
Any ideas why this would only be happening for certain Azure DevOps projects/repos??
Note: I have an existing yaml pipeline already in this Git repo (so do the other projects) - but even for the first pipeline I had to stuff around creating/editing/saving this file based on the default "starter pipeline" yaml file.
I couldn't find any official fix but this worked to me without having to remove any .yml files from any branch.
The URL that appears in the "Review" step looks like this:
https://dev.azure.com/{ORGANIZATION}/{PROJECT}/_apps/hub/ms.vss-build-web.ci-designer-hub?
sourceProvider=tfsgit&
telemetrySession={SESSION_ID}&
repositoryId={REPOSITORY_ID}&
repositoryName={REPOSITORY_NAME}&
branch={BRANCH_NAME}&
repositoryUrl={REPOSITORY_URL}&
sourceProviderComplete=true
Workaround: Replace branch name with a branch that has the .yml file you are looking for.
In my case ADO was putting 'Main' by default, and it didn't work until I changed it to 'Dev' which automatically redirected me to the 'Configure' tab.
I had an "azure-pipelines.yml" file in my repository root folder/all branches. It seems that once I removed this from all branches the configure option worked as expected.

How to change the repository location for a pipeline in Azure Pipelines

I have imported a repository from BitBucket to GitHub. How can I point the existing pipeline in Azure Pipelines to the new repository location? The UI has failed me so far.
Simplest way is to create a new pipeline, link it to the github repo and point it to the existing yaml file.
But there is a way to retarget the existing pipeline.
Edit the pipeline
In the upper right corner open the ... menu
Pick the ⚡ Triggers option
Click the YAML tab
Click the Get Sources option
Reconfigure the source repo

Azure DevOps - How to update pipeline repo source without re-create a new one?

I am planning to move my Azure pipeline source files to a new Azure repo. How can I update the existing pipeline setting to point to the new Azure private repo location? I prefer not to re-create the repo and variables. Right now, if I edit the current pipeline setting, it would only allow me to select .yml files from the current repo. There's not option to change repo.
Thanks
From your description, the pipeline is Yaml type.
You could navigate to Triggers -> YAML -> Get sources.
Then you could select the target Azure repo.
If the Yaml file has different name, you could also select the target yaml file in the Settings.