Skip to content

Commit 200bb5c

Browse files
authored
Merge pull request #325 from galiacheng/hotfix-for-mvn-download
Fix broken maven download link
2 parents 703c5ae + d377b3f commit 200bb5c

File tree

16 files changed

+69
-39
lines changed

16 files changed

+69
-39
lines changed

.github/workflows/buildWlsAksArtifact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
echo "##[set-output name=artifactName;]${artifactName}"
5353
echo "##[set-output name=artifactPath;]weblogic-azure/weblogic-azure-aks/target/$artifactName"
5454
- name: Archive weblogic-azure/weblogic-azure-aks template
55-
uses: actions/upload-artifact@v1
55+
uses: actions/upload-artifact@v4
5656
if: success()
5757
with:
5858
name: ${{steps.artifact_file.outputs.artifactName}}

.github/workflows/buildWlsVm4AsArtifact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
echo "##[set-output name=artifactName;]${artifactName}-${{ env.pidType }}"
9595
echo "##[set-output name=artifactPath;]${{env.repoName}}/weblogic-azure-vm/${{ env.offerName }}/target/$artifactName"
9696
- name: Archive ${{ env.offerName }} template
97-
uses: actions/upload-artifact@v1
97+
uses: actions/upload-artifact@v4
9898
if: success()
9999
with:
100100
name: ${{steps.artifact_file.outputs.artifactName}}

.github/workflows/buildWlsVm4CcArtifact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
echo "##[set-output name=artifactName;]${artifactName}-${{ env.pidType }}"
9393
echo "##[set-output name=artifactPath;]${{env.repoName}}/weblogic-azure-vm/${{ env.offerName }}/${{ env.offerName }}/target/$artifactName"
9494
- name: Archive ${{ env.offerName }} template
95-
uses: actions/upload-artifact@v1
95+
uses: actions/upload-artifact@v4
9696
if: success()
9797
with:
9898
name: ${{steps.artifact_file.outputs.artifactName}}

.github/workflows/buildWlsVm4DcArtifact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
echo "##[set-output name=artifactName;]${artifactName}-${{ env.pidType }}"
9191
echo "##[set-output name=artifactPath;]${{env.repoName}}/weblogic-azure-vm/${{ env.offerName }}/${{ env.offerName }}/target/$artifactName"
9292
- name: Archive ${{ env.offerName }} template
93-
uses: actions/upload-artifact@v1
93+
uses: actions/upload-artifact@v4
9494
if: success()
9595
with:
9696
name: ${{steps.artifact_file.outputs.artifactName}}

.github/workflows/buildWlsVm4SnArtifact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
echo "##[set-output name=artifactName;]${artifactName}-${{ env.pidType }}"
8787
echo "##[set-output name=artifactPath;]${{env.repoName}}/weblogic-azure-vm/${{ env.offerName }}/target/$artifactName"
8888
- name: Archive ${{ env.offerName }} template
89-
uses: actions/upload-artifact@v1
89+
uses: actions/upload-artifact@v4
9090
if: success()
9191
with:
9292
name: ${{steps.artifact_file.outputs.artifactName}}

.github/workflows/setupWlsAksDependency.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
{"event_type": "aks-integration-test-without-dependency-creation", "client_payload": {"gitUserNameForArtifactsLocation": "${{ github.repository_owner }}", "testBranchNameForArtifactsLocation": "${{ github.ref }}", "isForDemo": "false", "disambiguationSuffix": "${{ github.run_id }}", "storageAccountName": "${{ env.storageAccountName }}", "storageContainerName": "${{ env.storageContainerName }}", "dbName": "${{ env.dbName }}"}}
102102
EOF
103103
- name: Archive integration-test-data.txt
104-
uses: actions/upload-artifact@v1
104+
uses: actions/upload-artifact@v4
105105
if: success()
106106
with:
107107
name: integration-test-data

