diff --git a/.azdo/pipelines/azure-dev.yml b/.azdo/pipelines/azure-dev.yml new file mode 100644 index 00000000..e5071c1f --- /dev/null +++ b/.azdo/pipelines/azure-dev.yml @@ -0,0 +1,35 @@ +name: 'Support bot CI/CD pipeline' + +# Run when commits are pushed to mainline branch +trigger: + - main + +# Azure Pipelines workflow to deploy to Azure using azd +# To configure required secrets for connecting to Azure, simply run `azd pipeline config --provider azdo` +# Task "Install azd" needs to install setup-azd extension for azdo - https://marketplace.visualstudio.com/items?itemName=ms-azuretools.azd + +pool: + vmImage: ubuntu-latest + +container: mcr.microsoft.com/azure-dev-cli-apps:latest + +steps: + - task: setup-azd@0 + displayName: Install azd + + - pwsh: | + azd config set auth.useAzCliAuth "true" + displayName: Configure AZD to use AZ CLI authentication + + - task: AzureCLI@2 + displayName: Provision infrastructure + inputs: + azureSubscription: $(SERVICE_CONNECTION_NAME) # name of the Azure Resource Manager service connection + 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) diff --git a/azure.yaml b/azure.yaml index d6f64828..1355874d 100644 --- a/azure.yaml +++ b/azure.yaml @@ -3,5 +3,6 @@ name: supportbot metadata: template: azd-init@1.5.0 +pipeline: + provider: azdo services: - \ No newline at end of file