-
Notifications
You must be signed in to change notification settings - Fork 267
Support self-hosted Azure DevOps Server remotes via user confirmation #6480
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
base: main
Are you sure you want to change the base?
Conversation
…firmation Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
|
/azp run azure-dev - cli |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables Azure DevOps pipeline provider to support self-hosted Azure DevOps Server instances (common in Azure Government and on-premises environments) by accepting remotes from non-standard hosts after user confirmation.
Changes:
- Modified
parseAzDoRemoteto accept any HTTPS URL with/_git/pattern and track non-standard hosts via newIsNonStandardHostfield - Added user confirmation prompt in
gitRepoDetailsfor non-standard Azure DevOps hosts before proceeding - Extended test coverage with self-hosted Azure DevOps Server URL patterns
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| cli/azd/pkg/pipeline/azdo_provider.go | Added IsNonStandardHost field to azdoRemote struct, relaxed host validation in parseAzDoRemote to accept self-hosted URLs, and added user confirmation prompt for non-standard hosts in gitRepoDetails |
| cli/azd/pkg/pipeline/azdo_provider_test.go | Updated existing test cases to include IsNonStandardHost: false field and added two new test cases for self-hosted Azure DevOps Server URL patterns |
|
@copilot apply changes based on the comments in this thread |
…rage Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
|
/azp run azure-dev - cli |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
The azd pipeline provider rejected git remotes from self-hosted Azure DevOps Server instances (e.g.,
https://devops.example.com/Collection/Project/_git/Repo), blocking usage in Azure Government and on-premises environments.Changes
/_git/pattern from any domain, track non-standard hosts via newIsNonStandardHostfieldBehavior
Previously:
Now:
Users must explicitly confirm (opt-in) to proceed with non-standard hosts. SSH remotes from non-standard hosts remain unsupported (cannot be reliably parsed).
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.