.github/workflows/testWlsAksWithDependencyCreation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
echo "##[set-output name=artifactName;]${artifactName}"
126126
echo "##[set-output name=artifactPath;]weblogic-azure/weblogic-azure-aks/target/$artifactName"
127127
- name: Archive weblogic-azure/weblogic-azure-aks template
128-
uses: actions/upload-artifact@v1
128+
uses: actions/upload-artifact@v4
129129
if: success()
130130
with:
131131
name: ${{steps.artifact_file.outputs.artifactName}}

.github/workflows/testWlsAksWithoutDependencyCreation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
echo "##[set-output name=artifactName;]${artifactName}"
150150
echo "##[set-output name=artifactPath;]weblogic-azure/weblogic-azure-aks/target/$artifactName"
151151
- name: Archive weblogic-azure/weblogic-azure-aks template
152-
uses: actions/upload-artifact@v1
152+
uses: actions/upload-artifact@v4
153153
if: success()
154154
with:
155155
name: ${{steps.artifact_file.outputs.artifactName}}

.github/workflows/testWlsVmAdmin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ jobs:
163163
run: unzip ${{ env.adminOfferPath }}/target/$artifactName.zip -d ${{ env.adminOfferPath }}/target/$artifactName
164164

165165
- name: Archive ${{ env.offerName }} template
166-
uses: actions/upload-artifact@v1
166+
uses: actions/upload-artifact@v4
167167
if: success()
168168
with:
169169
name: ${{steps.artifact_file.outputs.artifactName}}

.github/workflows/testWlsVmCluster.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
echo "##[set-output name=artifactName;]${artifactName}"
150150
echo "##[set-output name=artifactPath;]${{ env.offerPath }}/${{ env.offerName }}/target/$artifactName"
151151
- name: Archive ${{ env.offerName }} template
152-
uses: actions/upload-artifact@v1
152+
uses: actions/upload-artifact@v4
153153
if: success()
154154
with:
155155
name: ${{steps.artifact_file.outputs.artifactName}}
@@ -165,7 +165,7 @@ jobs:
165165
echo "##[set-output name=addnode_artifactName;]${addnode_artifactName}"
166166
echo "##[set-output name=addnode_artifactPath;]${{ env.offerPath }}/addnode/target/$addnode_artifactName"
167167
- name: Archive ${{ env.offerName }} addnode template
168-
uses: actions/upload-artifact@v1
168+
uses: actions/upload-artifact@v4
169169
if: success()
170170
with:
171171
name: ${{steps.addnode_artifact_file.outputs.addnode_artifactName}}
@@ -181,7 +181,7 @@ jobs:
181181
echo "##[set-output name=deletenode_artifactPath;]${{ env.offerPath }}/deletenode/target/$deletenode_artifactName"
182182
183183
- name: Archive ${{ env.offerName }} deletenode template
184-
uses: actions/upload-artifact@v1
184+
uses: actions/upload-artifact@v4
185185
if: success()
186186
with:
187187
name: ${{steps.deletenode_artifact_file.outputs.deletenode_artifactName}}
@@ -197,7 +197,7 @@ jobs:
197197
echo "##[set-output name=addnode_coherence_artifactPath;]${{ env.offerPath }}/addnode-coherence/target/$addnode_coherence_artifactName"
198198
199199
- name: Archive ${{ env.offerName }} addnode-coherence template
200-
uses: actions/upload-artifact@v1
200+
uses: actions/upload-artifact@v4
201201
if: success()
202202
with:
203203
name: ${{steps.addnode_coherence_artifact_file.outputs.addnode_coherence_artifactName}}

