Skip to content

backport owls_95448 to release 3.3 #2704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 30 additions & 16 deletions operator/src/main/resources/scripts/modelInImage.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) 2018, 2021, Oracle and/or its affiliates.
# Copyright (c) 2018, 2022, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
# This script contains the all the function of model in image
Expand Down Expand Up @@ -1054,12 +1054,22 @@ function wdtHandleOnlineUpdate() {
mkdir -p ${DOMAIN_HOME}/lib || exitOrLoop
for file in $(sort_files ${IMG_ARCHIVES_ROOTDIR} "*.zip")
do
# expand the archive domain libraries to the domain lib
# expand the archive domain libraries to the domain lib, 11 is caution when zip entry doesn't exists
cd ${DOMAIN_HOME}/lib || exitOrLoop
${JAVA_HOME}/bin/jar xf ${IMG_ARCHIVES_ROOTDIR}/${file} wlsdeploy/domainLibraries/
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} wlsdeploy/domainLibraries/*
if [ $? -ne 0 && $? -ne 11 ] ; then
trace SEVERE "Domain Source Type is FromModel, error in extracting domainLibraries " \
"${IMG_ARCHIVES_ROOTDIR}/${file}"
exitOrLoop
fi

if [ $? -ne 0 ] ; then
trace SEVERE "Error extracting domain lib '${IMG_ARCHIVES_ROOTDIR}/${file}'"
# expand the domain bin, in update case user may only update a file in the domainBin archive, 11 is caution when
# zip entry doesn't exists
cd ${DOMAIN_HOME}/bin || exitOrLoop
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} wlsdeploy/domainBin/*
if [ $? -ne 0 && $? -ne 11 ] ; then
trace SEVERE "Domain Source Type is FromModel, error in extracting domainBin " \
"${IMG_ARCHIVES_ROOTDIR}/${file}"
exitOrLoop
fi

Expand Down Expand Up @@ -1290,21 +1300,25 @@ function prepareMIIServer() {

for file in $(sort_files ${IMG_ARCHIVES_ROOTDIR} "*.zip")
do
# expand the archive domain libraries to the domain lib
cd ${DOMAIN_HOME}/lib || return 1
${JAVA_HOME}/bin/jar xf ${IMG_ARCHIVES_ROOTDIR}/${file} ${WLSDEPLOY_DOMAINLIB}

if [ $? -ne 0 ] ; then
trace SEVERE "Domain Source Type is FromModel, error in extracting domain libs ${IMG_ARCHIVES_ROOTDIR}/${file}"
return 1
# expand the archive domain libraries to the domain lib, 11 is caution when zip entry doesn't exists
cd ${DOMAIN_HOME}/lib || exitOrLoop
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} wlsdeploy/domainLibraries/*
if [ $? -ne 0 && $? -ne 11 ] ; then
trace SEVERE "Domain Source Type is FromModel, error in extracting domainLibraries " \
"${IMG_ARCHIVES_ROOTDIR}/${file}"
exitOrLoop
fi

# Flatten the jars to the domain lib root

if [ -d ${WLSDEPLOY_DOMAINLIB} ] && [ "$(ls -A ${WLSDEPLOY_DOMAINLIB})" ] ; then
mv ${WLSDEPLOY_DOMAINLIB}/* .
# expand the domain bin, in update case user may only update a file in the domainBin archive, 11 is caution when
# zip entry doesn't exists
cd ${DOMAIN_HOME}/bin || exitOrLoop
unzip -jo ${IMG_ARCHIVES_ROOTDIR}/${file} wlsdeploy/domainBin/*
if [ $? -ne 0 && $? -ne 11 ] ; then
trace SEVERE "Domain Source Type is FromModel, error in extracting domainBin " \
"${IMG_ARCHIVES_ROOTDIR}/${file}"
exitOrLoop
fi
rm -fr wlsdeploy/

# expand the archive apps and shared lib to the wlsdeploy/* directories
# the config.xml is referencing them from that path
Expand Down