Refactor main.bicep to update appService name with appServicePlanName #17
Workflow file for this run
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
name: ie-bank-infra | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- 'scripts/**' | |
env: | |
RESOURCE_GROUP_DEV: BCSAI2024-DEVOPS-PROFESSORS | |
RESOURCE_GROUP_UAT: BCSAI2024-DEVOPS-PROFESSORS | |
SUBSCRIPTION_ID_DEV: e0b9cada-61bc-4b5a-bd7a-52c606726b3b | |
USER_ALIAS: aguadamillas | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout code | |
- uses: actions/checkout@main | |
# Lint Bicep code | |
- name: Run Bicep linter | |
run: az bicep build --file ./main.bicep | |
deploy-dev: | |
# if: github.ref == 'refs/heads/dev' | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: 'Development' | |
steps: | |
# Checkout code | |
- uses: actions/checkout@main | |
# Log into Azure | |
- uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
# Deploy Bicep file | |
- name: deploy | |
uses: azure/arm-deploy@v2 | |
with: | |
subscriptionId: ${{ env.SUBSCRIPTION_ID_DEV }} | |
resourceGroupName: ${{ env.RESOURCE_GROUP_DEV }} | |
template: ./main.bicep | |
parameters: ./parameters/dev.parameters.json appServiceAPIEnvVarENV=${{ vars.ENV }} appServiceAPIEnvVarDBHOST=${{ vars.DBHOST }} appServiceAPIEnvVarDBNAME=${{ vars.DBNAME }} appServiceAPIEnvVarDBPASS=${{ secrets.DBPASS }} appServiceAPIDBHostDBUSER=${{ secrets.DBUSER }} appServiceAPIDBHostFLASK_APP=${{ vars.FLASK_APP }} appServiceAPIDBHostFLASK_DEBUG=${{ vars.FLASK_DEBUG }} | |
deploymentName: ${{ env.USER_ALIAS }} | |
deploy-uat: | |
# if: github.ref == 'refs/heads/dev' | |
runs-on: ubuntu-latest | |
needs: [build,deploy-dev] | |
environment: | |
name: 'UAT' | |
steps: | |
# Checkout code | |
- uses: actions/checkout@main | |
# Log into Azure | |
- uses: azure/login@v2 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
# Deploy Bicep file | |
- name: deploy | |
uses: azure/arm-deploy@v2 | |
with: | |
subscriptionId: ${{ env.SUBSCRIPTION_ID_DEV }} | |
resourceGroupName: ${{ env.RESOURCE_GROUP_DEV }} | |
template: ./main.bicep | |
parameters: ./parameters/uat.parameters.json appServiceAPIEnvVarENV=${{ vars.ENV }} appServiceAPIEnvVarDBHOST=${{ vars.DBHOST }} appServiceAPIEnvVarDBNAME=${{ vars.DBNAME }} appServiceAPIEnvVarDBPASS=${{ secrets.DBPASS }} appServiceAPIDBHostDBUSER=${{ secrets.DBUSER }} appServiceAPIDBHostFLASK_APP=${{ vars.FLASK_APP }} appServiceAPIDBHostFLASK_DEBUG=${{ vars.FLASK_DEBUG }} | |
deploymentName: ${{ env.USER_ALIAS }}-uat |