-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Azure DevOps Task(setup-azd) to todo templates
- Loading branch information
Showing
7 changed files
with
148 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Run when commits are pushed to mainline branch (main or master) | ||
# Set this to the mainline branch you are using | ||
trigger: | ||
- main | ||
- master | ||
|
||
# Azure Pipelines workflow to deploy to Azure using azd | ||
# To configure required secrets for connecting to Azure, simply run `azd pipeline config --provider azdo` | ||
|
||
pool: | ||
vmImage: ubuntu-latest | ||
|
||
steps: | ||
- task: setup-azd@0 | ||
displayName: Install azd | ||
|
||
- task: JavaToolInstaller@0 | ||
inputs: | ||
versionSpec: '17' | ||
jdkArchitectureOption: 'x64' | ||
jdkSourceOption: 'PreInstalled' | ||
|
||
- pwsh: | | ||
$info = $Env:AZURE_CREDENTIALS | ConvertFrom-Json -AsHashtable; | ||
azd auth login ` | ||
--client-id "$($info.clientId)" ` | ||
--client-secret "$($info.clientSecret)" ` | ||
--tenant-id "$($info.tenantId)" | ||
displayName: azd login | ||
env: | ||
AZURE_CREDENTIALS: $(AZURE_CREDENTIALS) | ||
- pwsh: | | ||
azd provision --no-prompt | ||
displayName: Provision Infrastructure | ||
env: | ||
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID) | ||
AZURE_ENV_NAME: $(AZURE_ENV_NAME) | ||
AZURE_LOCATION: $(AZURE_LOCATION) | ||
- pwsh: | | ||
azd deploy --no-prompt | ||
displayName: Deploy Application | ||
env: | ||
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID) | ||
AZURE_ENV_NAME: $(AZURE_ENV_NAME) | ||
AZURE_LOCATION: $(AZURE_LOCATION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
templates/common/.azdo/pipelines/terraform/java/azure-dev.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Run when commits are pushed to mainline branch (main or master) | ||
# Set this to the mainline branch you are using | ||
trigger: | ||
- main | ||
- master | ||
|
||
# Azure Pipelines workflow to deploy to Azure using azd | ||
# To configure required secrets for connecting to Azure, simply run `azd pipeline config --provider azdo` | ||
|
||
pool: | ||
vmImage: ubuntu-latest | ||
|
||
steps: | ||
- task: setup-azd@0 | ||
displayName: Install azd | ||
|
||
- pwsh: | | ||
$info = $Env:AZURE_CREDENTIALS | ConvertFrom-Json -AsHashtable; | ||
azd auth login ` | ||
--client-id "$($info.clientId)" ` | ||
--client-secret "$($info.clientSecret)" ` | ||
--tenant-id "$($info.tenantId)" | ||
displayName: azd login | ||
env: | ||
AZURE_CREDENTIALS: $(AZURE_CREDENTIALS) | ||
- pwsh: | | ||
azd config set alpha.terraform on | ||
displayName: Enable terraform alpha feature from azd | ||
- task: JavaToolInstaller@0 | ||
inputs: | ||
versionSpec: '17' | ||
jdkArchitectureOption: 'x64' | ||
jdkSourceOption: 'PreInstalled' | ||
|
||
- task: AzureCLI@2 | ||
displayName: Provision Infrastructure | ||
inputs: | ||
azureSubscription: azconnection | ||
scriptType: bash | ||
scriptLocation: inlineScript | ||
inlineScript: | | ||
azd provision --no-prompt | ||
env: | ||
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID) | ||
AZURE_ENV_NAME: $(AZURE_ENV_NAME) | ||
AZURE_LOCATION: $(AZURE_LOCATION) | ||
ARM_TENANT_ID: $(ARM_TENANT_ID) | ||
ARM_CLIENT_ID: $(ARM_CLIENT_ID) | ||
ARM_CLIENT_SECRET: $(ARM_CLIENT_SECRET) | ||
RS_RESOURCE_GROUP: $(RS_RESOURCE_GROUP) | ||
RS_STORAGE_ACCOUNT: $(RS_STORAGE_ACCOUNT) | ||
RS_CONTAINER_NAME: $(RS_CONTAINER_NAME) | ||
|
||
- pwsh: | | ||
azd deploy --no-prompt | ||
displayName: Deploy Application | ||
env: | ||
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID) | ||
AZURE_ENV_NAME: $(AZURE_ENV_NAME) | ||
AZURE_LOCATION: $(AZURE_LOCATION) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters