Previous deleted pipeline job causing issue with artifacts

Viewed 113

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?

1 Answers

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:

enter image description here

After restore the old build pipeline, we will get the the artifact from the new restored pipeline:

enter image description here

Besides, you could also try to rename the old pipeline with Id 15 after you restoring it.

Related