forked from Azure/avdaccelerator
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (63 loc) · 3.63 KB
/
Deploy-Env.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Deploy AVD to NIH Environment
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Choose environment to deploy
options:
- Test
- Prod
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment: ${{ github.event.inputs.environment }}
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Log into Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
enable-AzPSSession: true
# - name: Deploy Bicep file to ${{ github.event.inputs.environment }} environment
# uses: azure/arm-deploy@v2
# with:
# scope: subscription
# subscriptionId: ${{ secrets.AZURE_SUB_ID }}
# region: eastus
# deploymentMode: 'Validate'
# template: ./workload/bicep/deploy-baseline-arpah.bicep
# parameters: ./workload/bicep/parameters/deploy-baseline-parameters-arpah.json deploymentEnvironment=${{ github.event.inputs.environment }} avdWorkloadSubsId=${{ secrets.AZURE_SUB_ID }} avdVmLocalUserName=${{ secrets.AVD_ADMIN }} avdVmLocalUserPassword=${{ secrets.AVD_ADMINPASS }} avdEnterpriseAppObjectId=${{ secrets.AZURE_AVD_OBJECTID }} existingVnetAvdSubnetResourceId=${{ secrets.AVD_SUBNET_ID }} existingVnetPrivateEndpointSubnetResourceId=${{ secrets.AVD_SUBNET_ID }} identityDomainName=${{ secrets.AD_NAME}} avdDomainJoinUserName=${{ secrets.AD_JOIN_USER }} avdDomainJoinUserPassword=${{ secrets.AD_JOIN_PASS }} avdOuPath="${{ secrets.AD_OU }}" storageOuPath="${{ secrets.AD_OU }}" storageFilePrivateEndpointStaticIp="${{ secrets.STORAGEFILEPRIVATEENDPOINTSTATICIP }}" storageFilePrivateEndpointStaticIpRemote="${{ secrets.STORAGEFILEPRIVATEENDPOINTSTATICIPREMOTE }}"
# failOnStdErr: true
- name: Deploy Bicep file to ${{ github.event.inputs.environment }} environment
uses: azure/arm-deploy@v2
with:
scope: subscription
subscriptionId: ${{ secrets.AZURE_SUB_ID }}
region: eastus
deploymentMode: 'Validate'
template: ./workload/bicep/deploy-test.bicep
parameters: avdWorkloadSubsId=${{ secrets.AZURE_SUB_ID }} avdEnterpriseAppObjectId=${{ secrets.AZURE_AVD_OBJECTID }}
failOnStdErr: true
# - name: Update networking in ${{ github.event.inputs.environment }} environment
# uses: azure/arm-deploy@v2
# with:
# scope: subscription
# subscriptionId: ${{ secrets.AZURE_SUB_ID }}
# region: eastus2
# deploymentMode: 'Validate'
# template: ./workload/bicep/update-networking-arpah.bicep
# parameters: ./workload/bicep/parameters/update-networking-parameters-arpah.json deploymentEnvironment=${{ github.event.inputs.environment }} avdWorkloadSubsId=${{ secrets.AZURE_SUB_ID }} existingVnetAvdSubnetResourceId=${{ secrets.AVD_SUBNET_ID }}"
# failOnStdErr: true
# - name: Update AVD Application Group Display Name in the ${{ github.event.inputs.environment }} environment
# uses: azure/powershell@v2
# env:
# ResourceGroupName: 'avd-nih-arpah-${{ github.event.inputs.environment }}-use2-service-objects'
# ApplicationGroupName: 'vdag-desktop-app1-${{ github.event.inputs.environment }}-use2-001'
# Name: 'SessionDesktop'
# FriendlyName: 'ARPA-H Windows Desktop'
# with:
# inlineScript: ./.github/workflows/scripts/update_app_display_name.ps1 -ResourceGroupName ${{ env.ResourceGroupName }} -ApplicationGroupName ${{ env.ApplicationGroupName }} -Name ${{ env.Name }} -FriendlyName '${{ env.FriendlyName }}'
# azPSVersion: "latest"
# errorActionPreference: continue