.github/workflows/testWlsVmDynamicCluster.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
echo "##[set-output name=artifactName;]${artifactName}"
129129
echo "##[set-output name=artifactPath;]${offerPath}/${{ env.offerName }}/target/$artifactName"
130130
- name: Archive ${{env.offerName}} template
131-
uses: actions/upload-artifact@v1
131+
uses: actions/upload-artifact@v4
132132
if: success()
133133
with:
134134
name: ${{steps.artifact_file.outputs.artifactName}}
@@ -143,7 +143,7 @@ jobs:
143143
echo "##[set-output name=addnode_artifactName;]${addnode_artifactName}"
144144
echo "##[set-output name=addnode_artifactPath;]${offerPath}/addnode/target/$addnode_artifactName"
145145
- name: Archive ${{env.offerName}} addnode template
146-
uses: actions/upload-artifact@v1
146+
uses: actions/upload-artifact@v4
147147
if: success()
148148
with:
149149
name: ${{steps.addnode_artifact_file.outputs.addnode_artifactName}}
@@ -159,7 +159,7 @@ jobs:
159159
echo "##[set-output name=deletenode_artifactPath;]${offerPath}/deletenode/target/$deletenode_artifactName"
160160
161161
- name: Archive ${{env.offerName}} deletenode template
162-
uses: actions/upload-artifact@v1
162+
uses: actions/upload-artifact@v4
163163
if: success()
164164
with:
165165
name: ${{steps.deletenode_artifact_file.outputs.deletenode_artifactName}}
@@ -175,7 +175,7 @@ jobs:
175175
echo "##[set-output name=addnode_coherence_artifactPath;]${offerPath}/addnode-coherence/target/$addnode_coherence_artifactName"
176176
177177
- name: Archive ${{env.offerName}} addnode-coherence template
178-
uses: actions/upload-artifact@v1
178+
uses: actions/upload-artifact@v4
179179
if: success()
180180
with:
181181
name: ${{steps.addnode_coherence_artifact_file.outputs.addnode_coherence_artifactName}}

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
<version.wls-on-aks-azure-marketplace>1.0.81</version.wls-on-aks-azure-marketplace>
4444
<!-- weblogic azure vm versions -->
4545
<version.arm-oraclelinux-wls>1.0.28</version.arm-oraclelinux-wls>
46-
<version.arm-oraclelinux-wls-admin>1.0.52</version.arm-oraclelinux-wls-admin>
47-
<version.arm-oraclelinux-wls-cluster>1.0.680000</version.arm-oraclelinux-wls-cluster>
48-
<version.arm-oraclelinux-wls-dynamic-cluster>1.0.51</version.arm-oraclelinux-wls-dynamic-cluster>
46+
<version.arm-oraclelinux-wls-admin>1.0.53</version.arm-oraclelinux-wls-admin>
47+
<version.arm-oraclelinux-wls-cluster>1.0.690000</version.arm-oraclelinux-wls-cluster>
48+
<version.arm-oraclelinux-wls-dynamic-cluster>1.0.52</version.arm-oraclelinux-wls-dynamic-cluster>
4949
<!-- node versions -->
5050
<version.arm-oraclelinux-wls-dynamic-cluster-addnode>1.0.7</version.arm-oraclelinux-wls-dynamic-cluster-addnode>
5151
<version.arm-oraclelinux-wls-dynamic-cluster-addnode-coherence>1.0.3</version.arm-oraclelinux-wls-dynamic-cluster-addnode-coherence>

resources/azure-common.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ azure.apiVersionForInsightsWorkspaces=2022-10-01
3535
# Microsoft.Resources/deploymentScripts
3636
azure.apiVersionForDeploymentScript=2023-08-01
3737
# Microsoft.Resources/deployments
38-
azure.apiVersionForDeployment=2022-09-01
38+
azure.apiVersionForDeployment=2023-07-01
3939
# Microsoft.Resources/tags
4040
azure.apiVersionForTags=2023-07-01
4141
# Microsoft.Storage/storageAccounts

weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/scripts/installJdbcDrivers.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,17 @@ function validate_input() {
6767
}
6868

