I am trying to add an Artifact to a release pipeline. Within the dropdown of the "Source (build pipeline)" there are two options for the same build pipeline.
Apple
Apple
Apparently at one point, someone created the first build pipeline and named it Apple, then deleted it and later on created a new build pipeline with the same name.
What this means now is for my release pipeline, it ONLY references the first one and so throws an error that the artifact does not exist. The first job has id 15 the second has id 140.
If I export it always references the 15 regardless of which I select int he dropdown.
If I export, edit and import, it overrides the 140 with the 15.
So basically I cannot create a release pipeline and reference this artifact.
I could rename my second pipeline but the ripple impact on other areas would be a pain to correct.
What can I do to clear/delete/free this original orphaned build pipeline? Is a Microsoft support call my only hope?
What can I do to clear/delete/free this original orphaned build pipeline? Is a Microsoft support call my only hope?
I have create a sample to test this issue, but could not reproduce this issue on my side.
You could try to login the azure devops in private mode, then remove the artifacts and re-add it, check it.
If above still not help you, you could use Rest API to restore the deleted build pipeline:
Here is the Rest API:
PATCH https://dev.azure.com/{organization}/{project}/_apis/build/definitions/{definitionId}?deleted=false&api-version=5.1
It could restore the deleted build definition and build history.
Here is my restored pipeline:
After restore the old build pipeline, we will get the the artifact from the new restored pipeline:
Besides, you could also try to rename the old pipeline with Id 15 after you restoring it.
Related
I have a build done for a ASP.Net project.
In code I have updated the names of several fields in an HTML but, when the build is launched and published, it never updates the changes I have made.
It always takes the original version to create the artifact.
I have deleted and created the build from scratch, but it always does the same thing.
What can I do?
I have more builds just like this one and this doesn't happen.
Best regards,
Have you checked the commit version of your pipeline?
It may due to your pipeline using another branch, which is the original version.
I want to have my build pipeline configured such a way that when ever my pipeline fails there is a bug created for the same. I cannot find an option to select this configuration for a particular branch. Can someone help me with this.
I want to create a bug whenever my build pipeline fails in azure devops. And i want to have it configured for a particular branch
There is an option Create a work item on failure on the pipeline Options tab.
If the build pipeline fails, it can automatically create a work item to track getting the problem fixed.
But we could not configurate it for a particular branch for this option, but we could create a new pipeline with trigger filter Branch specification:
In this case, only the particular branch build failed, it will create a bug.
Can we rename a release in Azure Devops (Not Release Pipeline)?
I'm not looking to edit the Release name format property in the General page. I want to rename the release once it's already created/forked from the release pipeline.
The simply answer is, you can't perform a rename operation at a pipeline level. If you want to change it in the Azure portal you can Clone the pipeline from the Author and Deploy blade. Then deploy the pipeline again with the new name and drop the old version.
This documentation also say that if a pipeline is created it creates unique artefacts that can't be renamed. So as mentioned, copy it and make a new one with your new name.
We're using on-prem AzureDevopsServer2019, with on-prem build agents. I'm trying to create a new release, which consists of 3 artifacts.
The (retained) build artifact I want doesn't show in the available builds comboboxes of the new release (this has happened on more than one artifact)
Alternatively, when I try and create a release directly from the retained build, I scroll through my many historic builds, find the "missing" build, click release, populate the other artifacts in the new release, then when I click "Create" get:
"VS402962: No artifact version ID is specified corresponding to
artifact source 'MyBuild'. Specify a valid value and try again
Any idea what's up?
Build artifact missing from new release's combo, creating release directly from retained build causes VS402962
You should check if you specify the projectname for the alias, it should be the source alias. Since you want to use the build artifacts, the “alias” variable should be your build definition name not your project name.
If above not work for you, try to create a new build pipeline, there is a ticket report this issue, but there is no one effective solution. This is an annoying issue in Azure DevOps:
Unable to release ~20% of the pipeline builds to any release pipeline
If you encounter this too, please reopen it and add your feedback and more useful information.
Last week, our team decided to move all separate .NET projects into a single solution. Because we were already using Azure DevOps with separate build pipelines for each project, we looked into the possibility to only trigger builds whenever there are changes to a specific project. This, to prevent the build agents from rebuilding the entire solution on every commit.
Because our source repository is a locally hosted Git one, we do not have the niceties of using path filters, so we resorted to using a Powershell task to determine if all upcoming tasks should be skipped, using a custom condition (explained in this SO question).
Now, on every commit, all builds are triggered, but the builds resolve for themselves if they should continue to build and (more importantly) if they should publish a build artifact at the end. An example of such a skipped build is below:
However, every time such a build 'succeeds', a new artifact is created, even though the publish artifact task is skipped. The problem is that all our release pipelines are triggered when a build pipeline creates an artifact. So every time a build is skipped like shown above, the release pipeline triggers and tries to deploy the artifact. But it fails, because the artifact it uses to deploy does not really exist (it seems like it is empty, and the build pipeline actually doesn't mention an artifact on the Summary tab), so any operations on the artifact fail in the release pipeline.
Our release pipelines are set to trigger on source type build artifact, for the corresponding build pipeline, with the default version parameter set to latest.
How is it possible that, even though the publish artifact task is skipped, the release pipeline still triggers and tries to deploy an empty artifact?
I assuming you enable the Continues Delivery in the Releases pipelines, this option is not related to build artifacts. this option means that Release will be triggered when the build succeeded (not matter if he has artifacts or no).
So this is the reason why after each build a new release started.
As workaround, you can add a task in the build that add "build tag" only when there is a artifacts, and in the release artifacts options, instead of choose Latest you can choose Latest from the build pipeline default branch with tags and specify the tag you put in the build.
Another option is in the "Stages" click on the triggers and then it's configured to "After release" so enable the "Artifact filters" and specify there the build tag.
How do you add a build tag? add a PowerShell task with this command:
Write-Host "##vso[build.addbuildtag]test-tag"