27
27
dbAdminUser : weblogic
28
28
dbPassword : ${{ secrets.DB_PASSWORD }}
29
29
dbName : wlsdb${{ github.run_id }}${{ github.run_number }}
30
+ dbServerName : weblogicdb
30
31
ocrSSOPSW : ${{ secrets.ORC_SSOPSW }}
31
32
ocrSSOUser : ${{ secrets.ORC_SSOUSER }}
32
33
wdtRuntimePassword : ${{ secrets.WDT_RUNTIMEPSW}}
@@ -44,18 +45,25 @@ jobs:
44
45
isForDemo : ${{ steps.setup-env-variables-based-on-dispatch-event.outputs.isForDemo }}
45
46
gitUserNameForArtifactsLocation : ${{ steps.setup-env-variables-based-on-dispatch-event.outputs.gitUserNameForArtifactsLocation }}
46
47
testBranchNameForArtifactsLocation : ${{ steps.setup-env-variables-based-on-dispatch-event.outputs.testBranchNameForArtifactsLocation }}
47
- azCliVersion : ${{steps.get-external-dependencies -version.outputs.azCliVersion}}
48
+ azCliVersion : ${{steps.set-az-cli -version.outputs.azCliVersion}}
48
49
runs-on : ubuntu-latest
49
50
steps :
51
+
52
+ - name : Set AZ CLI Version and save in variable azCliVersion
53
+ uses : ./.github/actions/setvars
54
+ with :
55
+ varFilePath : ./.github/variables/vm-dependencies.env
56
+ - name : Output Az CLi version
57
+ id : set-az-cli-version
58
+ run : |
59
+ echo "azCliVersion=${azCliVersion}" >> $GITHUB_OUTPUT
50
60
- name : Get versions of external dependencies
51
61
id : get-external-dependencies-version
52
62
run : |
53
63
curl -Lo external-deps-versions.properties https://raw.githubusercontent.com/Azure/azure-javaee-iaas/main/external-deps-versions.properties
54
64
source external-deps-versions.properties
55
- echo "azCliVersion=${AZ_CLI_VERSION}" >> $GITHUB_ENV
56
65
echo "bicepVersion=${BICEP_VERSION}" >> $GITHUB_ENV
57
66
echo "refArmttk=${ARM_TTK_REFERENCE}" >> $GITHUB_ENV
58
- echo "azCliVersion=${AZ_CLI_VERSION}" >> $GITHUB_OUTPUT
59
67
- name : Setup environment variables
60
68
id : setup-env-variables-based-on-dispatch-event
61
69
run : |
@@ -131,30 +139,18 @@ jobs:
131
139
inlineScript : |
132
140
echo "create resource group" ${{ env.resourceGroupForDB }}
133
141
az group create --verbose --name ${{ env.resourceGroupForDB }} --location ${{ env.location }}
134
- - name : Set Up Azure Postgresql to Test dbTemplate
135
- id : setup-postgresql
136
- uses : azure/CLI@v1
142
+
143
+
144
+ - name : Set up PostgreSQL Flexible Server that allows access from Azure services
145
+ uses : ./.github/actions/createPostgresqlFlexibleServer
137
146
with :
138
- azcliversion : ${{ env.azCliVersion }}
139
- inlineScript : |
140
- echo "Deploy DB with name " ${{ env.dbName }}
141
- az postgres server create \
142
- --resource-group ${{ env.resourceGroupForDB }} \
143
- --name ${{ env.dbName }} \
144
- --location ${{ env.location }} \
145
- --admin-user ${{ env.dbAdminUser }} \
146
- --ssl-enforcement Enabled \
147
- --public-network-access Enabled \
148
- --admin-password ${{ env.dbPassword }} \
149
- --sku-name B_Gen5_1
150
- sleep 2m
151
- echo "Allow Access To Azure Services"
152
- az postgres server firewall-rule create \
153
- -g ${{ env.resourceGroupForDB }} \
154
- -s ${{ env.dbName }} \
155
- -n "AllowAllWindowsAzureIps" \
156
- --start-ip-address "0.0.0.0" \
157
- --end-ip-address "0.0.0.0"
147
+ dbAdminUser : ${{ env.dbAdminUser }}
148
+ dbName : ${{ env.dbName }}
149
+ dbPassword : ${{ env.dbPassword }}
150
+ dbServerName : ${{ env.dbServerName }}
151
+ location : ${{ env.location }}
152
+ resourceGroupName : ${{ env.resourceGroupForDB }}
153
+
158
154
deploy-storage-account :
159
155
needs : preflight
160
156
runs-on : ubuntu-latest
@@ -269,8 +265,8 @@ jobs:
269
265
${{ needs.preflight.outputs.testBranchNameForArtifactsLocation }} \
270
266
"${cargoTrackerBlobUrl}" \
271
267
${dbPassword} \
272
- ${dbAdminUser}@${dbName} \
273
- jdbc:postgresql:\/\/${dbName}.postgres.database.azure.com:5432\/postgres \
268
+ ${dbAdminUser} \
269
+ jdbc:postgresql:\/\/${dbName}.postgres.database.azure.com:5432\/${{ env.dbServerName }} \
274
270
${location} \
275
271
${ocrSSOPSW} \
276
272
${ocrSSOUser} \
0 commit comments