Skip to content

Commit fd07265

Browse files
authored
Fix failures in ItMiiSample test (#2296)
* select url with specified ZIPFILE * use direct download links
1 parent b3d6306 commit fd07265

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

operator/integration-tests/model-in-image/mii-sample-wrapper/stage-tooling.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,27 +60,28 @@ download_zip() {
6060
return
6161
fi
6262

63-
echo "@@ Info: Downloading '$LOCATION' to '$WORKDIR/$ZIPFILE'."
63+
echo "@@ Info: Downloading $ZIPFILE from '$LOCATION' to '$WORKDIR/$ZIPFILE'."
6464

6565
local iurl="$LOCATION"
6666
if [ "`echo $iurl | grep -c 'https://github.com.*/latest$'`" = "1" ]; then
6767
echo "@@ Info: The location URL matches regex 'https://github.com.*/latest$'. About to convert to direct location."
68-
local tempfile="$(mktemp -u).$(basename $0).$SECONDS.$PPID.$RANDOM"
69-
echo "@@ Info: Calling 'curl $curl_parms -fL $LOCATION -o $tempfile' to find location of latest version."
70-
curl $curl_parms -fL $LOCATION -o $tempfile
71-
LOCATION=https://github.com/$(cat $tempfile | grep "releases/download" | awk '{ split($0,a,/href="/); print a[2]}' | cut -d\" -f 1)
72-
rm -f $tempfile
68+
if [ "$DOWNLOAD_VAR_NAME" == "DOWNLOAD_WDT" ]; then
69+
LOCATION=https://github.com/oracle/weblogic-deploy-tooling/releases/latest/download/
70+
fi
71+
if [ "$DOWNLOAD_VAR_NAME" == "DOWNLOAD_WIT" ]; then
72+
LOCATION=https://github.com/oracle/weblogic-image-tool/releases/latest/download/
73+
fi
7374
echo "@@ Info: The location URL matched regex 'https://github.com.*/latest$' so it was converted to '$LOCATION'"
7475
echo "@@ Info: Now downloading '$LOCATION' to '$WORKDIR/$ZIPFILE'."
7576
fi
7677

7778
if [ ! "$dry_run" = "true" ]; then
7879
rm -f $ZIPFILE
79-
echo "@@ Info: Calling 'curl $curl_parms -fL $LOCATION -o $ZIPFILE'"
80-
curl $curl_parms -fL $LOCATION -o $ZIPFILE
80+
echo "@@ Info: Calling 'curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE'"
81+
curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE
8182
else
8283
echo "dryrun:rm -f $ZIPFILE"
83-
echo "dryrun:curl $curl_parms -fL $LOCATION -o $ZIPFILE"
84+
echo "dryrun:curl $curl_parms -fL $LOCATION/$ZIPFILE -o $ZIPFILE"
8485
fi
8586
}
8687

0 commit comments

Comments
 (0)