Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] Cannot configure a deployment pipeline in Azure DevOps #1392

Closed
pautx24 opened this issue Jul 23, 2024 · 1 comment
Closed

[Issue] Cannot configure a deployment pipeline in Azure DevOps #1392

pautx24 opened this issue Jul 23, 2024 · 1 comment
Assignees
Labels
resolved-by-customer Indicates issues where the customer no longer needs any help. [org][resolution]

Comments

@pautx24
Copy link

pautx24 commented Jul 23, 2024

Describe the issue or suggestion

The context is:

  • I already have an Aspire project running
  • I've been able to deploy this project to Azure using the azd init + up commands

Now, I'm trying to deploy via DevOps pipeline. Following the guide.

  • Since I have done multiple tries, I've delete my ./project-folder/src/Aspire-Project/.azure/ + ./azure.yaml + ./next-steps.md to start all over
  • I run de azd init on ./project-folder/src/Aspire-Project. It works as expected
  • Then I create the .azdo/pipelines folder on ./project-folder (not clear in the documentation if it should be on the Aspire-Project or the root directory for all).
  • In that folder I create the file ./azure-dev.yml with the provided code (including the installation of the workload)
  • I have the PAT with the permissions specified in the guide page.
  • Finally I run the azd pipeline config --provider azdo --debug
    • It allows me to specify the subscription, the organization name, the Azure location, and to provide the PAT.

Then I get the error:

| Checking current directory for Git repository2024/07/23 09:59:55 command_runner.go:307: Run exec: 'git -C C:\XXX\src\AppHost remote get-url origin' , exit code: 0
-------------------------------------stdout-------------------------------------------
https://[email protected]/pcervello/XXX/_git/XXX
2024/07/23 09:59:55 command_runner.go:307: Run exec: 'git -C C:\XXX\src\AppHost branch --show-current' , exit code: 0
-------------------------------------stdout-------------------------------------------
ERROR: ensuring git remote: Looking for repository: Request returned status: 404 Not Found

Then I try it again removing the remote branch, the behavior for azd pipeline config --provider azdo is:

It requests and then shows the log:

? How would you like to configure your git remote to Azure DevOps? Select an existing Azure DevOps project
? Choose an existing Azure DevOps Project XXX
? How would you like to configure your remote? (Organization: XXX) Create a new private Azure DevOps Repository
? Enter the name for your new Azure DevOps Repository OR Hit enter to use this name: (XXX) ProjectXXX

? Enter the name for your new Azure DevOps Repository OR Hit enter to use this name: ProjectXXX

2024/07/23 10:20:10 command_runner.go:307: Run exec: 'git -C C:\XXX\src\AppHost branch --show-current' , exit code: 0
-------------------------------------stdout-------------------------------------------
master
2024/07/23 10:20:10 command_runner.go:307: Run exec: 'git -C C:\XXX\src\AppHost remote add origin https://pcervello.visualstudio.com/XXX/_git/ProjectXXX' , exit code: 0

2024/07/23 10:20:10 command_runner.go:307: Run exec: 'git -C C:\XXX\src\AppHost remote get-url origin' , exit code: 0
-------------------------------------stdout-------------------------------------------
https://pcervello.visualstudio.com/XXX/_git/ProjectXXX
2024/07/23 10:20:10 command_runner.go:307: Run exec: 'git -C C:\XXX\src\AppHost branch --show-current' , exit code: 0
-------------------------------------stdout-------------------------------------------
master

ERROR: ensuring git remote: existing remote is not an Azure DevOps host

Oh, and it creates the repository effectively in DevOps. It's empty though

@pautx24
Copy link
Author

pautx24 commented Oct 11, 2024

Okay, I achived to solve the issue by removing all the reference from git in the local repo. AKA: deleting .git folder.

After that, I could follow the steps and finally choose the option to create a new branch in the specific repository.

Obvuously, couldn't merge it: the history was lost from deleting the .git folder.

I just needed to move the created files in the existing repo and all is working as smooth as a beta experience can be.

@pautx24 pautx24 closed this as completed Oct 11, 2024
@dotnetrepoman dotnetrepoman bot added resolved-by-customer Indicates issues where the customer no longer needs any help. [org][resolution] and removed ⌚ Not Triaged Not triaged labels Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolved-by-customer Indicates issues where the customer no longer needs any help. [org][resolution]
Projects
None yet
Development

No branches or pull requests

3 participants