Skip to content

Commit 103c8db

Browse files
committed
Merge branch 'undo-wdt-custom-copy' into 'main'
Undo copying wdt custom file and clean up extract logic See merge request weblogic-cloud/weblogic-kubernetes-operator!4569
2 parents 282a99a + 4bb65f6 commit 103c8db

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
@@ -1320,26 +1320,18 @@ restoreAppAndLibs() {
13201320
exitOrLoop
13211321
fi
13221322

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

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

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

13591347

@@ -1390,7 +1378,7 @@ prepareMIIServer() {
13901378
encrypt_decrypt_domain_secret "decrypt" ${DOMAIN_HOME} ${MII_PASSPHRASE}
13911379

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

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

0 commit comments

Comments
 (0)