Add azdo provider - #743
Conversation
Co-authored-by: Hadwa Gaber <hadwaa@microsoft.com>
Co-authored-by: Hadwa Gaber <hadwaa@microsoft.com>
Co-authored-by: Hadwa Gaber <hadwaa@microsoft.com>
Co-authored-by: Hadwa Gaber <hadwaa@microsoft.com>
Co-authored-by: Hadwa Gaber <hadwaa@microsoft.com>
…o add-azdo-provider
… and test based on linting results.
* Refactor to introduce new azdo package * refactor azdo code to multiple files in azdo package * Added azdo connection test and refactored provider * Added azdo provider initial tests * added more azdo provider tests * Adding test to verify save env config in azdo provider * Updating displayed urls to aka.ms
…to azdo-pr-updates
…o azdo-pr-updates
Co-authored-by: Wei Lim <weikanglim@gmail.com>
wbreza
left a comment
There was a problem hiding this comment.
Looks good overall. Added a few more comments but nothing blocking at this point.
ellismg
left a comment
There was a problem hiding this comment.
Thanks for all the hard work here, @vhvb1989.
One stylistic comment, there's a bunch of places where we set a bunch of locals, then construct an args parameter (which we also set to a local) and then make a call passing in the args object. It might be easier to read if we instead just creatied the options object at the call site. I think that combined with adding some helper which basically looks like refOf[T any](value T) *T would let us collapse the number of locals we have and move values closer to where they end up being used.
I personally like this style because when reading code if we assign something to a local my mind starts to track it, whereas when we just create a value inside the argument list of a function, we are calling I sort of know "okay, this stuff is just specific to this call" and my mind spends less time lingering on it.
Repoman Generation ResultsRepoman pushed changes to remotes for the following projects: Project: todo-csharp-cosmos-sqlRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-csharp-cosmos-sql -b pr/743View Changes | Compare Changes Project: todo-csharp-sqlRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-csharp-sql -b pr/743View Changes | Compare Changes Project: todo-nodejs-mongo-acaRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo-aca -b pr/743View Changes | Compare Changes Project: todo-nodejs-mongo-swa-funcRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo-swa-func -b pr/743View Changes | Compare Changes Project: todo-nodejs-mongoRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo -b pr/743View Changes | Compare Changes Project: todo-nodejs-mongo-terraformRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-nodejs-mongo-terraform -b pr/743View Changes | Compare Changes Project: todo-python-mongo-acaRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-python-mongo-aca -b pr/743View Changes | Compare Changes Project: todo-python-mongo-swa-funcRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-python-mongo-swa-func -b pr/743View Changes | Compare Changes Project: todo-python-mongoRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-python-mongo -b pr/743View Changes | Compare Changes Project: todo-python-mongo-terraformRemote: azure-samples-stagingBranch: pr/743You can initialize this project with: azd init -t Azure-Samples/todo-python-mongo-terraform -b pr/743View Changes | Compare Changes |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsStandalone Binary
Container |
fix #737
fix #750
This PR fixes #101, #708, #699 and #702 and adds support for Azure DevOps an SCM and CI provider.
This new workflow enables the following:
Pipeline named providers for GitHub
githuband Azure DevOpsazdoThe provider can be specified in two ways:
Detection of provider based on .azdo or .github in the template augments the above behavior.
githubifazdois set as a provider value, this will result in an errorazdo. Ifgithubis set as the provider value, this will result in an error.githubis selected by default if--providerargument is not set and/or if there's not anpipeline: providerentry inazure.yamlpipeline:provideris set inazure.yamland--providerargument is also used for runningazd pipeline config. The--providerargument overrides the settings fromazure.yamlAzDo provider supports using an existing project.
AzDo provider supports creating a new project.
AzDo provider supports using an existing repo.
AzDo provider supports creating a new repo in a project.
PAT authentication is used to push to the new repo, and the tool checks for credential helper and offers to set it to store to make subsequent pushes easier.
If a PAT is not provided, the tool will ask the user for a PAT and ask the user if they would like to store it.
If an organization name is not provided via an Environment Variable, the user will be prompted for an organization name and it will be stored in the environment file.
AzDo provider creates a build policy to ensure pushes to default branch are disabled and require a successful pipeline invocation.
Deployment Pipeline is created
Service Connection is created to allow the pipeline to deploy to azure.
Initial pipeline deployment is queued to follow the github behavior.
This was tested with a full deployment of todo-python-mongo using an Azure DevOps Pipeline.
