-
Notifications
You must be signed in to change notification settings - Fork 53
96 lines (91 loc) · 3.49 KB
/
z_deploy_only_callable.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name : Deploy Only Callable Workflow
on:
workflow_call:
inputs:
resource_group:
description: 'Name of the resource group to deploy in - In case of an existing resource group the environment will be updated'
required: true
default: 'AUTO_GENERATED'
type: string
location:
description: 'Azure location where to deploy to - default to westeurope'
required: true
default: 'westeurope'
type: string
scheduler:
description: 'Job Scheduler to be installed : openpbs/slurm'
required: true
default: 'slurm' # use it with ${{ inputs.scheduler }}
type: string
home_type:
description: 'Home directory type anf/azurefiles- Default to anf'
required: false
default: 'anf' # use it with ${{ inputs.home_type }}
type: string
user_auth:
description: 'User Authentication: local/ad - Default to ad'
required: false
default: 'ad' # use it with ${{ inputs.user_auth }}
type: string
deploy_with:
description: 'Method used for the deployment - tf, bicep or arm - Default to bicep'
required: false
default: 'bicep' # use it with ${{ inputs.deploy_with }}
type: string
monitoring:
description: 'Monitoring agent - ama, grafana, none - Default to grafana'
required: false
default: 'grafana' # use it with ${{ inputs.monitoring }}
type: string
clean:
description: 'Clean all resources'
required: false
default: 'true' # use it with ${{ inputs.clean }}
type: string
secrets:
ARM_SUBSCRIPTION_ID:
required: true
ARM_TENANT_ID:
required: true
REGISTRY_USERNAME:
required: true
REGISTRY_PASSWORD:
required: true
jobs:
create_config:
uses: ./.github/workflows/z_create_config_callable.yml #azure/az-hop/.github/workflows/z_create_config_callable.yml@main
with:
resource_group: ${{ inputs.resource_group }}
location: ${{ inputs.location }}
scheduler: ${{ inputs.scheduler }}
lustre: 'false'
home_type: ${{ inputs.home_type }}
user_auth: ${{ inputs.user_auth }}
monitoring: ${{ inputs.monitoring }}
secrets:
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
deploy:
uses: ./.github/workflows/z_deploy_callable.yml # azure/az-hop/.github/workflows/z_deploy_callable.yml@main
needs: create_config
with:
resource_group: ${{ needs.create_config.outputs.resource_group }}
deploy_with: ${{ inputs.deploy_with }}
secrets:
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
destroy:
uses: ./.github/workflows/z_destroy_callable.yml # azure/az-hop/.github/workflows/z_destroy_callable.yml@main
if: always() && inputs.clean == 'true'
needs: [create_config, deploy]
with:
resource_group: ${{ needs.create_config.outputs.resource_group }}
secrets:
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}