Skip to content

Commit 4bb65f6

Browse files
committed
Undo copying wdt custom file and clean up extract logic
1 parent 887414d commit 4bb65f6

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

operator/src/main/resources/scripts/modelInImage.sh

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,26 +1319,18 @@ restoreAppAndLibs() {
13191319
exitOrLoop
13201320
fi
13211321

1322-
# expand the archive apps and shared lib to the wlsdeploy/* directories
1323-
# the config.xml is referencing them from that path
1324-
# exclude standalone app module in wlsdeploy/applications/*.xml since it is included int zipped up domain config
1325-
# zip, the original xml in the archive may have wdt tokenized notations.
1322+
# expand the archive apps, shared lib and other wlsdeploy/* directories
1323+
# exclude directories that are already expanded separately and already included in domain config zip
1324+
# wlsdeploy/domainBin, wlsdeploy/domainLibraries, config/ - avoid confusion but no harm
1325+
# wlsdeploy/applications/*.xml since it is included int zipped up domain config
1326+
# zip, the original xml in the archive may have wdt tokenized notations.
13261327
cd ${DOMAIN_HOME} || return 1
1327-
unzip -o ${IMG_ARCHIVES_ROOTDIR}/${file} -x "wlsdeploy/domainBin/*"
1328+
unzip -o ${IMG_ARCHIVES_ROOTDIR}/${file} -x "wlsdeploy/domainBin/*" -x "wlsdeploy/domainLibraries/*" -x "wlsdeploy/applications/*.xml" -x "config/*"
13281329
if [ $? -ne 0 ] ; then
13291330
trace SEVERE "Domain Source Type is FromModel, error in extracting application archive ${IMG_ARCHIVES_ROOTDIR}/${file}"
13301331
return 1
13311332
fi
13321333

1333-
if versionGE ${WDT_VERSION} "4.0.0" ; then
1334-
trace INFO "Newer version of WDT 4.0.0 - check if there is old archive format of these files"
1335-
if [ -d ${DOMAIN_HOME}/wlsdeploy/custom ] ; then
1336-
# copy to under DOMAIN_HOME/config
1337-
mkdir -p ${DOMAIN_HOME}/config/wlsdeploy/custom
1338-
cp -R ${DOMAIN_HOME}/wlsdeploy/custom/* ${DOMAIN_HOME}/config/wlsdeploy/custom
1339-
fi
1340-
1341-
fi
13421334
done
13431335

13441336
}
@@ -1349,10 +1341,6 @@ restoreZippedDbWallets() {
13491341
if [ "$count" -gt 0 ] ; then
13501342
find ${DOMAIN_HOME}/wlsdeploy/dbWallets/*/*.zip -type f | xargs -I % sh -c 'unzip -jo % -d $(dirname %) ; rm %'
13511343
fi
1352-
count=$(find ${DOMAIN_HOME}/config/wlsdeploy/dbWallets/*/*.zip -type f 2>/dev/null | wc -l)
1353-
if [ "$count" -gt 0 ] ; then
1354-
find ${DOMAIN_HOME}/config/wlsdeploy/dbWallets/*/*.zip -type f | xargs -I % sh -c 'unzip -jo % -d $(dirname %) ; rm %'
1355-
fi
13561344
}
13571345

13581346

@@ -1389,7 +1377,7 @@ prepareMIIServer() {
13891377
encrypt_decrypt_domain_secret "decrypt" ${DOMAIN_HOME} ${MII_PASSPHRASE}
13901378

13911379
# We restore the app and libs from the archive first, the domain zip may contain any standalone application
1392-
# modules under wlsdeploy/applications/*.xml. In the next step, if any standalon application module exists collected
1380+
# modules under wlsdeploy/applications/*.xml. In the next step, if any standalone application module exists collected
13931381
# during introspection, it will overwrite the tokenized version in the archive.
13941382

13951383
trace "Model-in-Image: Restoring apps and libraries"

0 commit comments

Comments
 (0)