github.com/verrazzano/verrazzano@v1.7.1/tests/testdata/test-applications/weblogic/hello-weblogic/setup/build.sh (about) 1 #!/usr/bin/env bash 2 # Copyright (c) 2022, Oracle and/or its affiliates. 3 # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 4 5 scriptDir="$( cd "$( dirname $0 )" && pwd )" 6 if [ ! -d ${scriptDir} ]; then 7 echo "Unable to determine the sample directory where the application is found" 8 echo "Using shell /bin/sh to determine and found ${scriptDir}" 9 exit 1 10 fi 11 12 echo 'Build the WDT archive...' 13 rm wdt_archive.zip 14 rm weblogic-deploy.zip 15 mkdir -p ./wlsdeploy/applications 16 cp ../target/hello.war ./wlsdeploy/applications 17 zip -r wdt_archive.zip wlsdeploy 18 rm -r wlsdeploy 19 20 echo 'Download WDT...' 21 if [ -f weblogic-deploy.zip ]; then 22 echo 'Using existing weblogic-deploy.zip...' 23 else 24 echo 'Downloading weblogic-deploy.zip...' 25 wget https://github.com/oracle/weblogic-deploy-tooling/releases/download/release-2.1.0/weblogic-deploy.zip 26 fi 27 28 echo 'Download WebLogic Image Tool...' 29 if [ -f imagetool.zip ]; then 30 echo 'Using existing imagetool.zip...' 31 else 32 echo 'Downloading imagetool.zip...' 33 wget https://github.com/oracle/weblogic-image-tool/releases/download/release-1.10.0/imagetool.zip 34 unzip imagetool.zip 35 fi 36 37 export PATH=`pwd`/imagetool/bin:$PATH 38 39 echo 'Add installers to Image Tool cache...' 40 imagetool.sh cache addInstaller --type wdt --version latest --path weblogic-deploy.zip --force 41 42 echo 'Create auxiliary image for model in image deployment' 43 44 imagetool.sh createAuxImage \ 45 --tag $1 \ 46 --wdtModel wdt_domain.yaml \ 47 --wdtArchive wdt_archive.zip