-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsingle_deploy_simulation.yml
45 lines (41 loc) · 1.53 KB
/
single_deploy_simulation.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
trigger:
- none
parameters:
- name: azureServiceConnection
displayName: Name of the subscription that contains the resource group
type: string
default: PurpleKeep
- name: resourceGroupName
displayName: Name of the resource group where the VM should be deployed
type: string
default: PurpleKeep
- name: techniqueIds
displayName: Select the (sub-)technique to run (e.g. T1059.003 or T1003)
type: string
default: "T1027,T1049,T1003"
stages:
- template: '/infrastructure/azure-pipelines.yml'
parameters:
azureServiceConnection: '${{ parameters.azureServiceConnection }}'
resourceGroupName: ${{ parameters.resourceGroupName }}
deploymentId: Single_Deploy
- stage: Wait_for_run_Single_Deploy
displayName: Waiting until deployment has been finished
jobs:
- job:
displayName: Wait
steps:
- script: echo Waiting 10min for deployment completion before running the Atomic && sleep 600
- ${{ each technique in split(parameters.techniqueIds, ',') }} :
- template: '/simulation/azure-pipelines.yml'
parameters:
azureServiceConnection: '${{ parameters.azureServiceConnection }}'
resourceGroupName: ${{ parameters.resourceGroupName }}
techniqueId: ${{ replace(technique, '.', '_') }}
- stage: Wait_for_next_${{ replace(technique, '.', '_') }}
displayName: Waiting until the test has finished
jobs:
- job:
displayName: Wait
steps:
- script: echo Waiting 10min for logs to ingest && sleep 600