-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
32 lines (26 loc) · 1.66 KB
/
azure-pipelines.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
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger: none
parameters:
- name: ServiceConnection_name
type: string
default: dvh-geosynk-nk-prod2
variables:
ServiceConnection: ${{parameters.ServiceConnection_name}}
pool:
vmImage: ubuntu-latest
steps:
- task: AzureCLI@2
displayName: Azure CLI
inputs:
azureSubscription: $(ServiceConnection)
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
az account set -s nk-prod2
az vm create -n qmsdvhvm -g $(ServiceConnection) --image Win2019Datacenter --public-ip-address-dns-name qmsdvhvm --public-ip-address-allocation static --admin-username sjef --admin-password qMSttyhacSpvU7 --size Standard_D4_v3 --location westeurope
az postgres flexible-server create --location westeurope -g $(ServiceConnection) -n geosynk-dvh-prod --admin-user postgres --admin-password JrgGTduKT-oq --sku-name Standard_D2s_v3 --tier GeneralPurpose --public-access 0.0.0.0 --storage-size 128 --version 11
az vm run-command invoke --command-id RunPowerShellScript --name qmsdvhvm -g $(ServiceConnection) --scripts "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))"
az vm run-command invoke --command-id RunPowerShellScript --name qmsdvhvm -g $(ServiceConnection) --scripts "c:\ProgramData\chocolatey\bin\choco install -y vcredist2017 psqlodbc"