You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Deployment Settings step in export-solution-to-git pipeline fails with GitRepositoryNotFound exception. New repository and deployment profile were created for committing and deploying a solution. Previous deployments of other solutions to their own repositories never encountered this issue.
Full error message:
Creating deployment settings
Creating custom deployment settings
https://***.visualstudio.com/***/_apis/build/definitions/21?api-version=6.0
Invoke-RestMethod : {"$id":"1","innerException":null,"message":"TF401019: The Git repository with name or identifier
****-****-****-***-*** does not exist or you do not have permissions for the operation you are
attempting.","typeName":"Microsoft.TeamFoundation.Git.Server.GitRepositoryNotFoundException,
Microsoft.TeamFoundation.Git.Server","typeKey":"GitRepositoryNotFoundException","errorCode":0,"eventId":3000}
At D:\a\1\PipelineUtils\PowerShell\update-deployment-settings.ps1:467 char:9
+ Invoke-RestMethod $buildDefinitionResourceUrl -Method 'PUT' - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Let's call the correct, new repository, repository A, and the second one, which identifier is referenced in the error, repository B.
The very first deployment of the solution was done without any Deployment Settings and completed successfully. Upon further investigation, we found out that in this first successful run, a build originally created 4 months ago for repository B was connected to this new solution. After configuring deployment settings, committing the solution started failing with the above error, each time with the build details being from a build done for another solution and repository B. DevOps pipelines were still correctly created in repository A.
Repository B is the very first repository used for committing the first solution with ALM Accelerator. Committing newer solution with the same deployment profile completed without any issues, so I'm unsure if we're overlooking something.
Expected Behavior
Update Deployment Settings completes without issues, with new build created for a new solution, linking to the correct git repository.
What component are you experiencing the issue with?
ALM Accelerator Canvas App
What solution version are you using?
1.0.20230404.2
Steps To Reproduce
Create new repository.
Create new deployment profile with that repository.
Commit solution in the canvas app, with the Create new branch option.
@kaat03 the July release includes an update that may resolve this issue if I understand it correctly. The update we made was to prefix the builds with the repository name to avoid conflicts when generating deployment pipelines in different repos in the same project. Take a look here. #5335
@mikefactorial I've only noticed now that my comment didn't go through last time. Thank you for pointing that out. Updating to the July release did solve our problem.
@kaat03 This has been fixed in the latest release. Please install the latest version of the toolkit following the instructions for installing updates. Note that if you do not remove the unmanaged layers as described there you will not receive updates from us.
Describe the issue
Update Deployment Settings step in export-solution-to-git pipeline fails with GitRepositoryNotFound exception. New repository and deployment profile were created for committing and deploying a solution. Previous deployments of other solutions to their own repositories never encountered this issue.
Full error message:
Let's call the correct, new repository, repository A, and the second one, which identifier is referenced in the error, repository B.
The very first deployment of the solution was done without any Deployment Settings and completed successfully. Upon further investigation, we found out that in this first successful run, a build originally created 4 months ago for repository B was connected to this new solution. After configuring deployment settings, committing the solution started failing with the above error, each time with the build details being from a build done for another solution and repository B. DevOps pipelines were still correctly created in repository A.
Repository B is the very first repository used for committing the first solution with ALM Accelerator. Committing newer solution with the same deployment profile completed without any issues, so I'm unsure if we're overlooking something.
Expected Behavior
Update Deployment Settings completes without issues, with new build created for a new solution, linking to the correct git repository.
What component are you experiencing the issue with?
ALM Accelerator Canvas App
What solution version are you using?
1.0.20230404.2
Steps To Reproduce
Anything else?
Similar issue was reported over a year ago: 1865
Excerpt from the build definition:
"repository":{"id":"**repository-B-id**","type":"TfsGit","name":"**repository-B-name**,"url":"https://***.visualstudio.com/***/_git/**repository-B-name**","defaultBranch":"refs/heads/**newSolutionName**","clean":null,"checkoutSubmodules":false
The text was updated successfully, but these errors were encountered: