1
1
name : " Oracle: Release Update"
2
- run-name : " Oracle: ${{ github.event.inputs.TargetEnvironment }}-release-update"
3
2
on :
4
3
workflow_dispatch :
5
4
inputs :
46
45
required : true
47
46
type : choice
48
47
options :
49
- - " /u01/software/19c/patches "
48
+ - " /u02/stage "
50
49
ComboPatch :
51
50
description : " Combo Patch to Install (default = use value from environment configuration)"
52
51
required : true
55
54
- " default"
56
55
- " 34773504:p34773504_190000_Linux-x86-64.zip:(19.18)"
57
56
- " 35370167:p35370167_190000_Linux-x86-64.zip:(19.20)"
57
+ - " 36031453:p36031453_190000_Linux-x86-64.zip:(19.22)"
58
58
OPatch :
59
59
description : " OPatch Utility to Use (default = use value from environment configuration)"
60
60
required : true
61
61
type : choice
62
62
options :
63
63
- " default"
64
- - " 6880880:p6880880_190000_Linux-x86-64.12.2.0.1.29.zip:(12.2.0.1.29)"
65
- - " 6880880:p6880880_190000_Linux-x86-64.12.2.0.1.32.zip:(12.2.0.1.32)"
66
64
- " 6880880:p6880880_190000_Linux-x86-64.12.2.0.1.36.zip:(12.2.0.1.36)"
65
+ - " 6880880:p6880880_190000_Linux-x86-64.12.2.0.1.36.zip:(12.2.0.1.39)"
66
+ - " 6880880:p6880880_190000_Linux-x86-64.12.2.0.1.41.zip:(12.2.0.1.41)"
67
67
AWSSnapshot :
68
68
description : " Number of Days to Keep AWS Snapshot of Primary Database Host"
69
69
required : true
91
91
type : string
92
92
default : " main"
93
93
94
+ run-name : " Oracle: ${{ format('{0}-release-update-{1}',github.event.inputs.TargetEnvironment,tojson(inputs)) }}"
95
+
94
96
env :
95
97
ansible_config : operations/playbooks/ansible.cfg
96
98
command : ansible-playbook operations/playbooks/oracle_release_update/playbook.yml
@@ -130,21 +132,18 @@ jobs:
130
132
ref : ${{ github.event.inputs.SourceConfigVersion }}
131
133
fetch-depth : 0
132
134
133
- - name : Install yq
134
- uses : dcarbone/install-yq-action@v1.1.1
135
+ - name : Checkout Role From modernisation-platform-configuration-management
136
+ uses : actions/checkout@v4
135
137
with :
136
- download-compressed : true
137
- version : " v4.35.1"
138
- force : true
139
-
140
- - name : Count Standby Databases Configured In Ansible Inventory
141
- id : countstandbydbs
142
- working-directory : ${{ env.inventory }}
143
- run : |
144
- database_environment="environment_name_$(echo ${{ github.event.inputs.TargetEnvironment}} | sed 's/delius-core-dev/delius_core_development_dev/;s/delius-core-test/delius_core_test_test/;s/delius-core-training/delius_core_test_training/;s/delius-core-stage/delius_core_preproduction_stage/;s/delius-core-pre-prod/delius_core_preproduction_pre_prod/;s/delius-core-prod/delius_core_production_prod/')"
145
- database_type=$(echo ${{ github.event.inputs.TargetHost }} | cut -d_ -f1)
146
- high_availability_count=$(yq .high_availability_count.${database_type} group_vars/${database_environment}_all.yml)
147
- echo "high_availability_count=$high_availability_count"
138
+ repository : ministryofjustice/modernisation-platform-configuration-management
139
+ sparse-checkout-cone-mode : false
140
+ sparse-checkout : |
141
+ ansible/roles/secretsmanager-passwords
142
+ ansible/roles/get-ec2-facts
143
+ ansible/roles/get-modernisation-platform-facts
144
+ path : roles
145
+ ref : ${{ github.event.inputs.SourceConfigVersion }}
146
+ fetch-depth : 0
148
147
149
148
- name : Checkout From hmpps-delius-operational-automation
150
149
uses : actions/checkout@v4
@@ -153,6 +152,8 @@ jobs:
153
152
sparse-checkout-cone-mode : false
154
153
sparse-checkout : |
155
154
playbooks/oracle_release_update
155
+ playbooks/delius_oem_metrics_setup
156
+ common/*
156
157
ansible.cfg
157
158
path : operations
158
159
ref : ${{ github.event.inputs.SourceCodeVersion }}
@@ -176,13 +177,17 @@ jobs:
176
177
- name : Run Release Update Playbook
177
178
run : |
178
179
export ANSIBLE_CONFIG=$ansible_config
180
+ # Link the checked out configuration roles to somewhere Ansible will be able to find them
181
+ ln -svf $PWD/roles/ansible/roles $PWD/operations/playbooks/oracle_release_update/roles
182
+ # Link the OEM Metrics Setup Play to allow it to be used as a role
183
+ ln -svf $PWD/operations/playbooks/delius_oem_metrics_setup/delius_oem_metrics_setup $PWD/roles/ansible/roles/delius_oem_metrics_setup
179
184
$command -i $inventory \
180
- -e target_hosts=${{ steps.prepareinventorynames.outputs.hosts }}
181
- -e apply_mode=${{ github.event.inputs.ApplyMode }}
182
- -e oracle_patch_directory=${{ github.event.inputs.OraclePatchDirectory }}
183
- -e combo_patch_info=${{ github.event.inputs.ComboPatchInfo }}
184
- -e opatch_info=${{github.event.inputs.Opatch }}
185
- -e "keep_aws_snapshot='${{github.event.inputs.AWSSnapShot }}'"
186
- -e high_availability_count=${{ steps.countstandbydbs.outputs.high_availability_count }}
187
- -e gi_ru_patch_info=''
185
+ -e target_hosts=${{ steps.prepareinventorynames.outputs.hosts }} \
186
+ -e apply_mode=${{ github.event.inputs.ApplyMode }} \
187
+ -e oracle_patch_directory=${{ github.event.inputs.OraclePatchDirectory }} \
188
+ -e combo_patch_info=' ${{ github.event.inputs.ComboPatch }}' \
189
+ -e opatch_info=' ${{github.event.inputs.Opatch }}' \
190
+ -e "keep_aws_snapshot='${{github.event.inputs.AWSSnapShot }}'" \
191
+ -e high_availability_count=${{ steps.countstandbydbs.outputs.high_availability_count }} \
192
+ -e gi_ru_patch_info='' \
188
193
-e ojvm_ru_patch_info=''
0 commit comments