6969
function install_maven() {
70-
curl -m ${curlMaxTime} --retry ${retryMaxAttempt} -fksL "${url4MavenInstaller}" -o ${mvnInstaller}
70+
local mavenUrl=$(curl -Ls -o /dev/null -w %{url_effective} ${url4MavenInstaller})
7171
if [ $? != 0 ]; then
72-
echo_stderr "Failed to download ${url4MavenInstaller}."
72+
echo_stderr "Failed to get maven download url."
73+
fi
74+
curl -m ${curlMaxTime} --retry ${retryMaxAttempt} -fksL "${mavenUrl}" -o ${mvnInstaller}
75+
if [ $? != 0 ]; then
76+
echo_stderr "Failed to download ${mavenUrl}."
7377
fi
7478

7579
tar xzvf ${mvnInstaller} -C /u01/app
76-
export MAVEN_HOME=/u01/app/apache-maven-${mvnVersion}
80+
export MAVEN_HOME=$(find /u01/app -maxdepth 1 -type d -name "apache-maven*")
7781
. $oracleHome/oracle_common/common/bin/setWlstEnv.sh # set JAVA_HOME
7882
export PATH=${MAVEN_HOME}/bin:$PATH
7983

@@ -239,10 +243,16 @@ read oracleHome domainPath wlsServerName wlsAdminHost wlsAdminPort wlsUserName w
239243
export curlMaxTime=120 # seconds
240244
export gitUrl4AzureIdentityExtensionPomFile="https://raw.githubusercontent.com/oracle/weblogic-azure/main/weblogic-azure-aks/src/main/resources/azure-identity-extensions.xml"
241245
export gitUrl4MySQLDriverPomFile="https://raw.githubusercontent.com/oracle/weblogic-azure/main/weblogic-azure-aks/src/main/resources/mysql-connector-java.xml"
242-
export mvnVersion="3.9.0"
243-
export mvnInstaller="apache-maven-${mvnVersion}-bin.tar.gz"
244246
export retryMaxAttempt=5 # retry attempt for curl command
245-
export url4MavenInstaller="https://dlcdn.apache.org/maven/maven-3/${mvnVersion}/binaries/${mvnInstaller}"
247+
export mvnInstaller="apache-maven-bin.tar.gz"
248+
249+
# 2024-09-11 https://github.com/oracle/weblogic-azure/pull/325
250+
# Increase maintainability by putting URL behind redirector. As of today
251+
# target is https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
252+
# A better solution would be if Oracle had an employee accessible URL redirector
253+
# service similar to Microsoft's aka.ms.
254+
255+
export url4MavenInstaller="https://aka.ms/wls-offer-maven-download-url"
246256
export wlsAdminURL=$wlsAdminHost:$wlsAdminPort
247257

248258
validate_input

weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/scripts/installJdbcDrivers.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,17 @@ function validate_input() {
6767
}
6868

6969
function install_maven() {
70-
curl -m ${curlMaxTime} --retry ${retryMaxAttempt} -fksL "${url4MavenInstaller}" -o ${mvnInstaller}
70+
local mavenUrl=$(curl -Ls -o /dev/null -w %{url_effective} ${url4MavenInstaller})
7171
if [ $? != 0 ]; then
72-
echo_stderr "Failed to download ${url4MavenInstaller}."
72+
echo_stderr "Failed to get maven download url."
73+
fi
74+
curl -m ${curlMaxTime} --retry ${retryMaxAttempt} -fksL "${mavenUrl}" -o ${mvnInstaller}
75+
if [ $? != 0 ]; then
76+
echo_stderr "Failed to download ${mavenUrl}."
7377
fi
7478

7579
tar xzvf ${mvnInstaller} -C /u01/app
76-
export MAVEN_HOME=/u01/app/apache-maven-${mvnVersion}
80+
export MAVEN_HOME=$(find /u01/app -maxdepth 1 -type d -name "apache-maven*")
7781
. $oracleHome/oracle_common/common/bin/setWlstEnv.sh # set JAVA_HOME
7882
export PATH=${MAVEN_HOME}/bin:$PATH
7983

@@ -239,10 +243,16 @@ read oracleHome domainPath wlsServerName wlsAdminHost wlsAdminPort wlsUserName w
239243
export curlMaxTime=120 # seconds
240244
export gitUrl4AzureIdentityExtensionPomFile="https://raw.githubusercontent.com/oracle/weblogic-azure/main/weblogic-azure-aks/src/main/resources/azure-identity-extensions.xml"
241245
export gitUrl4MySQLDriverPomFile="https://raw.githubusercontent.com/oracle/weblogic-azure/main/weblogic-azure-aks/src/main/resources/mysql-connector-java.xml"
242-
export mvnVersion="3.9.0"
243-
export mvnInstaller="apache-maven-${mvnVersion}-bin.tar.gz"
244246
export retryMaxAttempt=5 # retry attempt for curl command
245-
export url4MavenInstaller="https://dlcdn.apache.org/maven/maven-3/${mvnVersion}/binaries/${mvnInstaller}"
247+
export mvnInstaller="apache-maven-bin.tar.gz"
248+
249+
# 2024-09-11 https://github.com/oracle/weblogic-azure/pull/325
250+
# Increase maintainability by putting URL behind redirector. As of today
251+
# target is https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
252+
# A better solution would be if Oracle had an employee accessible URL redirector
253+
# service similar to Microsoft's aka.ms.
254+
255+
export url4MavenInstaller="https://aka.ms/wls-offer-maven-download-url"
246256
export wlsAdminURL=$wlsAdminHost:$wlsAdminPort
247257

248258
validate_input

weblogic-azure-vm/arm-oraclelinux-wls-dynamic-cluster/arm-oraclelinux-wls-dynamic-cluster/src/main/scripts/installJdbcDrivers.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,17 @@ function validate_input() {
6767
}
6868

6969
function install_maven() {
70-
curl -m ${curlMaxTime} --retry ${retryMaxAttempt} -fksL "${url4MavenInstaller}" -o ${mvnInstaller}
70+
local mavenUrl=$(curl -Ls -o /dev/null -w %{url_effective} ${url4MavenInstaller})
7171
if [ $? != 0 ]; then
72-
echo_stderr "Failed to download ${url4MavenInstaller}."
72+
echo_stderr "Failed to get maven download url."
73+
fi
74+
curl -m ${curlMaxTime} --retry ${retryMaxAttempt} -fksL "${mavenUrl}" -o ${mvnInstaller}
75+
if [ $? != 0 ]; then
76+
echo_stderr "Failed to download ${mavenUrl}."
7377
fi
7478

7579
tar xzvf ${mvnInstaller} -C /u01/app
76-
export MAVEN_HOME=/u01/app/apache-maven-${mvnVersion}
80+
export MAVEN_HOME=$(find /u01/app -maxdepth 1 -type d -name "apache-maven*")
7781
. $oracleHome/oracle_common/common/bin/setWlstEnv.sh # set JAVA_HOME
7882
export PATH=${MAVEN_HOME}/bin:$PATH
7983

@@ -239,10 +243,16 @@ read oracleHome domainPath wlsServerName wlsAdminHost wlsAdminPort wlsUserName w
239243
export curlMaxTime=120 # seconds
240244
export gitUrl4AzureIdentityExtensionPomFile="https://raw.githubusercontent.com/oracle/weblogic-azure/main/weblogic-azure-aks/src/main/resources/azure-identity-extensions.xml"
241245
export gitUrl4MySQLDriverPomFile="https://raw.githubusercontent.com/oracle/weblogic-azure/main/weblogic-azure-aks/src/main/resources/mysql-connector-java.xml"
242-
export mvnVersion="3.9.0"
243-
export mvnInstaller="apache-maven-${mvnVersion}-bin.tar.gz"
244246
export retryMaxAttempt=5 # retry attempt for curl command
245-
export url4MavenInstaller="https://dlcdn.apache.org/maven/maven-3/${mvnVersion}/binaries/${mvnInstaller}"
247+
export mvnInstaller="apache-maven-bin.tar.gz"
248+
249+
# 2024-09-11 https://github.com/oracle/weblogic-azure/pull/325
250+
# Increase maintainability by putting URL behind redirector. As of today
251+
# target is https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
252+
# A better solution would be if Oracle had an employee accessible URL redirector
253+
# service similar to Microsoft's aka.ms.
254+
255+
export url4MavenInstaller="https://aka.ms/wls-offer-maven-download-url"
246256
export wlsAdminURL=$wlsAdminHost:$wlsAdminPort
247257

248258
validate_input

0 commit comments

Comments
 (0)