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.
Related
I have a React app and I've set up a build pipeline that publishes the build directory as artifacts.
I was anticipating setting up a release pipeline to deploy it like I would with AzureFunctions or an AppService.
But apparently not: when I created the static website it has created a new build pipeline which also deploys. Why would you want every build to deploy? This is nonsense.
Also, the branch name is hard-coded somehow and can't be changed. Obviously I'll want to change that to master after I've got it working.
Furthermore, when trying to create a release pipeline there is no task for Azure static website.
What is going on?
Can I have a normal build and release like everything else?
Why does this have to be different -- the inconsistency is confusing and infuriating.
But apparently not: when I created the static website it has created a
new build pipeline which also deploys. Why would you want every build
to deploy? This is nonsense.
You can change the trigger of the pipeline to make the deployment be done as you want.
Check these official documents:
CI Trigger for DevOps
PR Trigger for DevOps
If you don't want the pipeline trigger automatically, you can replace the trigger part of the pipeline as this:
trigger: none
Also, the branch name is hard-coded somehow and can't be changed.
Obviously I'll want to change that to master after I've got it
working.
Just like the above, the design of Azure SWA in this regard is a bit counter-intuitive, these settings are also not operated on the Azure Portal side, but on the DevOps side.
You need follow these to change the source:
After the above two steps, the source of the Azure SWA will be changed successfully, but the UI of the Azure Portal side will not change immediately at this time. A success deployment will change it:
I am trying to delete a Release from a Legacy release Pipeline but when selecting the Delete option I get the following error...
VS402946: 'My-Release-2022-01-06' cannot be deleted as it is currently deployed on stage(s) Staging.
This is nonsense in "real world" as this Release pipeline has since been replaced with another pipeline so this isn't deployed anywhere anymore.
This was a badly generated release - I don't want to remove the pipeline for legacy tracking reasons. Can this be done?
Three steps when you have an older release def you need to delete and it was previously deployed.
Edit the definition, and delete all the environments.
create an environment with a default name that is different than the original and save.
Delete the environment as it will not see it as a valid deployment.
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.
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.
I have a release definition,now I want to take the backup of old one before deploying new one if any know the answer please share the steps or picture
Because I'm new to CI/cd
According to your description, seems you want Azure DevOps for a release definition to have a step that backs up the directory for the application before it deploys the updated code.
There are a Copy Files and a Archive Files task which you can drop into your process. You can even make the tasks conditional based on your needs.
When you want the "old" release, the normal thing to do would be to schedule a new release with the previous version to install. Or to fix the issue and trigger a new release with the fixed contents.