From d8fb6be984c7b47112d64b413f6fb1ce5c70794a Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Thu, 12 Oct 2023 15:50:36 +0530 Subject: [PATCH 01/14] redundant code removed --- cloud/docker/build_image.sh | 20 +- cloud/docker/dockerfiles/Dockerfile | 6 +- cloud/docker/dockerfiles/Dockerfile-rms | 4 +- cloud/docker/dockerfiles/Dockerfile-teagent | 2 +- cloud/docker/dockerfiles/Dockerfile.rhel | 6 +- cloud/docker/lib/be_docker_install.pm | 216 +++++--------------- cloud/docker/scripts/as.sh | 66 +----- cloud/docker/scripts/asleg.sh | 66 +----- cloud/docker/scripts/be.sh | 55 +---- cloud/docker/scripts/ftl.sh | 66 +----- cloud/docker/scripts/hawk.sh | 66 +----- cloud/docker/scripts/tea.sh | 66 +----- cloud/docker/scripts/utils.sh | 76 +++++++ 13 files changed, 189 insertions(+), 526 deletions(-) diff --git a/cloud/docker/build_image.sh b/cloud/docker/build_image.sh index 685e35d9..a90348cb 100755 --- a/cloud/docker/build_image.sh +++ b/cloud/docker/build_image.sh @@ -75,7 +75,7 @@ ARG_JRE_VERSION="na" BE_PRODUCT="TIB_businessevents" INSTALLER_PLATFORM="_linux26gl25_x86_64.zip" -BE_BASE_PKG_REGEX="${BE_PRODUCT}-${ARG_EDITION}_[0-9]\.[0-9]\.[0-9]${INSTALLER_PLATFORM}" +BE_BASE_PKG_REGEX="${BE_PRODUCT}-${ARG_EDITION}_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}${INSTALLER_PLATFORM}" VALIDATE_FTL_AS="false" #Map used to store the BE and it's comapatible JRE version @@ -282,7 +282,7 @@ if [ "$MISSING_ARGS" != "" ]; then fi if [ "$ARG_SOURCE" != "na" ]; then - bePckgsCnt=$(find $ARG_SOURCE -name "${BE_BASE_PKG_REGEX}" -maxdepth 1 2>/dev/null | wc -l) + bePckgsCnt=$(find $ARG_SOURCE -maxdepth 1 | grep -E "${BE_BASE_PKG_REGEX}" 2>/dev/null | wc -l) if [ $bePckgsCnt -gt 0 ]; then INSTALLATION_TYPE="frominstallers" ARG_INSTALLER_LOCATION="$ARG_SOURCE" @@ -339,7 +339,7 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then BE_HOME=$( readlink -e ../.. ) fi - BE_HOME_REGEX="(.*.)\/(be\/[0-9]\.[0-9])$" + BE_HOME_REGEX="(.*.)\/(be\/[0-9]{1,}\.[0-9]{1,})$" if ! [[ $BE_HOME =~ $BE_HOME_REGEX ]]; then printf "\nERROR: Provide proper be home [be/] (ex: /be/6.0). OR Path to installers location.\n" exit 1 @@ -390,7 +390,7 @@ ARG_IMAGE_VERSION="$ARG_TAG" # get product details for both fromlocal and frominstallers if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then - VERSION_REGEX=([0-9]\.[0-9]).* + VERSION_REGEX=([0-9]{1,}\.[0-9]{1,}).* ARG_BE_VERSION=$(find $BE_HOME/uninstaller_scripts/post-install.properties -type f | xargs grep 'beVersion=' | cut -d'=' -f2) ARG_BE_VERSION=$(echo $ARG_BE_VERSION | sed -e 's/\r//g') @@ -426,7 +426,7 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then printf "\nERROR: The directory: [$AS_LEG_HOME] not exist. Ignoring Activespaces(legacy) installation.\n" AS_LEG_HOME="na" else - AS_LEG_HOME_REGEX="(.*.)\/(as\/[0-9]\.[0-9])$" + AS_LEG_HOME_REGEX="(.*.)\/(as\/[0-9]{1,}\.[0-9]{1,})$" if ! [[ $AS_LEG_HOME =~ $AS_LEG_HOME_REGEX ]]; then printf "\nERROR: Update proper Activespaces(legacy) home path: [$AS_LEG_HOME] in $TRA_FILE_NAME file (ex: /as/).\n" exit 1 @@ -449,7 +449,7 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then printf "\nERROR: The directory: [$FTL_HOME] not exist. Ignoring FTL installation.\n" FTL_HOME="na" else - FTL_HOME_REGEX="(.*.)\/(ftl\/[0-9]\.[0-9])$" + FTL_HOME_REGEX="(.*.)\/(ftl\/[0-9]{1,}\.[0-9]{1,})$" if ! [[ $FTL_HOME =~ $FTL_HOME_REGEX ]]; then printf "\nERROR: Update proper FTL home path: [$FTL_HOME] in $TRA_FILE_NAME file (ex: /ftl/).\n" exit 1 @@ -470,7 +470,7 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then printf "\nERROR: The directory: [$AS_HOME] not exist. Ignoring Activespaces installation.\n" AS_HOME="na" else - AS_HOME_REGEX="(.*.)\/(as\/[0-9]\.[0-9])$" + AS_HOME_REGEX="(.*.)\/(as\/[0-9]{1,}\.[0-9]{1,})$" if ! [[ $AS_HOME =~ $AS_HOME_REGEX ]]; then printf "\nERROR: Update proper Activespaces home path: [$AS_HOME] in $TRA_FILE_NAME file (ex: /as/).\n" exit 1 @@ -493,7 +493,7 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then printf "\nERROR: The directory: [$HAWK_HOME] not exist. Ignoring HAWK installation.\n" HAWK_HOME="na" else - HAWK_HOME_REGEX="(.*.)\/(hawk\/[0-9]\.[0-9])$" + HAWK_HOME_REGEX="(.*.)\/(hawk\/[0-9]{1,}\.[0-9]{1,})$" if ! [[ $HAWK_HOME =~ $HAWK_HOME_REGEX ]]; then printf "\nERROR: Update proper HAWK home path: [$HAWK_HOME] in $TRA_FILE_NAME file (ex: /hawk/).\n" exit 1 @@ -517,7 +517,7 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then printf "\nERROR: TEA HOME directory: [$TEA_HOME] not exist.\n" exit 1 else - TEA_HOME_REGEX="(.*.)\/(tea\/[0-9]\.[0-9]\.[0-9])$" + TEA_HOME_REGEX="(.*.)\/(tea\/[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,})$" if ! [[ $TEA_HOME =~ $TEA_HOME_REGEX ]]; then printf "\nERROR: Update proper TEA home path: [$TEA_HOME] in $TRA_FILE_NAME file (ex: /tea/).\n" exit 1 @@ -538,7 +538,7 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then TRA_JAVA_HOME=$(cat $BE_HOME/$TRA_FILE | grep ^tibco.env.TIB_JAVA_HOME | cut -d'=' -f 2 | sed -e 's/\r$//' ) else #version regex for all products - VERSION_REGEX=([0-9]\.[0-9]).[0-9] + VERSION_REGEX=([0-9]{1,}\.[0-9]{1,}).[0-9]{1,} HF_VERSION_REGEX=([0-9]\{3\}) # file list array to hold all installers diff --git a/cloud/docker/dockerfiles/Dockerfile b/cloud/docker/dockerfiles/Dockerfile index c5050f75..da4935c2 100644 --- a/cloud/docker/dockerfiles/Dockerfile +++ b/cloud/docker/dockerfiles/Dockerfile @@ -61,9 +61,9 @@ ENV TIBCO_HOME=/opt/tibco \ WORKDIR /home/tibco/be RUN chmod +x *.sh *.pm run -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_hawk('$HAWK_VERSION','$HAWK_PRODUCT_HOTFIX')" -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_ftl('$FTL_VERSION','$FTL_PRODUCT_HOTFIX')" -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_activespaces('$ACTIVESPACES_VERSION','$ACTIVESPACES_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_with_silentfile('hawk','oihr','$HAWK_VERSION','$HAWK_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('ftl','$FTL_VERSION','$FTL_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('as','$ACTIVESPACES_VERSION','$ACTIVESPACES_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_be('$BE_PRODUCT_VERSION','enterprise','$BE_PRODUCT_ADDONS','$BE_PRODUCT_HOTFIX','$AS_PRODUCT_HOTFIX','$AS_VERSION')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::replaceRunbeVersionToken('$BE_PRODUCT_VERSION','./run')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::generateAnnotationIndexes('/opt/tibco/be/${BE_SHORT_VERSION}', '/opt/tibco/tibcojre64/${JRE_VERSION}')" \ diff --git a/cloud/docker/dockerfiles/Dockerfile-rms b/cloud/docker/dockerfiles/Dockerfile-rms index 6941939b..b084991b 100644 --- a/cloud/docker/dockerfiles/Dockerfile-rms +++ b/cloud/docker/dockerfiles/Dockerfile-rms @@ -57,8 +57,8 @@ ENV TIBCO_HOME=/opt/tibco \ WORKDIR /home/tibco/be RUN chmod +x *.sh *.pm run -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_ftl('$FTL_VERSION','$FTL_PRODUCT_HOTFIX')" -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_activespaces('$ACTIVESPACES_VERSION','$ACTIVESPACES_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('ftl','$FTL_VERSION','$FTL_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('as','$ACTIVESPACES_VERSION','$ACTIVESPACES_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_be('$BE_PRODUCT_VERSION','enterprise','$BE_PRODUCT_ADDONS','$BE_PRODUCT_HOTFIX','$AS_PRODUCT_HOTFIX','$AS_VERSION')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::replaceRunbeVersionToken('$BE_PRODUCT_VERSION','./run')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::generateAnnotationIndexes('/opt/tibco/be/${BE_SHORT_VERSION}', '/opt/tibco/tibcojre64/${JRE_VERSION}')" \ diff --git a/cloud/docker/dockerfiles/Dockerfile-teagent b/cloud/docker/dockerfiles/Dockerfile-teagent index 20907af2..993bd4ad 100644 --- a/cloud/docker/dockerfiles/Dockerfile-teagent +++ b/cloud/docker/dockerfiles/Dockerfile-teagent @@ -41,7 +41,7 @@ ENV TIBCO_HOME=/opt/tibco \ WORKDIR /home/tibco/be RUN chmod +x *.sh *.pm && chmod +x *.py run RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_be('$BE_PRODUCT_VERSION','enterprise','na','$BE_PRODUCT_HOTFIX','na','na')" -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_tea('$TEA_VERSION','$TEA_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_with_silentfile('tea','tea','$TEA_VERSION','$TEA_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::replaceRunbeVersionToken('$BE_PRODUCT_VERSION','./run')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::generateAnnotationIndexes('/opt/tibco/be/${BE_SHORT_VERSION}', '/opt/tibco/tibcojre64/${JRE_VERSION}')" \ && rm -rf tea_installer tea_installer-hf as_installers be_installers *.zip diff --git a/cloud/docker/dockerfiles/Dockerfile.rhel b/cloud/docker/dockerfiles/Dockerfile.rhel index cde552d8..633ef1b1 100644 --- a/cloud/docker/dockerfiles/Dockerfile.rhel +++ b/cloud/docker/dockerfiles/Dockerfile.rhel @@ -63,9 +63,9 @@ ENV TIBCO_HOME=/opt/tibco \ WORKDIR /home/tibco/be RUN chmod +x *.sh *.pm run -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_hawk('$HAWK_VERSION','$HAWK_PRODUCT_HOTFIX')" -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_ftl('$FTL_VERSION','$FTL_PRODUCT_HOTFIX')" -RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_activespaces('$ACTIVESPACES_VERSION','$ACTIVESPACES_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_with_silentfile('hawk','oihr','$HAWK_VERSION','$HAWK_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('ftl','$FTL_VERSION','$FTL_PRODUCT_HOTFIX')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('as','$ACTIVESPACES_VERSION','$ACTIVESPACES_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_be('$BE_PRODUCT_VERSION','enterprise','$BE_PRODUCT_ADDONS','$BE_PRODUCT_HOTFIX','$AS_PRODUCT_HOTFIX','$AS_VERSION')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::replaceRunbeVersionToken('$BE_PRODUCT_VERSION','./run')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::generateAnnotationIndexes('/opt/tibco/be/${BE_SHORT_VERSION}', '/opt/tibco/tibcojre64/${JRE_VERSION}')" \ diff --git a/cloud/docker/lib/be_docker_install.pm b/cloud/docker/lib/be_docker_install.pm index 7a7077e1..08ce8cd3 100755 --- a/cloud/docker/lib/be_docker_install.pm +++ b/cloud/docker/lib/be_docker_install.pm @@ -14,8 +14,6 @@ local $/ ; # SCRIPT CONSTANTS----------------------------------------------- my $DEBUG_ENABLE = 0; #Set it to 1 to enable debug logs -my $PACKAGE_PLATFORM = "linux"; - # CONSTANTS---------------------------------------------------------- my $ROOT_FOLDER = "."; @@ -185,17 +183,9 @@ sub install_be { print "\nINFO:Performing cleanup...\n"; my $beShortVersion = getShortVersion($arg_beVersion); - # `rm -rf as_installers be_installers *.zip`; `rm -rf /opt/tibco/tools`; - #`ls -d /opt/tibco/be/$beShortVersion/examples/* | grep -v standard | xargs rm -rf`; - #`ls -d /opt/tibco/be/$beShortVersion/examples/standard/* | grep -v WebStudio | xargs rm -rf`; `rm -rf /opt/tibco/be/$beShortVersion/admin-plugins`; `rm -rf /opt/tibco/be/$beShortVersion/api`; - #`rm -rf /opt/tibco/be/$beShortVersion/cloud`; - #`rm -rf /opt/tibco/be/$beShortVersion/decisionmanager`; - #`rm -rf /opt/tibco/be/$beShortVersion/docker`; - #`rm -rf /opt/tibco/be/$beShortVersion/maven`; - #`rm -rf /opt/tibco/be/$beShortVersion/mm`; `rm -rf /opt/tibco/be/$beShortVersion/uninstaller_scripts`; print "\n\nINFO:Product Installation Complete\n\n"; @@ -203,159 +193,85 @@ sub install_be { } -sub install_hawk { - - my $arg_hawkVersion = shift; - my $arg_hawkHotfix = shift; - - if($arg_hawkVersion == "na"){ - return 1; - } - - my $baseProdRegex="*oihr_".$arg_hawkVersion."_linux_x86_64.zip"; - my (@baseProd) = glob "$ROOT_FOLDER/$baseProdRegex"; - - my $baseHawkHfRegex="*oihr_$arg_hawkVersion*$arg_hawkHotfix*zip"; - my (@baseHawkHf) = glob "$ROOT_FOLDER/$baseHawkHfRegex"; - - my $baseHawkHfPkgVal="na"; - if(scalar @baseHawkHf == 1){ - $baseHawkHfPkgVal=$baseHawkHf[0]; - } - - print "\nINFO:Installing Hawk $arg_hawkVersion...\n"; - my $beInstallResult = extractAndInstall($ROOT_FOLDER,$arg_hawkVersion,$baseProd[0],0,$baseHawkHfPkgVal,"hawk_installer","hawk",0,$arg_hawkHotfix); - if($beInstallResult == 0){ - print "\nERROR : Error occurred while installing Hawk. Aborting\n"; - exit 0; - } - print "\nINFO:Installing Hawk $arg_hawkVersion...DONE\n\n"; -} - -sub install_tea { - - my $arg_teaVersion = shift; - my $arg_teaHotfix = shift; +sub install_package_with_silentfile { + my $arg_pkgName = shift; + my $arg_installerKeyWord = shift; + my $arg_pkgVersion = shift; + my $arg_pkgHotfix = shift; - if($arg_teaVersion == "na"){ + if($arg_pkgVersion == "na"){ return 1; } - my $baseProdRegex="*tea_".$arg_teaVersion."_linux26gl23_x86_64.zip"; + my $baseProdRegex='*'.$arg_installerKeyWord.'_'.$arg_pkgVersion.'_linux*_x86_64.zip'; my (@baseProd) = glob "$ROOT_FOLDER/$baseProdRegex"; - my $baseTeaHfRegex="*tea_$arg_teaVersion*$arg_teaHotfix*zip"; - my (@baseTeaHf) = glob "$ROOT_FOLDER/$baseTeaHfRegex"; + my $basePkgHfRegex='*'.$arg_installerKeyWord.'_'.$arg_pkgVersion.'*'.$arg_pkgHotfix.'*zip'; + my (@basePkgHf) = glob "$ROOT_FOLDER/$basePkgHfRegex"; - my $baseTeaHfPkgVal="na"; - if(scalar @baseTeaHf == 1){ - $baseTeaHfPkgVal=$baseTeaHf[0]; + my $basePkgHfPkgVal="na"; + if(scalar @basePkgHf == 1){ + $basePkgHfPkgVal=$basePkgHf[0]; } - print "\nINFO:Installing TEA $arg_teaVersion...\n"; - my $beInstallResult = extractAndInstall($ROOT_FOLDER,$arg_teaVersion,$baseProd[0],0,$baseTeaHfPkgVal,"tea_installer","tea",0,$arg_teaHotfix); + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion $baseProd[0] ...\n"; + my $beInstallResult = extractAndInstall($ROOT_FOLDER,$arg_pkgVersion,$baseProd[0],0,$basePkgHfPkgVal,$arg_pkgName.'_installer',$arg_pkgName,0,$arg_pkgHotfix); if($beInstallResult == 0){ - print "\nERROR : Error occurred while installing TEA. Aborting\n"; + print "\nERROR : Error occurred while installing $arg_pkgName. Aborting\n"; exit 0; } - print "\nINFO:Installing TEA $arg_teaVersion...DONE\n\n"; + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion...DONE\n\n"; } -sub install_ftl { - my $arg_ftlVersion = shift; - my $arg_ftlHotfix = shift; +sub install_package_withtar { + my $arg_pkgName = shift; + my $arg_pkgVersion = shift; + my $arg_pkgHotfix = shift; - if($arg_ftlVersion == "na"){ + if($arg_pkgVersion == "na"){ return 1; } - print "\nINFO:Installing FTL $arg_ftlVersion...\n"; + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion $baseProd[0] ...\n"; - my $baseProdRegex="*ftl_$arg_ftlVersion*zip"; + my $baseProdRegex='*'.$arg_pkgName.'_'.$arg_pkgVersion.'*zip'; my (@baseProd) = glob "$ROOT_FOLDER/$baseProdRegex"; - my $result=extractPackages($ROOT_FOLDER,$arg_ftlVersion,$baseProd[0],'ftl_installers'); + my $result=extractPackage($arg_pkgName,$ROOT_FOLDER,$baseProd[0],$arg_pkgName.'_installers'); if($result == 0){ - print "\nERROR : Error occurred while extracting FTL installer package - $baseProd[0]. Aborting\n"; + print "\nERROR : Error occurred while extracting $arg_pkgName installer package - $baseProd[0]. Aborting\n"; return 0; } - my $result=installFTLORACTIVESPACESPackages($arg_ftlVersion,'ftl_installers',"TIB_ftl_"); + my $result=installPackagesUsingTar($arg_pkgVersion,$arg_pkgName.'_installers','TIB_'.$arg_pkgName.'_'); if($result == 0){ - print "\nERROR : Error occurred while installing FTL. Aborting\n"; + print "\nERROR : Error occurred while installing $arg_pkgName. Aborting\n"; return 0; } - print "\nINFO:Installing FTL $arg_ftlVersion...DONE\n\n"; + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion...DONE\n\n"; - if($arg_ftlHotfix ne "na"){ - print "\nINFO:Installing FTL $arg_ftlVersion HF $arg_ftlHotfix ...\n"; + if($arg_pkgHotfix ne "na"){ + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion hf $arg_pkgHotfix ...\n"; - my $baseFtlHfRegex="*ftl_$arg_ftlVersion*$arg_ftlHotfix*zip"; + my $baseFtlHfRegex='*'.$arg_pkgName.'_'.$arg_pkgVersion.'*'.$arg_pkgHotfix.'*zip'; my (@baseFtlHf) = glob "$ROOT_FOLDER/$baseFtlHfRegex"; - my $hfResult=extractHfPackage($ROOT_FOLDER,$arg_ftlVersion,$baseFtlHf[0],'ftl_installers_hf'); + my $hfResult=extractPackage($arg_pkgName.'-hf',$ROOT_FOLDER,$baseFtlHf[0],$arg_pkgName.'_installers_hf'); if($hfResult == 0){ - print "\nERROR : Error occurred while extracting FTL HF installer package - $baseFtlHf[0]. Aborting\n"; + print "\nERROR : Error occurred while extracting $arg_pkgName hf installer package - $baseFtlHf[0]. Aborting\n"; return 0; } - my $hfResult=installFTLORACTIVESPACESPackages($arg_ftlVersion,'ftl_installers_hf',"TIB_ftl_"); + my $hfResult=installPackagesUsingTar($arg_pkgVersion,$arg_pkgName.'_installers_hf','TIB_'.$arg_pkgName.'_'); if($hfResult == 0){ - print "\nERROR : Error occurred while installing FTL HF. Aborting\n"; + print "\nERROR : Error occurred while installing $arg_pkgName hf. Aborting\n"; return 0; } - print "\nINFO:Installing FTL $arg_ftlVersion HF $arg_ftlHotfix ...DONE\n\n"; + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion hf $arg_pkgHotfix ...DONE\n\n"; } } -sub install_activespaces { - my $arg_activespacesVersion = shift; - my $arg_activespacesHotfix = shift; - - if($arg_activespacesVersion == "na"){ - return 1; - } - - print "\nINFO:Installing Activespaces $arg_activespacesVersion...\n"; - - my $baseProdRegex="*as_$arg_activespacesVersion*zip"; - my (@baseProd) = glob "$ROOT_FOLDER/$baseProdRegex"; - - my $result=extractPackages($ROOT_FOLDER,$arg_activespacesVersion,$baseProd[0],'activespaces_installers'); - if($result == 0){ - print "\nERROR : Error occurred while extracting activespaces installer package - $baseProd[0]. Aborting\n"; - return 0; - } - - my $result=installFTLORACTIVESPACESPackages($arg_activespacesVersion,'activespaces_installers',"TIB_as_"); - if($result == 0){ - print "\nERROR : Error occurred while installing activespaces. Aborting\n"; - return 0; - } - print "\nINFO:Installing Activespaces $arg_activespacesVersion...DONE\n\n"; - - if($arg_activespacesHotfix ne "na"){ - print "\nINFO:Installing Activespaces $arg_activespacesVersion HF $arg_activespacesHotfix ...\n"; - - my $baseAs3xHfRegex="*as_$arg_activespacesVersion*$arg_activespacesHotfix*zip"; - my (@baseAs3xHf) = glob "$ROOT_FOLDER/$baseAs3xHfRegex"; - - my $hfResult=extractHfPackage($ROOT_FOLDER,$arg_activespacesVersion,$baseAs3xHf[0],'activespaces_installers_hf'); - if($hfResult == 0){ - print "\nERROR : Error occurred while extracting activespaces HF installer package - $baseAs3xHf[0]. Aborting\n"; - return 0; - } - - my $hfResult=installFTLORACTIVESPACESPackages($arg_activespacesVersion,'activespaces_installers_hf',"TIB_as_"); - if($hfResult == 0){ - print "\nERROR : Error occurred while installing activespaces HF. Aborting\n"; - return 0; - } - print "\nINFO:Installing Activespaces $arg_activespacesVersion HF $arg_activespacesHotfix ...DONE\n\n"; - } - -} #---------------------------------------------------------------------------------------- sub extractAndInstall{ @@ -372,7 +288,7 @@ sub extractAndInstall{ #PERFORMING EXTRACTION OF PACKAGES -------------------------------------------------- #Extract packages in the root folder - my $result=extractPackages($rootFolder,$version,$pkg,$pkgTargetFolder); + my $result=extractPackage($pkg,$rootFolder,$pkg,$pkgTargetFolder); if($result == 0){ #Abort : 0 Signifies error return 0; @@ -381,7 +297,7 @@ sub extractAndInstall{ #Extract addons in the root folder if($addonsRef ne 0){ my @addonPkgs=@{$addonsRef}; - $result=extractAddons($rootFolder,$version,\@addonPkgs,$pkgTargetFolder); + $result=extractAddons($rootFolder,\@addonPkgs,$pkgTargetFolder); if($result == 0){ #Abort : 0 Signifies error return 0; @@ -418,8 +334,8 @@ sub extractAndInstall{ if($hfPkg ne "na"){ - $result=extractHfPackage($rootFolder,$version,$hfPkg,$pkgTargetFolderHf); - my $copyInstallerToHf=`cp $pkgTargetFolder/TIBCOUniversalInstaller-lnx-x86-64.bin $pkgTargetFolderHf`; + $result=extractPackage($hfPkg.'-hf',$rootFolder,$hfPkg,$pkgTargetFolderHf); + my $copyInstallerToHf=`cp $pkgTargetFolder/TIBCOUniversalInstaller-lnx-x86-64.bin $pkgTargetFolderHf`; } @@ -462,7 +378,7 @@ sub installPackages{ return 1; } -sub installFTLORACTIVESPACESPackages{ +sub installPackagesUsingTar{ my $version = shift; my $pkgSourceRoot= shift; @@ -497,23 +413,8 @@ sub installHotfix{ return 1; } -sub extractPackages{ - my $rootFolder = shift; - my $version = shift; - my $pkg = shift; - my $pkgTargetFolder = shift; - - $DEBUG_ENABLE==1?print "\nDEBUG: Extracting package='$pkg' to '$pkgTargetFolder'.\n":""; - my $Command_1_extract_str="cd $rootFolder;unzip -o $pkg -d $pkgTargetFolder"; - my $Command_1_extract=`$Command_1_extract_str`; - $DEBUG_ENABLE==1?print "\nDEBUG:Result : $Command_1_extract\n":""; - $DEBUG_ENABLE==1?print "\nDEBUG:Extraction complete\n":""; - return 1; -} - sub extractAddons{ my $rootFolder = shift; - my $version = shift; my $addonPkgsRef = shift; my $pkgTargetFolder = shift; @@ -523,25 +424,20 @@ sub extractAddons{ for my $addonPkg (@addonPkgs) { - $DEBUG_ENABLE==1?print "\nDEBUG:Extracting addon : $addonPkg in $pkgTargetFolder...\n":""; - my $Command_1_extract_str="cd $rootFolder;unzip -o $addonPkg -d $pkgTargetFolder"; - my $Command_1_extract=`$Command_1_extract_str`; - $DEBUG_ENABLE==1?print "\nDEBUG:Result : $Command_1_extract\n":""; - $DEBUG_ENABLE==1?print "\nDEBUG:Extraction complete for addon : $addonPkg \n":""; + extractPackage('be-addon',$rootFolder,$addonPkg,$pkgTargetFolder); } return 1; } -sub extractHfPackage{ - - my $rootFolder = shift; - my $version = shift; - my $hfPkg = shift; - my $pkgTargetFolder = shift; +sub extractPackage{ + my $info = shift; + my $rootFolder = shift; + my $basePkg = shift; + my $pkgTargetFolder = shift; - $DEBUG_ENABLE==1?print "\nDEBUG:Extracting for HF package : $hfPkg in $pkgTargetFolder...\n":""; - my $Command_1_extract_str="cd $rootFolder;unzip -o $hfPkg -d $pkgTargetFolder"; + $DEBUG_ENABLE==1?print "\nDEBUG:Extracting $info : $basePkg in $pkgTargetFolder...\n":""; + my $Command_1_extract_str="cd $rootFolder;unzip -o $basePkg -d $pkgTargetFolder"; my $Command_1_extract=`$Command_1_extract_str`; $DEBUG_ENABLE==1?print "\nDEBUG:Result : $Command_1_extract\n":""; $DEBUG_ENABLE==1?print "\nDEBUG:Extraction complete\n":""; @@ -691,20 +587,6 @@ sub appendTraToken{ close OUT; } -sub isIn{ - my $arg_versionList =shift; - my $arg_asVersion =shift; - - my @compatibleVersions = split(/,/, $arg_versionList); - - for my $ver (@compatibleVersions){ - if($arg_asVersion eq $ver){ - return 1; - } - } - return 0; -} - #--------------------------------------------------------------------------------- sub backupFile { my $file =shift; diff --git a/cloud/docker/scripts/as.sh b/cloud/docker/scripts/as.sh index 676b69ef..b888b745 100644 --- a/cloud/docker/scripts/as.sh +++ b/cloud/docker/scripts/as.sh @@ -2,64 +2,14 @@ AS_VERSION_MAP_MIN=( "6.0.0:4.4.0" "6.1.0:4.6.1" "6.1.1:4.6.1" "6.1.2:4.7.0" "6.2.0:4.7.0" "6.2.1:4.7.0" "6.2.2:4.7.0" "6.3.0:4.7.0" ) AS_VERSION_MAP_MAX=( "6.0.0:4.4.0" "6.1.0:4.6.1" "6.1.1:4.7.0" "6.1.2:4.7.0" "6.2.0:4.7.0" "6.2.1:4.7.0" "6.2.2:4.7.1" "6.3.0:4.8.1" ) -# Validate and get TIBCO As base and hf versions -asPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_as_[0-9]\.[0-9]\.[0-9]_linux_x86_64.zip" ) -asPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_as_[0-9]\.[0-9]\.[0-9]_linux_x86_64.zip" | wc -l) -asHfPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_as_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_linux_x86_64.zip" ) -asHfPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_as_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_linux_x86_64.zip" | wc -l) +asMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) +asMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) -if [ $asPckgsCnt -gt 0 ]; then - if [ $asPckgsCnt -gt 1 ]; then # If more than one base versions are present - printf "\nERROR: More than one TIBCO As base versions are present in the target directory. There should be only one.\n" - exit 1; - elif [ $asHfPckgsCnt -gt 1 ]; then - printf "\nERROR: More than one TIBCO As HF are present in the target directory. There should be only one.\n" - exit 1; - elif [ $asPckgsCnt -eq 1 ]; then - AS_PACKAGE="$(basename ${asPckgs[0]} )" - ARG_AS_VERSION=$(echo $AS_PACKAGE | cut -d'_' -f 3) +asPkgRegex="TIB_as_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_linux_x86_64.zip" +asPkgHfRegex="TIB_as_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}(-|_)HF-[0-9][0-9][0-9]_linux_x86_64.zip" - # validate as version - if [[ $ARG_AS_VERSION =~ $VERSION_REGEX ]]; then - ARG_AS_SHORT_VERSION=${BASH_REMATCH[1]}; - else - printf "ERROR: Improper As version: [$ARG_AS_VERSION]. It should be in (x.x.x) format Ex: (4.2.0).\n" - exit 1 - fi +validateInstallers "AS" "$asPkgRegex" "$asPkgHfRegex" "$asMinVersion" "$asMaxVersion" - # validate as version with be base version - DOT="\." - asMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) - asVersion=$(echo "${ARG_AS_VERSION}" | sed -e "s/${DOT}/${BLANK}/g" ) - asMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) - - if ! [[ (( $asMinVersion -le $asVersion )) && (( $asVersion -le $asMaxVersion )) ]]; then - printf "ERROR: BE version: [$ARG_BE_VERSION] not compatible with As version: [$ARG_AS_VERSION].\n"; - exit 1 - fi - - #add as package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$AS_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - - if [ $asHfPckgsCnt -eq 1 ]; then - AS_HF_PACKAGE="$(basename ${asHfPckgs[0]})" - asHfBaseVersion=$(echo $AS_HF_PACKAGE | cut -d'_' -f 3) - if [ "$ARG_AS_VERSION" = "$asHfBaseVersion" ]; then - ARG_AS_HOTFIX=$(echo $AS_HF_PACKAGE | cut -d'_' -f 4 | cut -d'-' -f 2) - #validate hf version - if ! [[ $ARG_AS_HOTFIX =~ $HF_VERSION_REGEX ]]; then - printf "ERROR: Improper As hf version: [$ARG_AS_HOTFIX]. It should be in (xxx) format Ex: (002).\n" - exit 1 - fi - - #add as hf package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$AS_HF_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - else - printf "\nERROR: TIBCO As version: [$asHfBaseVersion] in HF installer and TIBCO As Base version: [$ARG_AS_VERSION] is not matching.\n" - exit 1; - fi - fi - fi -fi +ARG_AS_VERSION=$ARG_BASE_VERSION +ARG_AS_SHORT_VERSION=$ARG_BASE_SHORT_VERSION +ARG_AS_HOTFIX=$ARG_BASE_HOTFIX diff --git a/cloud/docker/scripts/asleg.sh b/cloud/docker/scripts/asleg.sh index 80ee7105..14106952 100644 --- a/cloud/docker/scripts/asleg.sh +++ b/cloud/docker/scripts/asleg.sh @@ -2,64 +2,14 @@ AS_LEG_VERSION_MAP_MIN=( "5.6.0:2.3.0" "5.6.1:2.3.0" "6.0.0:2.4.0" "6.1.0:2.4.0" "6.1.1:2.4.0" "6.1.2:2.4.1" "6.2.0:2.4.0" "6.2.1:2.4.1" "6.2.2:2.4.1" "6.3.0:2.4.1" ) AS_LEG_VERSION_MAP_MAX=( "5.6.0:2.4.0" "5.6.1:2.4.1" "6.0.0:2.4.1" "6.1.0:2.4.1" "6.1.1:2.4.1" "6.1.2:2.4.1" "6.2.0:2.4.1" "6.2.1:2.4.1" "6.2.2:2.4.2" "6.3.0:2.4.2" ) -# Validate and get TIBCO Activespaces(legacy) base and hf versions -asLegPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_activespaces_[0-9]\.[0-9]\.[0-9]_linux_x86_64.zip" ) -asLegPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_activespaces_[0-9]\.[0-9]\.[0-9]_linux_x86_64.zip" | wc -l) -asLegHfPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_activespaces_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_linux_x86_64.zip" ) -asLegHfPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_activespaces_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_linux_x86_64.zip" | wc -l) +asLegMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_LEG_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) +asLegMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_LEG_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) -if [ $asLegPckgsCnt -gt 0 ]; then - if [ $asLegPckgsCnt -gt 1 ]; then # If more than one base versions are present - printf "\nERROR: More than one TIBCO Activespaces(legacy) base versions are present in the target directory. There should be only one.\n" - exit 1; - elif [ $asLegHfPckgsCnt -gt 1 ]; then - printf "\nERROR: More than one TIBCO Activespaces(legacy) HF are present in the target directory. There should be only one.\n" - exit 1; - elif [ $asLegPckgsCnt -eq 1 ]; then - AS_LEG_PACKAGE="$(basename ${asLegPckgs[0]} )" - ARG_AS_LEG_VERSION=$(echo $AS_LEG_PACKAGE | cut -d'_' -f 3) +asLegPkgRegex="TIB_activespaces_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_linux_x86_64.zip" +asLegPkgHfRegex="TIB_activespaces_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}(-|_)HF-[0-9][0-9][0-9]_linux_x86_64.zip" - # validate as legacy version - if [[ $ARG_AS_LEG_VERSION =~ $VERSION_REGEX ]]; then - ARG_AS_LEG_SHORT_VERSION=${BASH_REMATCH[1]}; - else - printf "ERROR: Improper Activespaces(legacy) version: [$ARG_AS_LEG_VERSION]. It should be in (x.x.x) format Ex: (2.4.0).\n" - exit 1 - fi +validateInstallers "Activespaces(legacy)" "$asLegPkgRegex" "$asLegPkgHfRegex" "$asLegMinVersion" "$asLegMaxVersion" - # validate as leg version with be base version - DOT="\." - asLegMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_LEG_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) - asLegVersion=$(echo "${ARG_AS_LEG_VERSION}" | sed -e "s/${DOT}/${BLANK}/g" ) - asLegMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_LEG_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) - - if ! [[ (( $asLegMinVersion -le $asLegVersion )) && (( $asLegVersion -le $asLegMaxVersion )) ]]; then - printf "ERROR: BE version: [$ARG_BE_VERSION] not compatible with Activespaces(legacy) version: [$ARG_AS_LEG_VERSION].\n"; - exit 1 - fi - - #add as legacy package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$AS_LEG_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - - if [ $asLegHfPckgsCnt -eq 1 ]; then - AS_LEG_HF_PACKAGE="$(basename ${asLegHfPckgs[0]})" - asHfBaseVersion=$(echo $AS_LEG_HF_PACKAGE | cut -d'_' -f 3) - if [ "$ARG_AS_LEG_VERSION" = "$asHfBaseVersion" ]; then - ARG_AS_LEG_HOTFIX=$(echo $AS_LEG_HF_PACKAGE | cut -d'_' -f 4 | cut -d'-' -f 2) - #validate hf version - if ! [[ $ARG_AS_LEG_HOTFIX =~ $HF_VERSION_REGEX ]]; then - printf "ERROR: Improper Activespaces(legacy) hf version: [$ARG_AS_LEG_HOTFIX]. It should be in (xxx) format Ex: (002).\n" - exit 1 - fi - - #add as legacy hf package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$AS_LEG_HF_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - else - printf "\nERROR: TIBCO Activespaces(legacy) version: [$asHfBaseVersion] in HF installer and TIBCO Activespaces(legacy) Base version: [$ARG_AS_LEG_VERSION] is not matching.\n" - exit 1; - fi - fi - fi -fi +ARG_AS_LEG_VERSION=$ARG_BASE_VERSION +ARG_AS_LEG_SHORT_VERSION=$ARG_BASE_SHORT_VERSION +ARG_AS_LEG_HOTFIX=$ARG_BASE_HOTFIX diff --git a/cloud/docker/scripts/be.sh b/cloud/docker/scripts/be.sh index e7346964..66f06e26 100644 --- a/cloud/docker/scripts/be.sh +++ b/cloud/docker/scripts/be.sh @@ -1,53 +1,8 @@ BLANK="" -BE_HF_REGEX="${BE_PRODUCT}-hf_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]${INSTALLER_PLATFORM}" +BE_HF_REGEX="${BE_PRODUCT}-hf_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_HF-[0-9][0-9][0-9]${INSTALLER_PLATFORM}" -# Get all be packages -bePckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "${BE_BASE_PKG_REGEX}" ) -bePckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "${BE_BASE_PKG_REGEX}" | wc -l) +validateInstallers "BusinessEvents" "$BE_BASE_PKG_REGEX" "$BE_HF_REGEX" "" "" -#Get all be hf packages -beHfPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "${BE_HF_REGEX}" ) -beHfCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "${BE_HF_REGEX}" | wc -l) - -if [ $bePckgsCnt -gt 1 ]; then # If more than one base versions are present - printf "\nERROR: More than one TIBCO BusinessEvents base versions are present in the target directory. There should be only one.\n" - exit 1; -elif [ $beHfCnt -gt 1 ]; then # If more than one hf versions are present - printf "\nERROR: More than one TIBCO BusinessEvents HF are present in the target directory. There should be only one.\n" - exit 1; -elif [ $bePckgsCnt -eq 1 ]; then - #Find BE Version from installer - BE_PACKAGE="$(basename ${bePckgs[0]})" - ARG_BE_VERSION=$(echo "$BE_PACKAGE" | sed -e "s/${INSTALLER_PLATFORM}/${BLANK}/g" | sed -e "s/${BE_PRODUCT}-${ARG_EDITION}"_"/${BLANK}/g") - - # validate be version - if [[ $ARG_BE_VERSION =~ $VERSION_REGEX ]]; then - ARG_BE_SHORT_VERSION=${BASH_REMATCH[1]}; - else - printf "ERROR: Improper BE version: [$ARG_BE_VERSION]. It should be in (x.x.x) format Ex: (5.6.0).\n" - exit 1 - fi - - #add be package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$BE_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - - if [ $beHfCnt -eq 1 ]; then # If Only one HF is present then parse the HF version - BE_HF_PACKAGE="$(basename ${beHfPckgs[0]})" - hfbeversion=$(echo "$BE_HF_PACKAGE"| cut -d'_' -f 3) - if [ $ARG_BE_VERSION == $hfbeversion ]; then - ARG_BE_HOTFIX=$(echo "$BE_HF_PACKAGE" | cut -d'_' -f 4 | sed -e "s/HF-/${BLANK}/g") - #validate hf version - if ! [[ $ARG_BE_HOTFIX =~ $HF_VERSION_REGEX ]]; then - printf "ERROR: Improper BE hf version: [$ARG_BE_HOTFIX]. It should be in (xxx) format Ex: (002).\n" - exit 1 - fi - #add be hf package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$BE_HF_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - else - printf "\nERROR: TIBCO BusinessEvents version: [$hfbeversion] in HF installer and TIBCO BusinessEvents Base version: [$ARG_BE_VERSION] is not matching.\n" - exit 1; - fi - fi -fi +ARG_BE_VERSION=$ARG_BASE_VERSION +ARG_BE_SHORT_VERSION=$ARG_BASE_SHORT_VERSION +ARG_BE_HOTFIX=$ARG_BASE_HOTFIX diff --git a/cloud/docker/scripts/ftl.sh b/cloud/docker/scripts/ftl.sh index 2dab7a5c..54a74ad1 100644 --- a/cloud/docker/scripts/ftl.sh +++ b/cloud/docker/scripts/ftl.sh @@ -2,64 +2,14 @@ FTL_VERSION_MAP_MIN=( "6.0.0:6.4.0" "6.1.0:6.5.0" "6.1.1:6.5.0" "6.1.2:6.7.1" "6.2.0:6.7.1" "6.2.1:6.7.1" "6.2.2:6.7.1" "6.3.0:6.7.1" ) FTL_VERSION_MAP_MAX=( "6.0.0:6.4.x" "6.1.0:6.5.0" "6.1.1:6.6.1" "6.1.2:6.7.1" "6.2.0:6.7.1" "6.2.1:6.7.1" "6.2.2:6.7.3" "6.3.0:6.10.0" ) -# Validate and get TIBCO FTL base and hf versions -ftlPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_ftl_[0-9]\.[0-9]\.[0-9]_linux_x86_64.zip" ) -ftlPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_ftl_[0-9]\.[0-9]\.[0-9]_linux_x86_64.zip" | wc -l) -ftlHfPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_ftl_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_linux_x86_64.zip" ) -ftlHfPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_ftl_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_linux_x86_64.zip" | wc -l) +ftlMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${FTL_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) +ftlMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${FTL_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) -if [ $ftlPckgsCnt -gt 0 ]; then - if [ $ftlPckgsCnt -gt 1 ]; then # If more than one base versions are present - printf "\nERROR: More than one TIBCO FTL base versions are present in the target directory. There should be only one.\n" - exit 1; - elif [ $ftlHfPckgsCnt -gt 1 ]; then - printf "\nERROR: More than one TIBCO FTL HF are present in the target directory. There should be only one.\n" - exit 1; - elif [ $ftlPckgsCnt -eq 1 ]; then - FTL_PACKAGE="$(basename ${ftlPckgs[0]} )" - ARG_FTL_VERSION=$(echo $FTL_PACKAGE | cut -d'_' -f 3) +ftlPkgRegex="TIB_ftl_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_linux_x86_64.zip" +ftlPkgHfRegex="TIB_ftl_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}(-|_)HF-[0-9][0-9][0-9]_linux_x86_64.zip" - # validate ftl version - if [[ $ARG_FTL_VERSION =~ $VERSION_REGEX ]]; then - ARG_FTL_SHORT_VERSION=${BASH_REMATCH[1]}; - else - printf "ERROR: Improper FTL version: [$ARG_FTL_VERSION]. It should be in (x.x.x) format Ex: (6.2.0).\n" - exit 1 - fi +validateInstallers "FTL" "$ftlPkgRegex" "$ftlPkgHfRegex" "$ftlMinVersion" "$ftlMaxVersion" - # validate ftl version with be base version - DOT="\." - ftlMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${FTL_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) - ftlVersion=$(echo "${ARG_FTL_VERSION}" | sed -e "s/${DOT}/${BLANK}/g" ) - ftlMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${FTL_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) - - if ! [[ (( $ftlMinVersion -le $ftlVersion )) && (( $ftlVersion -le $ftlMaxVersion )) ]]; then - printf "ERROR: BE version: [$ARG_BE_VERSION] not compatible with FTL version: [$ARG_FTL_VERSION].\n"; - exit 1 - fi - - #add ftl package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$FTL_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - - if [ $ftlHfPckgsCnt -eq 1 ]; then - FTL_HF_PACKAGE="$(basename ${ftlHfPckgs[0]})" - ftlHfBaseVersion=$(echo $FTL_HF_PACKAGE | cut -d'_' -f 3) - if [ "$ARG_FTL_VERSION" = "$ftlHfBaseVersion" ]; then - ARG_FTL_HOTFIX=$(echo $FTL_HF_PACKAGE | cut -d'_' -f 4 | cut -d'-' -f 2) - #validate hf version - if ! [[ $ARG_FTL_HOTFIX =~ $HF_VERSION_REGEX ]]; then - printf "ERROR: Improper ftl hf version: [$ARG_FTL_HOTFIX]. It should be in (xxx) format Ex: (002).\n" - exit 1 - fi - - #add ftl hf package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$FTL_HF_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - else - printf "\nERROR: TIBCO FTL version: [$ftlHfBaseVersion] in HF installer and TIBCO FTL Base version: [$ARG_FTL_VERSION] is not matching.\n" - exit 1; - fi - fi - fi -fi +ARG_FTL_VERSION=$ARG_BASE_VERSION +ARG_FTL_SHORT_VERSION=$ARG_BASE_SHORT_VERSION +ARG_FTL_HOTFIX=$ARG_BASE_HOTFIX diff --git a/cloud/docker/scripts/hawk.sh b/cloud/docker/scripts/hawk.sh index 89180707..65deb24b 100644 --- a/cloud/docker/scripts/hawk.sh +++ b/cloud/docker/scripts/hawk.sh @@ -2,64 +2,14 @@ HAWK_VERSION_MAP_MIN=( "6.2.2:7.1.0" "6.3.0:7.1.0" ) HAWK_VERSION_MAP_MAX=( "6.2.2:7.1.0" "6.3.0:7.2.1" ) -# Validate and get TIBCO HAWK base and hf versions -hawkPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_oihr_[0-9]\.[0-9]\.[0-9]_linux_x86_64.zip" ) -hawkPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_oihr_[0-9]\.[0-9]\.[0-9]_linux_x86_64.zip" | wc -l) -hawkHfPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_oihr_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_linux_x86_64.zip" ) -hawkHfPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_oihr_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_linux_x86_64.zip" | wc -l) +hawkMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${HAWK_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) +hawkMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${HAWK_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) -if [ $hawkPckgsCnt -gt 0 ]; then - if [ $hawkPckgsCnt -gt 1 ]; then # If more than one base versions are present - printf "\nERROR: More than one TIBCO HAWK base versions are present in the target directory. There should be only one.\n" - exit 1; - elif [ $hawkHfPckgsCnt -gt 1 ]; then - printf "\nERROR: More than one TIBCO HAWK HF are present in the target directory. There should be only one.\n" - exit 1; - elif [ $hawkPckgsCnt -eq 1 ]; then - HAWK_PACKAGE="$(basename ${hawkPckgs[0]} )" - ARG_HAWK_VERSION=$(echo $HAWK_PACKAGE | cut -d'_' -f 3) +hawkPkgRegex="TIB_oihr_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_linux_x86_64.zip" +hawkPkgHfRegex="TIB_oihr_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_HF-[0-9][0-9][0-9]_linux_x86_64.zip" - # validate hawk version - if [[ $ARG_HAWK_VERSION =~ $VERSION_REGEX ]]; then - ARG_HAWK_SHORT_VERSION=${BASH_REMATCH[1]}; - else - printf "ERROR: Improper HAWK version: [$ARG_HAWK_VERSION]. It should be in (x.x.x) format Ex: (6.2.0).\n" - exit 1 - fi +validateInstallers "HAWK" "$hawkPkgRegex" "$hawkPkgHfRegex" "$hawkMinVersion" "$hawkMaxVersion" - # validate hawk version with be base version - DOT="\." - hawkMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${HAWK_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) - hawkVersion=$(echo "${ARG_HAWK_VERSION}" | sed -e "s/${DOT}/${BLANK}/g" ) - hawkMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${HAWK_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) - - if ! [[ (( $hawkMinVersion -le $hawkVersion )) && (( $hawkVersion -le $hawkMaxVersion )) ]]; then - printf "ERROR: BE version: [$ARG_BE_VERSION] not compatible with HAWK version: [$ARG_HAWK_VERSION].\n"; - exit 1 - fi - - #add hawk package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$HAWK_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - - if [ $hawkHfPckgsCnt -eq 1 ]; then - HAWK_HF_PACKAGE="$(basename ${hawkHfPckgs[0]})" - hawkHfBaseVersion=$(echo $HAWK_HF_PACKAGE | cut -d'_' -f 3) - if [ "$ARG_HAWK_VERSION" = "$hawkHfBaseVersion" ]; then - ARG_HAWK_HOTFIX=$(echo $HAWK_HF_PACKAGE | cut -d'_' -f 4 | cut -d'-' -f 2) - #validate hf version - if ! [[ $ARG_HAWK_HOTFIX =~ $HF_VERSION_REGEX ]]; then - printf "ERROR: Improper hawk hf version: [$ARG_HAWK_HOTFIX]. It should be in (xxx) format Ex: (002).\n" - exit 1 - fi - - #add hawk hf package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$HAWK_HF_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - else - printf "\nERROR: TIBCO HAWK version: [$hawkHfBaseVersion] in HF installer and TIBCO HAWK Base version: [$ARG_HAWK_VERSION] is not matching.\n" - exit 1; - fi - fi - fi -fi +ARG_HAWK_VERSION=$ARG_BASE_VERSION +ARG_HAWK_SHORT_VERSION=$ARG_BASE_SHORT_VERSION +ARG_HAWK_HOTFIX=$ARG_BASE_HOTFIX diff --git a/cloud/docker/scripts/tea.sh b/cloud/docker/scripts/tea.sh index 9b328f5e..8f4367f4 100644 --- a/cloud/docker/scripts/tea.sh +++ b/cloud/docker/scripts/tea.sh @@ -2,64 +2,14 @@ TEA_VERSION_MAP_MIN=( "6.3.0:2.4.1" ) TEA_VERSION_MAP_MAX=( "6.3.0:2.4.1" ) -# Validate and get TIBCO TEA base and hf versions -teaPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_tea_[0-9]\.[0-9]\.[0-9]_linux26gl23_x86_64.zip" ) -teaPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_tea_[0-9]\.[0-9]\.[0-9]_linux26gl23_x86_64.zip" | wc -l) -teaHfPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_tea_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9].zip" ) -teaHfPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 -name "TIB_tea_[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9].zip" | wc -l) +teaMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${TEA_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) +teaMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${TEA_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) -if [ $teaPckgsCnt -gt 0 ]; then - if [ $teaPckgsCnt -gt 1 ]; then # If more than one base versions are present - printf "\nERROR: More than one TIBCO TEA base versions are present in the target directory. There should be only one.\n" - exit 1; - elif [ $teaHfPckgsCnt -gt 1 ]; then - printf "\nERROR: More than one TIBCO TEA HF are present in the target directory. There should be only one.\n" - exit 1; - elif [ $teaPckgsCnt -eq 1 ]; then - TEA_PACKAGE="$(basename ${teaPckgs[0]} )" - ARG_TEA_VERSION=$(echo $TEA_PACKAGE | cut -d'_' -f 3) +teaPkgRegex="TIB_tea_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_linux26gl23_x86_64.zip" +teaPkgHfRegex="TIB_tea_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_HF-[0-9][0-9][0-9].zip" - # validate tea version - if [[ $ARG_TEA_VERSION =~ $VERSION_REGEX ]]; then - ARG_TEA_SHORT_VERSION=${BASH_REMATCH[1]}; - else - printf "ERROR: Improper TEA version: [$ARG_TEA_VERSION]. It should be in (x.x.x) format Ex: (2.4.1).\n" - exit 1 - fi +validateInstallers "TEA" "$teaPkgRegex" "$teaPkgHfRegex" "$teaMinVersion" "$teaMaxVersion" - # validate tea version with be base version - DOT="\." - teaMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${TEA_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) - teaVersion=$(echo "${ARG_TEA_VERSION}" | sed -e "s/${DOT}/${BLANK}/g" ) - teaMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${TEA_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) - - if ! [[ (( $teaMinVersion -le $teaVersion )) && (( $teaVersion -le $teaMaxVersion )) ]]; then - printf "ERROR: BE version: [$ARG_BE_VERSION] not compatible with TEA version: [$ARG_TEA_VERSION].\n"; - exit 1 - fi - - #add tea package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$TEA_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - - if [ $teaHfPckgsCnt -eq 1 ]; then - TEA_HF_PACKAGE="$(basename ${teaHfPckgs[0]})" - teaHfBaseVersion=$(echo $TEA_HF_PACKAGE | cut -d'_' -f 3) - if [ "$ARG_TEA_VERSION" = "$teaHfBaseVersion" ]; then - ARG_TEA_HOTFIX=$(echo $TEA_HF_PACKAGE | cut -d'_' -f 4 | cut -d'-' -f 2 | cut -d'.' -f 1) - #validate hf version - if ! [[ $ARG_TEA_HOTFIX =~ $HF_VERSION_REGEX ]]; then - printf "ERROR: Improper tea hf version: [$ARG_TEA_HOTFIX]. It should be in (xxx) format Ex: (002).\n" - exit 1 - fi - - #add tea hf package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$TEA_HF_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` - else - printf "\nERROR: TIBCO TEA version: [$teaHfBaseVersion] in HF installer and TIBCO TEA Base version: [$ARG_TEA_VERSION] is not matching.\n" - exit 1; - fi - fi - fi -fi +ARG_TEA_VERSION=$ARG_BASE_VERSION +ARG_TEA_SHORT_VERSION=$ARG_BASE_SHORT_VERSION +ARG_TEA_HOTFIX=$ARG_BASE_HOTFIX diff --git a/cloud/docker/scripts/utils.sh b/cloud/docker/scripts/utils.sh index b9965a7d..aafc6546 100644 --- a/cloud/docker/scripts/utils.sh +++ b/cloud/docker/scripts/utils.sh @@ -1,3 +1,6 @@ + +DOT="\." + getFromArray() { key=$1 @@ -67,3 +70,76 @@ validateFTLandAS() echo $VALIDATE_FTL_AS } + +validateInstallers() +{ + pkgName=$1 + basePckgRegex=$2 + basePckgHfRegex=$3 + baseMinVersion=$4 + baseMaxVersion=$5 + + ARG_BASE_VERSION="na" + ARG_BASE_SHORT_VERSION="na" + ARG_BASE_HOTFIX="na" + + # Validate and get TIBCO $pkgName base and hf versions + basePckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 | grep -E "$basePckgRegex" ) + basePckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 | grep -E "$basePckgRegex" | wc -l) + baseHfPckgs=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 | grep -E "$basePckgHfRegex" ) + baseHfPckgsCnt=$(find $ARG_INSTALLER_LOCATION -maxdepth 1 | grep -E "$basePckgHfRegex" | wc -l) + + if [ $basePckgsCnt -gt 0 ]; then + if [ $basePckgsCnt -gt 1 ]; then # If more than one $pkgName versions are present + printf "\nERROR: More than one TIBCO $pkgName base versions are present in the target directory. There should be only one.\n" + exit 1; + elif [ $baseHfPckgsCnt -gt 1 ]; then + printf "\nERROR: More than one TIBCO $pkgName HF are present in the target directory. There should be only one.\n" + exit 1; + elif [ $basePckgsCnt -eq 1 ]; then + BASE_PACKAGE="$(basename ${basePckgs[0]} )" + ARG_BASE_VERSION=$(echo $BASE_PACKAGE | cut -d'_' -f 3) + + # validate $pkgName version + if [[ $ARG_BASE_VERSION =~ $VERSION_REGEX ]]; then + ARG_BASE_SHORT_VERSION=${BASH_REMATCH[1]}; + else + printf "ERROR: Improper $pkgName version: [$ARG_BASE_VERSION]. It should be in (x.x.x) format Ex: (6.2.0).\n" + exit 1 + fi + + if [ "$baseMinVersion" != "" ]; then + # validate $pkgName version with be base version + baseVersion=$(echo "${ARG_BASE_VERSION}" | sed -e "s/${DOT}/${BLANK}/g" ) + + if ! [[ (( $baseMinVersion -le $baseVersion )) && (( $baseVersion -le $baseMaxVersion )) ]]; then + printf "ERROR: BE version: [$ARG_BE_VERSION] not compatible with $pkgName version: [$ARG_BASE_VERSION].\n"; + exit 1 + fi + fi + + #add $pkgName package to file list and increment index + FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$BASE_PACKAGE" + FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` + + if [ $baseHfPckgsCnt -eq 1 ]; then + BASE_HF_PACKAGE="$(basename ${baseHfPckgs[0]})" + baseHfBaseVersion=$(echo $BASE_HF_PACKAGE | cut -d'_' -f 3 | cut -d'-' -f 1) + if [ "$ARG_BASE_VERSION" = "$baseHfBaseVersion" ]; then + if [[ $BASE_HF_PACKAGE =~ $HF_VERSION_REGEX ]]; then + ARG_BASE_HOTFIX=${BASH_REMATCH[0]} + else + printf "ERROR: Improper $pkgName HF version: [$BASE_HF_PACKAGE]. It should be in (xxx) format Ex: (002).\n" + exit 1 + fi + #add $pkgName hf package to file list and increment index + FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$BASE_HF_PACKAGE" + FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` + else + printf "\nERROR: TIBCO $pkgName version: [$baseHfBaseVersion] in HF installer and TIBCO $pkgName Base version: [$ARG_BASE_VERSION] is not matching.\n" + exit 1; + fi + fi + fi + fi +} \ No newline at end of file From f72fc01aadb03900a401bd678ec58dc5b268324e Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Fri, 27 Oct 2023 09:53:06 +0530 Subject: [PATCH 02/14] fixed log issue in perl file --- cloud/docker/lib/be_docker_install.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/docker/lib/be_docker_install.pm b/cloud/docker/lib/be_docker_install.pm index 08ce8cd3..0e62454e 100755 --- a/cloud/docker/lib/be_docker_install.pm +++ b/cloud/docker/lib/be_docker_install.pm @@ -232,11 +232,11 @@ sub install_package_withtar { return 1; } - print "\nINFO:Installing $arg_pkgName $arg_pkgVersion $baseProd[0] ...\n"; - my $baseProdRegex='*'.$arg_pkgName.'_'.$arg_pkgVersion.'*zip'; my (@baseProd) = glob "$ROOT_FOLDER/$baseProdRegex"; + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion $baseProd[0] ...\n"; + my $result=extractPackage($arg_pkgName,$ROOT_FOLDER,$baseProd[0],$arg_pkgName.'_installers'); if($result == 0){ print "\nERROR : Error occurred while extracting $arg_pkgName installer package - $baseProd[0]. Aborting\n"; From 4e35e62e954907e3280185c6ae3432cc45e1952e Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Tue, 14 Nov 2023 17:21:56 +0530 Subject: [PATCH 03/14] windows scripts updated --- cloud/docker/scripts/as.bat | 61 ++-------- cloud/docker/scripts/asleg.bat | 61 ++-------- cloud/docker/scripts/be.bat | 62 +++------- cloud/docker/scripts/beaddons.bat | 12 +- cloud/docker/scripts/ftl.bat | 63 ++-------- cloud/docker/scripts/hawk.bat | 62 ++-------- cloud/docker/scripts/tea.bat | 62 ++-------- cloud/docker/scripts/util.bat | 189 ++++++++++++++++++++++++------ 8 files changed, 217 insertions(+), 355 deletions(-) diff --git a/cloud/docker/scripts/as.bat b/cloud/docker/scripts/as.bat index e7b453a6..4a006819 100644 --- a/cloud/docker/scripts/as.bat +++ b/cloud/docker/scripts/as.bat @@ -31,58 +31,15 @@ SET ARG_AS_HOTFIX=na SET FILE_NAME=na SET ERROR_VAL=false SET AS_REG="^.*as.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - -call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !AS_REG! "TIBCO Activespaces" false ARG_AS_VERSION FILE_NAME ERROR_VAL -if !ERROR_VAL! EQU true GOTO END-withError - -if "!ARG_AS_VERSION!" NEQ "na" ( - echo !ARG_AS_VERSION!|findstr /r "^[1-9]\.[0-9]\.[0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper Activespaces version: [!ARG_AS_VERSION!] It should be in [x.x.x] format Ex: [4.4.0]. - GOTO END-withError - ) - - SET /a asval=!ARG_AS_VERSION:.=! - SET /a asminval=!VALID_AS_MAP_MIN[%ARG_BE_VERSION%]:.=! - SET /a asmaxval=!VALID_AS_MAP_MAX[%ARG_BE_VERSION%]:.=! - - if !asval! GEQ !asminval! if !asval! LEQ !asmaxval! SET AS_VALIDATION=true - if "!AS_VALIDATION!" NEQ "true" ( - echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with Activespaces version: [!ARG_AS_VERSION!]. - GOTO END-withError - ) - - echo ASLEGPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - - SET AS_HF_REG="^.*as.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - SET AS_HF_AS_VERSION=na - - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !AS_HF_REG! "TIBCO Activespaces HF" false AS_HF_AS_VERSION FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!AS_HF_AS_VERSION!" NEQ "na" ( - if "!AS_HF_AS_VERSION!" EQU "!ARG_AS_VERSION!" ( - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !AS_HF_REG! "TIBCO Activespaces HF" true ARG_AS_HOTFIX FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!ARG_AS_HOTFIX!" NEQ "na" ( - echo !ARG_AS_HOTFIX!|findstr /r "^[0-9][0-9][0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper Activespaces hf version: [!ARG_AS_HOTFIX!] It should be in [xxx] format Ex: [001]. - GOTO END-withError - ) - echo ASLEGHFPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - ) - ) else ( - echo ERROR: TIBCO Activespaces version: [!AS_HF_AS_VERSION!] in HF installer and TIBCO Activespaces Base version: [!ARG_AS_VERSION!] is not matching. - GOTO END-withError - ) - ) +SET AS_HF_REG="^.*as.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET DISPLAY_NAME="TIBCO Activespaces" +SET /a asminval=!VALID_AS_MAP_MIN[%ARG_BE_VERSION%]:.=! +SET /a asmaxval=!VALID_AS_MAP_MAX[%ARG_BE_VERSION%]:.=! + +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !AS_REG! !AS_HF_REG! !DISPLAY_NAME! !asminval! !asmaxval! !ARG_TEMP_FOLDER! ARG_AS_VERSION ARG_AS_HOTFIX +if "!ARG_AS_HOTFIX!" EQU "true" ( + SET ERROR_VAL=true + SET ARG_AS_HOTFIX=na ) - SET "%5=!ARG_AS_VERSION!" & SET "%6=!ARG_AS_HOTFIX!" & SET "%7=!ERROR_VAL!" EXIT /B 0 - -:END-withError - SET "%7=true" - EXIT /B 1 diff --git a/cloud/docker/scripts/asleg.bat b/cloud/docker/scripts/asleg.bat index 3106757b..4d9d1035 100644 --- a/cloud/docker/scripts/asleg.bat +++ b/cloud/docker/scripts/asleg.bat @@ -35,58 +35,15 @@ SET ARG_AS_LEG_HOTFIX=na SET FILE_NAME=na SET ERROR_VAL=false SET AS_LEG_REG="^.*activespaces.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - -call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !AS_LEG_REG! "TIBCO Activespaces legacy" false ARG_AS_LEG_VERSION FILE_NAME ERROR_VAL -if !ERROR_VAL! EQU true GOTO END-withError - -if "!ARG_AS_LEG_VERSION!" NEQ "na" ( - echo !ARG_AS_LEG_VERSION!|findstr /r "^[1-9]\.[0-9]\.[0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper Activespaces legacy version: [!ARG_AS_LEG_VERSION!] It should be in [x.x.x] format Ex: [2.4.0]. - GOTO END-withError - ) - - SET /a aslegval=!ARG_AS_LEG_VERSION:.=! - SET /a aslegminval=!VALID_AS_LEG_MAP_MIN[%ARG_BE_VERSION%]:.=! - SET /a aslegmaxval=!VALID_AS_LEG_MAP_MAX[%ARG_BE_VERSION%]:.=! - - if !aslegval! GEQ !aslegminval! if !aslegval! LEQ !aslegmaxval! SET AS_LEG_VALIDATION=true - if "!AS_LEG_VALIDATION!" NEQ "true" ( - echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with Activespaces legacy version: [!ARG_AS_LEG_VERSION!]. - GOTO END-withError - ) - - echo ASLEGPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - - SET AS_LEG_HF_REG="^.*activespaces.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - SET AS_LEG_HF_AS_LEG_VERSION=na - - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !AS_LEG_HF_REG! "TIBCO Activespaces legacy HF" false AS_LEG_HF_AS_LEG_VERSION FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!AS_LEG_HF_AS_LEG_VERSION!" NEQ "na" ( - if "!AS_LEG_HF_AS_LEG_VERSION!" EQU "!ARG_AS_LEG_VERSION!" ( - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !AS_LEG_HF_REG! "TIBCO Activespaces legacy HF" true ARG_AS_LEG_HOTFIX FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!ARG_AS_LEG_HOTFIX!" NEQ "na" ( - echo !ARG_AS_LEG_HOTFIX!|findstr /r "^[0-9][0-9][0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper Activespaces legacy hf version: [!ARG_AS_LEG_HOTFIX!] It should be in [xxx] format Ex: [001]. - GOTO END-withError - ) - echo ASLEGHFPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - ) - ) else ( - echo ERROR: TIBCO Activespaces legacy version: [!AS_LEG_HF_AS_LEG_VERSION!] in HF installer and TIBCO Activespaces legacy Base version: [!ARG_AS_LEG_VERSION!] is not matching. - GOTO END-withError - ) - ) +SET AS_LEG_HF_REG="^.*activespaces.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET DISPLAY_NAME="TIBCO Activespaces legacy" +SET /a aslegminval=!VALID_AS_LEG_MAP_MIN[%ARG_BE_VERSION%]:.=! +SET /a aslegmaxval=!VALID_AS_LEG_MAP_MAX[%ARG_BE_VERSION%]:.=! + +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !AS_LEG_REG! !AS_LEG_HF_REG! !DISPLAY_NAME! !aslegminval! !aslegmaxval! !ARG_TEMP_FOLDER! ARG_AS_LEG_VERSION ARG_AS_LEG_HOTFIX +if "!ARG_AS_LEG_HOTFIX!" EQU "true" ( + SET ERROR_VAL=true + SET ARG_AS_LEG_HOTFIX=na ) - SET "%5=!ARG_AS_LEG_VERSION!" & SET "%6=!ARG_AS_LEG_HOTFIX!" & SET "%7=!ERROR_VAL!" EXIT /B 0 - -:END-withError - SET "%7=true" - EXIT /B 1 diff --git a/cloud/docker/scripts/be.bat b/cloud/docker/scripts/be.bat index d36c34fa..06d14018 100644 --- a/cloud/docker/scripts/be.bat +++ b/cloud/docker/scripts/be.bat @@ -7,14 +7,6 @@ SET ARG_INSTALLER_LOCATION=%1 SET ARG_INSTALLERS_PLATFORM=%2 SET ARG_TEMP_FOLDER=%3 -REM variables -SET ARG_BE_VERSION=na -SET ARG_BE_HOTFIX=na -set ARG_JRE_VERSION=na -SET FILE_NAME=na -SET ERROR_VAL=false -SET BE_REG="^.*businessevents-enterprise.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - SET GLOBAL_JRE_VERSION_MAP[5.6.0]=1.8.0 SET GLOBAL_JRE_VERSION_MAP[5.6.1]=11 SET GLOBAL_JRE_VERSION_MAP[6.0.0]=11 @@ -26,48 +18,22 @@ SET GLOBAL_JRE_VERSION_MAP[6.2.1]=11 SET GLOBAL_JRE_VERSION_MAP[6.2.2]=11 SET GLOBAL_JRE_VERSION_MAP[6.3.0]=11 -call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !BE_REG! "TIBCO Businessevents" false ARG_BE_VERSION FILE_NAME ERROR_VAL -if !ERROR_VAL! EQU true GOTO END-withError - -if "!ARG_BE_VERSION!" NEQ "na" ( - echo !ARG_BE_VERSION!|findstr /r "^[1-9]\.[0-9]\.[0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper BE version: [!ARG_BE_VERSION!] It should be in [x.x.x] format Ex: [5.6.0]. - GOTO END-withError - ) - echo BEPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - - set ARG_JRE_VERSION=!GLOBAL_JRE_VERSION_MAP[%ARG_BE_VERSION%]! - - SET BE_HF_REG="^.*businessevents-hf_.*[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - SET BE_HF_BE_VERSION=na - - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !BE_HF_REG! "TIBCO Businessevents HF" false BE_HF_BE_VERSION FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!BE_HF_BE_VERSION!" NEQ "na" ( - if "!BE_HF_BE_VERSION!" EQU "!ARG_BE_VERSION!" ( - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !BE_HF_REG! "TIBCO Businessevents HF" true ARG_BE_HOTFIX FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError +REM variables +SET ARG_BE_VERSION=na +SET ARG_BE_HOTFIX=na +SET FILE_NAME=na +SET ERROR_VAL=false +SET BE_REG="^.*businessevents-enterprise.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET BE_HF_REG="^.*businessevents-hf_.*[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET DISPLAY_NAME="TIBCO Businessevents" - if "!ARG_BE_HOTFIX!" NEQ "na" ( - echo !ARG_BE_HOTFIX!|findstr /r "^[0-9][0-9][0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper BE hf version: [!ARG_BE_HOTFIX!] It should be in [xxx] format Ex: [001]. - GOTO END-withError - ) - echo BEHFPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - ) - ) else ( - echo ERROR: TIBCO BusinessEvents version: [!BE_HF_BE_VERSION!] in HF installer and TIBCO BusinessEvents Base version: [!ARG_BE_VERSION!] is not matching. - GOTO END-withError - ) - ) +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !BE_REG! !BE_HF_REG! !DISPLAY_NAME! "na" "na" !ARG_TEMP_FOLDER! ARG_BE_VERSION ARG_BE_HOTFIX +if "!ARG_BE_HOTFIX!" EQU "true" ( + SET ERROR_VAL=true + SET ARG_BE_HOTFIX=na ) +set ARG_JRE_VERSION=!GLOBAL_JRE_VERSION_MAP[%ARG_BE_VERSION%]! + SET "%4=!ARG_BE_VERSION!" & SET "%5=!ARG_BE_HOTFIX!" & SET "%6=!ARG_JRE_VERSION!" & SET "%7=!ERROR_VAL!" EXIT /B 0 - -:END-withError - SET "%7=true" - EXIT /B 1 diff --git a/cloud/docker/scripts/beaddons.bat b/cloud/docker/scripts/beaddons.bat index c8cfb619..73520d38 100644 --- a/cloud/docker/scripts/beaddons.bat +++ b/cloud/docker/scripts/beaddons.bat @@ -14,27 +14,23 @@ SET ARG_ADDONS=na SET FILE_NAME=na SET ERROR_VAL=false SET BE_ADDON_PROCESS_REG="^TIB_businessevents-process_!ARG_BE_VERSION!_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET DISPLAY_NAME="TIBCO Businessevents process addon" -call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !BE_ADDON_PROCESS_REG! "TIBCO Businessevents process addon" false ARG_ADDON FILE_NAME ERROR_VAL -if !ERROR_VAL! EQU true GOTO END-withError - +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !BE_ADDON_PROCESS_REG! na !DISPLAY_NAME! na na !ARG_TEMP_FOLDER! ARG_ADDON ERROR_VAL if "!ARG_ADDON!" NEQ "na" ( SET ARG_ADDONS=process - echo BEADDONPROCESSPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt ) SET BE_ADDON_VIEWS_REG="^TIB_businessevents-views_!ARG_BE_VERSION!_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET DISPLAY_NAME="TIBCO Businessevents views addon" -call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !BE_ADDON_VIEWS_REG! "TIBCO Businessevents views addon" false ARG_ADDON FILE_NAME ERROR_VAL -if !ERROR_VAL! EQU true GOTO END-withError - +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !BE_ADDON_VIEWS_REG! na !DISPLAY_NAME! na na !ARG_TEMP_FOLDER! ARG_ADDON ERROR_VAL if "!ARG_ADDON!" NEQ "na" ( if "!ARG_ADDONS!" NEQ "na" ( SET ARG_ADDONS=process,views ) else ( SET ARG_ADDONS=views ) - echo BEADDONVIEWSPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt ) SET "%5=!ARG_ADDONS!" & SET "%6=!ERROR_VAL!" diff --git a/cloud/docker/scripts/ftl.bat b/cloud/docker/scripts/ftl.bat index cc79186a..8a4fb3f4 100644 --- a/cloud/docker/scripts/ftl.bat +++ b/cloud/docker/scripts/ftl.bat @@ -30,60 +30,17 @@ SET ARG_FTL_VERSION=na SET ARG_FTL_HOTFIX=na SET FILE_NAME=na SET ERROR_VAL=false -SET FTL_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET FTL_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$ ^.*ftl.*[0-9]\.[0-9][0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" if "!ARG_INSTALLERS_PLATFORM!" EQU "win" SET FTL_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.exe$" - -call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !FTL_REG! "TIBCO FTL" false ARG_FTL_VERSION FILE_NAME ERROR_VAL -if !ERROR_VAL! EQU true GOTO END-withError - -if "!ARG_FTL_VERSION!" NEQ "na" ( - echo !ARG_FTL_VERSION!|findstr /r "^[1-9]\.[0-9]\.[0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper FTL version: [!ARG_FTL_VERSION!] It should be in [x.x.x] format Ex: [4.4.0]. - GOTO END-withError - ) - - SET /a ftlval=!ARG_FTL_VERSION:.=! - SET /a ftlminval=!VALID_FTL_MAP_MIN[%ARG_BE_VERSION%]:.=! - SET /a ftlmaxval=!VALID_FTL_MAP_MAX[%ARG_BE_VERSION%]:.=! - - if !ftlval! GEQ !ftlminval! if !ftlval! LEQ !ftlmaxval! SET FTL_VALIDATION=true - if "!FTL_VALIDATION!" NEQ "true" ( - echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with FTL version: [!ARG_FTL_VERSION!]. - GOTO END-withError - ) - - echo ASLEGPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - - SET FTL_HF_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - SET FTL_HF_FTL_VERSION=na - - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !FTL_HF_REG! "TIBCO FTL HF" false FTL_HF_FTL_VERSION FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!FTL_HF_FTL_VERSION!" NEQ "na" ( - if "!FTL_HF_FTL_VERSION!" EQU "!ARG_FTL_VERSION!" ( - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !FTL_HF_REG! "TIBCO FTL HF" true ARG_FTL_HOTFIX FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!ARG_FTL_HOTFIX!" NEQ "na" ( - echo !ARG_FTL_HOTFIX!|findstr /r "^[0-9][0-9][0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper FTL hf version: [!ARG_FTL_HOTFIX!] It should be in [xxx] format Ex: [001]. - GOTO END-withError - ) - echo ASLEGHFPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - ) - ) else ( - echo ERROR: TIBCO FTL version: [!FTL_HF_FTL_VERSION!] in HF installer and TIBCO FTL Base version: [!ARG_FTL_VERSION!] is not matching. - GOTO END-withError - ) - ) +SET FTL_HF_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$ ^.*ftl.*[0-9]\.[0-9][0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET DISPLAY_NAME="TIBCO FTL" +SET /a ftlminval=!VALID_FTL_MAP_MIN[%ARG_BE_VERSION%]:.=! +SET /a ftlmaxval=!VALID_FTL_MAP_MAX[%ARG_BE_VERSION%]:.=! + +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !FTL_REG! !FTL_HF_REG! !DISPLAY_NAME! !ftlminval! !ftlmaxval! !ARG_TEMP_FOLDER! ARG_FTL_VERSION ARG_FTL_HOTFIX +if "!ARG_FTL_HOTFIX!" EQU "true" ( + SET ERROR_VAL=true + SET ARG_FTL_HOTFIX=na ) - SET "%5=!ARG_FTL_VERSION!" & SET "%6=!ARG_FTL_HOTFIX!" & SET "%7=!ERROR_VAL!" EXIT /B 0 - -:END-withError - SET "%7=true" - EXIT /B 1 diff --git a/cloud/docker/scripts/hawk.bat b/cloud/docker/scripts/hawk.bat index 84e9b92d..5280ee33 100644 --- a/cloud/docker/scripts/hawk.bat +++ b/cloud/docker/scripts/hawk.bat @@ -19,59 +19,15 @@ SET ARG_HAWK_HOTFIX=na SET FILE_NAME=na SET ERROR_VAL=false SET HAWK_REG="^.*oihr.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" -if "!ARG_INSTALLERS_PLATFORM!" EQU "win" SET HAWK_REG="^.*oihr.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - -call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !HAWK_REG! "TIBCO HAWK" false ARG_HAWK_VERSION FILE_NAME ERROR_VAL -if !ERROR_VAL! EQU true GOTO END-withError - -if "!ARG_HAWK_VERSION!" NEQ "na" ( - echo !ARG_HAWK_VERSION!|findstr /r "^[1-9]\.[0-9]\.[0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper HAWK version: [!ARG_HAWK_VERSION!] It should be in [x.x.x] format Ex: [4.4.0]. - GOTO END-withError - ) - - SET /a hawkval=!ARG_HAWK_VERSION:.=! - SET /a hawkminval=!VALID_HAWK_MAP_MIN[%ARG_BE_VERSION%]:.=! - SET /a hawkmaxval=!VALID_HAWK_MAP_MAX[%ARG_BE_VERSION%]:.=! - - if !hawkval! GEQ !hawkminval! if !hawkval! LEQ !hawkmaxval! SET HAWK_VALIDATION=true - if "!HAWK_VALIDATION!" NEQ "true" ( - echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with HAWK version: [!ARG_HAWK_VERSION!]. - GOTO END-withError - ) - - echo ASLEGPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - - SET HAWK_HF_REG="^.*oihr.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - SET HAWK_HF_HAWK_VERSION=na - - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !HAWK_HF_REG! "TIBCO HAWK HF" false HAWK_HF_HAWK_VERSION FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!HAWK_HF_HAWK_VERSION!" NEQ "na" ( - if "!HAWK_HF_HAWK_VERSION!" EQU "!ARG_HAWK_VERSION!" ( - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !HAWK_HF_REG! "TIBCO HAWK HF" true ARG_HAWK_HOTFIX FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!ARG_HAWK_HOTFIX!" NEQ "na" ( - echo !ARG_HAWK_HOTFIX!|findstr /r "^[0-9][0-9][0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper HAWK hf version: [!ARG_HAWK_HOTFIX!] It should be in [xxx] format Ex: [001]. - GOTO END-withError - ) - echo ASLEGHFPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - ) - ) else ( - echo ERROR: TIBCO HAWK version: [!HAWK_HF_HAWK_VERSION!] in HF installer and TIBCO HAWK Base version: [!ARG_HAWK_VERSION!] is not matching. - GOTO END-withError - ) - ) +SET HAWK_HF_REG="^.*oihr.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET DISPLAY_NAME="TIBCO HAWK" +SET /a hawkminval=!VALID_HAWK_MAP_MIN[%ARG_BE_VERSION%]:.=! +SET /a hawkmaxval=!VALID_HAWK_MAP_MAX[%ARG_BE_VERSION%]:.=! + +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !HAWK_REG! !HAWK_HF_REG! !DISPLAY_NAME! !hawkminval! !hawkmaxval! !ARG_TEMP_FOLDER! ARG_HAWK_VERSION ARG_HAWK_HOTFIX +if "!ARG_HAWK_HOTFIX!" EQU "true" ( + SET ERROR_VAL=true + SET ARG_HAWK_HOTFIX=na ) - SET "%5=!ARG_HAWK_VERSION!" & SET "%6=!ARG_HAWK_HOTFIX!" & SET "%7=!ERROR_VAL!" EXIT /B 0 - -:END-withError - SET "%7=true" - EXIT /B 1 diff --git a/cloud/docker/scripts/tea.bat b/cloud/docker/scripts/tea.bat index d068b329..b483da41 100644 --- a/cloud/docker/scripts/tea.bat +++ b/cloud/docker/scripts/tea.bat @@ -17,59 +17,15 @@ SET ARG_TEA_HOTFIX=na SET FILE_NAME=na SET ERROR_VAL=false SET TEA_REG="^.*tea.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" -if "!ARG_INSTALLERS_PLATFORM!" EQU "win" SET TEA_REG="^.*tea.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" - -call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !TEA_REG! "TIBCO TEA" false ARG_TEA_VERSION FILE_NAME ERROR_VAL -if !ERROR_VAL! EQU true GOTO END-withError - -if "!ARG_TEA_VERSION!" NEQ "na" ( - echo !ARG_TEA_VERSION!|findstr /r "^[1-9]\.[0-9]\.[0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper TEA version: [!ARG_TEA_VERSION!] It should be in [x.x.x] format Ex: [2.4.1]. - GOTO END-withError - ) - - SET /a teaval=!ARG_TEA_VERSION:.=! - SET /a teaminval=!VALID_TEA_MAP_MIN[%ARG_BE_VERSION%]:.=! - SET /a teamaxval=!VALID_TEA_MAP_MAX[%ARG_BE_VERSION%]:.=! - - if !teaval! GEQ !teaminval! if !teaval! LEQ !teamaxval! SET TEA_VALIDATION=true - if "!TEA_VALIDATION!" NEQ "true" ( - echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with TEA version: [!ARG_TEA_VERSION!]. - GOTO END-withError - ) - - echo TEAPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - - SET TEA_HF_REG=".*tea.*[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]\.zip$" - SET TEA_HF_TEA_VERSION=na - - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !TEA_HF_REG! "TIBCO TEA HF" false TEA_HF_TEA_VERSION FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!TEA_HF_TEA_VERSION!" NEQ "na" ( - if "!TEA_HF_TEA_VERSION!" EQU "!ARG_TEA_VERSION!" ( - call .\scripts\util.bat :IdentifyInstaller !ARG_INSTALLER_LOCATION! !TEA_HF_REG! "TIBCO TEA HF" true ARG_TEA_HOTFIX FILE_NAME ERROR_VAL - if !ERROR_VAL! EQU true GOTO END-withError - - if "!ARG_TEA_HOTFIX!" NEQ "na" ( - echo !ARG_TEA_HOTFIX!|findstr /r "^[0-9][0-9][0-9]$" > NUL - if !errorlevel! NEQ 0 ( - echo ERROR: Improper TEA hf version: [!ARG_TEA_HOTFIX!] It should be in [xxx] format Ex: [001]. - GOTO END-withError - ) - echo TEAHFPKG#!FILE_NAME! >> !ARG_TEMP_FOLDER!/package_files.txt - ) - ) else ( - echo ERROR: TIBCO TEA version: [!TEA_HF_TEA_VERSION!] in HF installer and TIBCO TEA Base version: [!ARG_TEA_VERSION!] is not matching. - GOTO END-withError - ) - ) +SET TEA_HF_REG=".*tea.*[0-9]\.[0-9]\.[0-9]_HF-[0-9][0-9][0-9]\.zip$" +SET DISPLAY_NAME="TIBCO TEA" +SET /a teaminval=!VALID_TEA_MAP_MIN[%ARG_BE_VERSION%]:.=! +SET /a teamaxval=!VALID_TEA_MAP_MAX[%ARG_BE_VERSION%]:.=! + +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !TEA_REG! !TEA_HF_REG! !DISPLAY_NAME! !teaminval! !teamaxval! !ARG_TEMP_FOLDER! ARG_TEA_VERSION ARG_TEA_HOTFIX +if "!ARG_TEA_HOTFIX!" EQU "true" ( + SET ERROR_VAL=true + SET ARG_TEA_HOTFIX=na ) - SET "%5=!ARG_TEA_VERSION!" & SET "%6=!ARG_TEA_HOTFIX!" & SET "%7=!ERROR_VAL!" EXIT /B 0 - -:END-withError - SET "%7=true" - EXIT /B 1 diff --git a/cloud/docker/scripts/util.bat b/cloud/docker/scripts/util.bat index 56024965..7e422974 100644 --- a/cloud/docker/scripts/util.bat +++ b/cloud/docker/scripts/util.bat @@ -5,42 +5,6 @@ call %* GOTO :EOF -:IdentifyInstaller - set INSTLR_LOCATION=%~1 - set INSTLR_REG=%~2 - set INSTLR_FULL_NAME=%~3 - set INSTLR_HF=%4 - set INSTLR_VERSION=na - set FILENAME=na - set MULTIPLE_INSTLRS=false - - for /f %%i in ('dir /b !INSTLR_LOCATION! ^| findstr /I "!INSTLR_REG!"') do ( - if !MULTIPLE_INSTLRS! EQU true ( - echo ERROR: Multiple !INSTLR_FULL_NAME! installer found at the specified location:[!INSTLR_LOCATION!]. - SET "%~5=!INSTLR_VERSION!" & SET "%~7=!MULTIPLE_INSTLRS!" - EXIT /B 1 - ) - set MULTIPLE_INSTLRS=true - set FILENAME=%%i - set FILENAME_SPLIT=!FILENAME:_= ! - set /a indx=0 - for %%j in (!FILENAME_SPLIT!) do ( - set /a indx += 1 - if !indx! EQU 3 ( - set INSTLR_VERSION=%%j - ) - if !INSTLR_HF! EQU true ( - if !indx! EQU 4 ( - set INSTLR_VERSION=%%j - set INSTLR_VERSION=!INSTLR_VERSION:.zip=! - set INSTLR_VERSION=!INSTLR_VERSION:HF-=! - ) - ) - ) - ) - SET "%~5=!INSTLR_VERSION!" & SET "%~6=!FILENAME!" & SET "%~7=false" - EXIT /B 0 - :RemoveDuplicatesAndFormatCPs set ARG_CONFIGPROVIDER=%~1 set ARG_CP_RESULT= @@ -91,3 +55,156 @@ GOTO :EOF ) ) EXIT /B 0 + +:CheckInstallerAndHF + set INSTLR_LOCATION_NEW=%~1 + set INSTLR_REG_NEW=%~2 + set INSTLR_REG_HF=%~3 + set DISPLAY_NAME=%~4 + set BASE_MIN_VALUE=%~5 + set BASE_MAX_VALUE=%~6 + set TEMP_FOLDER=%~7 + set BASE_INST_VERSION=na + set INSTLR_HF_VERSION=na + set FILENAME=na + set ERROR_VAL=false + set MULTIPLE_INSTLRS=false + + for /f %%i in ('dir /b !INSTLR_LOCATION_NEW! ^| findstr /I /r "!INSTLR_REG_NEW!"') do ( + if !MULTIPLE_INSTLRS! EQU true ( + echo ERROR: Multiple !DISPLAY_NAME! installer found at the specified location:[!INSTLR_LOCATION_NEW!]. + GOTO END-withError + ) + set MULTIPLE_INSTLRS=true + set FILENAME=%%i + set FILENAME_SPLIT=!FILENAME:_= ! + set /a indx=0 + for %%j in (!FILENAME_SPLIT!) do ( + set /a indx += 1 + if !indx! EQU 3 ( + set BASE_INST_VERSION=%%j + ) + ) + ) + set MULTIPLE_INSTLRS=false + + if "!BASE_INST_VERSION!" NEQ "na" ( + echo !BASE_INST_VERSION!|findstr /I /r "^[1-9]\.[0-9]\.[0-9]$ ^[1-9]\.[0-9][0-9]\.[0-9]$" > NUL + if !errorlevel! NEQ 0 ( + echo ERROR: Improper !DISPLAY_NAME! version: [!BASE_INST_VERSION!] It should be in [x.x.x] format Ex: [4.4.0]. + GOTO END-withError + ) + + SET /a baseval=!BASE_INST_VERSION:.=! + + if !BASE_MIN_VALUE! NEQ na if !BASE_MAX_VALUE! NEQ na ( + if !baseval! GEQ !BASE_MIN_VALUE! if !baseval! LEQ !BASE_MAX_VALUE! SET BASE_VALIDATION=true + if "!BASE_VALIDATION!" NEQ "true" ( + echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with !DISPLAY_NAME! version: [!ARG_AS_VERSION!]. + GOTO END-withError + ) + ) + + echo !DISPLAY_NAME!#!FILENAME! >> !TEMP_FOLDER!/package_files.txt + + SET HF_INSTLR_VERSION=na + SET DISPLAY_NAME_NEW=!DISPLAY_NAME! HF + + for /f %%i in ('dir /b !INSTLR_LOCATION_NEW! ^| findstr /I /r "!INSTLR_REG_HF!"') do ( + if !MULTIPLE_INSTLRS! EQU true ( + echo ERROR: Multiple !DISPLAY_NAME! installer found at the specified location:[!INSTLR_LOCATION_NEW!]. + GOTO END-withError + ) + set MULTIPLE_INSTLRS=true + set FILENAME=%%i + set FILENAME_SPLIT=!FILENAME:_= ! + set /a indx=0 + for %%j in (!FILENAME_SPLIT!) do ( + set /a indx += 1 + if !indx! EQU 3 ( + set HF_INSTLR_VERSION=%%j + ) + ) + ) + set MULTIPLE_INSTLRS=false + + if "!HF_INSTLR_VERSION!" NEQ "na" ( + if "!HF_INSTLR_VERSION!" EQU "!BASE_INST_VERSION!" ( + + for /f %%i in ('dir /b !INSTLR_LOCATION_NEW! ^| findstr /I /r "!INSTLR_REG_HF!"') do ( + if !MULTIPLE_INSTLRS! EQU true ( + echo ERROR: Multiple !DISPLAY_NAME! installer found at the specified location:[!INSTLR_LOCATION_NEW!]. + GOTO END-withError + ) + set MULTIPLE_INSTLRS=true + set FILENAME=%%i + set FILENAME_SPLIT=!FILENAME:_= ! + set /a indx=0 + for %%j in (!FILENAME_SPLIT!) do ( + set /a indx += 1 + if !indx! EQU 4 ( + set INSTLR_HF_VERSION=%%j + set INSTLR_HF_VERSION=!INSTLR_HF_VERSION:.zip=! + set INSTLR_HF_VERSION=!INSTLR_HF_VERSION:HF-=! + ) + ) + ) + + if "!INSTLR_HF_VERSION!" NEQ "na" ( + echo !INSTLR_HF_VERSION!|findstr /I /r "^[0-9][0-9][0-9]$" > NUL + if !errorlevel! NEQ 0 ( + echo ERROR: !DISPLAY_NAME_NEW! version: [!INSTLR_HF_VERSION!] It should be in [xxx] format Ex: [001]. + GOTO END-withError + ) + echo !DISPLAY_NAME_NEW!#!FILENAME! >> !ARG_TEMP_FOLDER!/package_files.txt + ) + ) else ( + echo ERROR: !DISPLAY_NAME! version: [!HF_INSTLR_VERSION!] in HF installer and !DISPLAY_NAME_NEW! Base version: [!BASE_INST_VERSION!] is not matching. + GOTO END-withError + ) + ) + ) + SET "%~8=!BASE_INST_VERSION!" & SET "%~9=!INSTLR_HF_VERSION!" + EXIT /B 0 + +:IdentifyInstaller + set INSTLR_LOCATION=%~1 + set INSTLR_REG=%~2 + set INSTLR_FULL_NAME=%~3 + set INSTLR_HF=%4 + set INSTLR_VERSION=na + set FILENAME=na + set MULTIPLE_INSTLRS=false + + for /f %%i in ('dir /b !INSTLR_LOCATION! ^| findstr /I "!INSTLR_REG!"') do ( + if !MULTIPLE_INSTLRS! EQU true ( + echo ERROR: Multiple !INSTLR_FULL_NAME! installer found at the specified location:[!INSTLR_LOCATION!]. + SET "%~5=!INSTLR_VERSION!" & SET "%~7=!MULTIPLE_INSTLRS!" + EXIT /B 1 + ) + set MULTIPLE_INSTLRS=true + set FILENAME=%%i + set FILENAME_SPLIT=!FILENAME:_= ! + set /a indx=0 + for %%j in (!FILENAME_SPLIT!) do ( + set /a indx += 1 + if !indx! EQU 3 ( + set INSTLR_VERSION=%%j + ) + if !INSTLR_HF! EQU true ( + if !indx! EQU 4 ( + set INSTLR_VERSION=%%j + set INSTLR_VERSION=!INSTLR_VERSION:.zip=! + set INSTLR_VERSION=!INSTLR_VERSION:HF-=! + ) + ) + ) + ) + echo "INSTLR_VERSION"!INSTLR_VERSION! + echo "FILENAME"!FILENAME! + SET "%~5=!INSTLR_VERSION!" & SET "%~6=!FILENAME!" & SET "%~7=false" + EXIT /B 0 + +:END-withError + SET "%9=true" + EXIT /B 1 From 3509bfc955c8cdaadf845d0254ea4925a055586c Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Tue, 14 Nov 2023 22:02:19 +0530 Subject: [PATCH 04/14] windows scripts updated --- cloud/docker/scripts/util.bat | 38 ----------------------------------- 1 file changed, 38 deletions(-) diff --git a/cloud/docker/scripts/util.bat b/cloud/docker/scripts/util.bat index 7e422974..25f5e5cb 100644 --- a/cloud/docker/scripts/util.bat +++ b/cloud/docker/scripts/util.bat @@ -167,44 +167,6 @@ GOTO :EOF SET "%~8=!BASE_INST_VERSION!" & SET "%~9=!INSTLR_HF_VERSION!" EXIT /B 0 -:IdentifyInstaller - set INSTLR_LOCATION=%~1 - set INSTLR_REG=%~2 - set INSTLR_FULL_NAME=%~3 - set INSTLR_HF=%4 - set INSTLR_VERSION=na - set FILENAME=na - set MULTIPLE_INSTLRS=false - - for /f %%i in ('dir /b !INSTLR_LOCATION! ^| findstr /I "!INSTLR_REG!"') do ( - if !MULTIPLE_INSTLRS! EQU true ( - echo ERROR: Multiple !INSTLR_FULL_NAME! installer found at the specified location:[!INSTLR_LOCATION!]. - SET "%~5=!INSTLR_VERSION!" & SET "%~7=!MULTIPLE_INSTLRS!" - EXIT /B 1 - ) - set MULTIPLE_INSTLRS=true - set FILENAME=%%i - set FILENAME_SPLIT=!FILENAME:_= ! - set /a indx=0 - for %%j in (!FILENAME_SPLIT!) do ( - set /a indx += 1 - if !indx! EQU 3 ( - set INSTLR_VERSION=%%j - ) - if !INSTLR_HF! EQU true ( - if !indx! EQU 4 ( - set INSTLR_VERSION=%%j - set INSTLR_VERSION=!INSTLR_VERSION:.zip=! - set INSTLR_VERSION=!INSTLR_VERSION:HF-=! - ) - ) - ) - ) - echo "INSTLR_VERSION"!INSTLR_VERSION! - echo "FILENAME"!FILENAME! - SET "%~5=!INSTLR_VERSION!" & SET "%~6=!FILENAME!" & SET "%~7=false" - EXIT /B 0 - :END-withError SET "%9=true" EXIT /B 1 From 312c144813d8955ac4f90f8fe25281f9a56c6b10 Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Thu, 16 Nov 2023 10:09:51 +0530 Subject: [PATCH 05/14] fix compatible issue --- cloud/docker/scripts/util.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/cloud/docker/scripts/util.bat b/cloud/docker/scripts/util.bat index 25f5e5cb..91c083cb 100644 --- a/cloud/docker/scripts/util.bat +++ b/cloud/docker/scripts/util.bat @@ -69,6 +69,7 @@ GOTO :EOF set FILENAME=na set ERROR_VAL=false set MULTIPLE_INSTLRS=false + SET BASE_VALIDATION=false for /f %%i in ('dir /b !INSTLR_LOCATION_NEW! ^| findstr /I /r "!INSTLR_REG_NEW!"') do ( if !MULTIPLE_INSTLRS! EQU true ( From 3185943c7db786022f0da927a36712960c89c10d Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Thu, 16 Nov 2023 10:12:34 +0530 Subject: [PATCH 06/14] fix compatible issue --- cloud/docker/scripts/util.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/docker/scripts/util.bat b/cloud/docker/scripts/util.bat index 91c083cb..98b061aa 100644 --- a/cloud/docker/scripts/util.bat +++ b/cloud/docker/scripts/util.bat @@ -101,7 +101,7 @@ GOTO :EOF if !BASE_MIN_VALUE! NEQ na if !BASE_MAX_VALUE! NEQ na ( if !baseval! GEQ !BASE_MIN_VALUE! if !baseval! LEQ !BASE_MAX_VALUE! SET BASE_VALIDATION=true if "!BASE_VALIDATION!" NEQ "true" ( - echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with !DISPLAY_NAME! version: [!ARG_AS_VERSION!]. + echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with !DISPLAY_NAME! version: [!BASE_INST_VERSION!]. GOTO END-withError ) ) From 771278da03f11af4cf0455a400a1c8501d545884 Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Mon, 20 Nov 2023 11:57:22 +0530 Subject: [PATCH 07/14] ftl dual version logic updated for windows scripts --- cloud/docker/build_image.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cloud/docker/build_image.bat b/cloud/docker/build_image.bat index 4c8e61d7..ec6cb7d5 100644 --- a/cloud/docker/build_image.bat +++ b/cloud/docker/build_image.bat @@ -549,7 +549,10 @@ if !INSTALLATION_TYPE! EQU fromlocal ( call .\scripts\ftl.bat !ARG_INSTALLER_LOCATION! !ARG_INSTALLERS_PLATFORM! !TEMP_FOLDER! !ARG_BE_VERSION! ARG_FTL_VERSION ARG_FTL_HOTFIX ERROR_VAL if !ERROR_VAL! EQU true GOTO END-withError - if !ARG_FTL_VERSION! NEQ na set ARG_FTL_SHORT_VERSION=!ARG_FTL_VERSION:~0,3! + if !ARG_FTL_VERSION! NEQ na ( + echo !ARG_FTL_VERSION! | findstr /I /r "^[1-9]\.[0-9]\." > NUL && set ARG_FTL_SHORT_VERSION=!ARG_FTL_VERSION:~0,3! + echo !ARG_FTL_VERSION! | findstr /I /r "^[1-9]\.[0-9][0-9]\." > NUL && set ARG_FTL_SHORT_VERSION=!ARG_FTL_VERSION:~0,4! + ) ) set /a BE6VAL=!ARG_BE_VERSION:.=! From f88c4f26d8d32fd77b2e2ce115ca1188d35064d6 Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Fri, 1 Dec 2023 10:20:57 +0530 Subject: [PATCH 08/14] ftl fix updated --- cloud/docker/scripts/ftl.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud/docker/scripts/ftl.bat b/cloud/docker/scripts/ftl.bat index 8a4fb3f4..3afb8778 100644 --- a/cloud/docker/scripts/ftl.bat +++ b/cloud/docker/scripts/ftl.bat @@ -31,7 +31,7 @@ SET ARG_FTL_HOTFIX=na SET FILE_NAME=na SET ERROR_VAL=false SET FTL_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$ ^.*ftl.*[0-9]\.[0-9][0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.zip$" -if "!ARG_INSTALLERS_PLATFORM!" EQU "win" SET FTL_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.exe$" +if "!ARG_INSTALLERS_PLATFORM!" EQU "win" SET FTL_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.exe$ ^.*ftl.*[0-9]\.[0-9][0-9]\.[0-9]_!ARG_INSTALLERS_PLATFORM!.*\.exe$" SET FTL_HF_REG="^.*ftl.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$ ^.*ftl.*[0-9]\.[0-9][0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" SET DISPLAY_NAME="TIBCO FTL" SET /a ftlminval=!VALID_FTL_MAP_MIN[%ARG_BE_VERSION%]:.=! From a3eed08b88c24963ed258ff63f2a7a71801f847f Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Mon, 27 May 2024 17:26:22 +0530 Subject: [PATCH 09/14] fix issues related to rms container tests --- cloud/docker/build_image.bat | 5 +++-- cloud/docker/build_image.sh | 6 ++++-- cloud/docker/lib/be_docker_install.bat | 3 ++- cloud/docker/lib/prepare_finalimage.sh | 3 ++- cloud/docker/tests/run_tests.sh | 4 ++++ cloud/docker/tests/testcases/as.yaml | 2 +- cloud/docker/tests/testcases/ftl.yaml | 2 +- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/cloud/docker/build_image.bat b/cloud/docker/build_image.bat index ec6cb7d5..e2e29c36 100644 --- a/cloud/docker/build_image.bat +++ b/cloud/docker/build_image.bat @@ -894,7 +894,8 @@ if !INSTALLATION_TYPE! EQU frominstallers ( powershell -Command "Copy-Item '!TRA_JAVA_HOME!' -Destination '!TEMP_FOLDER!\tibcoHome\!JAVA_HOME_DIR_NAME!' -Recurse | out-null" if !IMAGE_NAME! EQU !RMS_IMAGE! ( - powershell -Command "Copy-Item '!BE_HOME!\rms','!BE_HOME!\studio','!BE_HOME!\eclipse-platform','!BE_HOME!\mm' -Destination '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!' -Recurse | out-null" > NUL + if exist "!BE_HOME!\eclipse-platform" powershell -Command "Copy-Item '!BE_HOME!\eclipse-platform' -Destination '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!' -Recurse | out-null" > NUL + powershell -Command "Copy-Item '!BE_HOME!\rms','!BE_HOME!\studio','!BE_HOME!\mm' -Destination '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!' -Recurse | out-null" > NUL ) powershell -Command "(Get-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\!TRA_FILE!') -replace '!TRA_JAVA_HOME!', 'c:/tibco/!JAVA_HOME_DIR_NAME!/!ARG_JRE_VERSION!' | Set-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\!TRA_FILE!'" @@ -914,7 +915,7 @@ if !INSTALLATION_TYPE! EQU frominstallers ( powershell -Command "rm -Recurse -Force '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\rms\shared\*' -ErrorAction Ignore | out-null" :: Replace user TIBCO_HOME path with container's tra files - powershell -Command "(Get-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\eclipse-platform\eclipse\dropins\TIBCOBusinessEvents-Studio-plugins.link') -replace @(Select-String -Path '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\rms\bin\be-rms.tra' -Pattern '^tibco.env.TIB_HOME').Line.Substring(19), 'c:/tibco' | Set-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\eclipse-platform\eclipse\dropins\TIBCOBusinessEvents-Studio-plugins.link'" + if exist "!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\eclipse-platform" powershell -Command "(Get-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\eclipse-platform\eclipse\dropins\TIBCOBusinessEvents-Studio-plugins.link') -replace @(Select-String -Path '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\rms\bin\be-rms.tra' -Pattern '^tibco.env.TIB_HOME').Line.Substring(19), 'c:/tibco' | Set-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\eclipse-platform\eclipse\dropins\TIBCOBusinessEvents-Studio-plugins.link'" powershell -Command "(Get-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\studio\bin\studio-tools.tra') -replace @(Select-String -Path '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\rms\bin\be-rms.tra' -Pattern '^tibco.env.TIB_HOME').Line.Substring(19), 'c:/tibco' | Set-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\studio\bin\studio-tools.tra'" powershell -Command "(Get-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\rms\bin\be-rms.tra') -replace @(Select-String -Path '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\rms\bin\be-rms.tra' -Pattern '^tibco.env.TIB_HOME').Line.Substring(19), 'c:/tibco' | Set-Content '!TEMP_FOLDER!\tibcoHome\be\!ARG_BE_SHORT_VERSION!\rms\bin\be-rms.tra'" diff --git a/cloud/docker/build_image.sh b/cloud/docker/build_image.sh index 0bda4640..e2cbe2b0 100755 --- a/cloud/docker/build_image.sh +++ b/cloud/docker/build_image.sh @@ -80,7 +80,7 @@ VALIDATE_FTL_AS="false" #Map used to store the BE and it's comapatible JRE version declare -a BE_VERSION_AND_JRE_MAP -BE_VERSION_AND_JRE_MAP=("5.6.0" "1.8.0" "5.6.1" "11" "6.0.0" "11" "6.1.0" "11" "6.1.1" "11" "6.1.2" "11" "6.2.0" "11" "6.2.1" "11" "6.2.2" "11" "6.3.0" "11" "6.3.1" "11") +BE_VERSION_AND_JRE_MAP=("5.6.0" "1.8.0" "5.6.1" "11" "6.0.0" "11" "6.1.0" "11" "6.1.1" "11" "6.1.2" "11" "6.2.0" "11" "6.2.1" "11" "6.2.2" "11" "6.3.0" "11" "6.3.1" "17") # as legacy related args AS_LEG_HOME="na" @@ -916,7 +916,8 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then #tar command for be package BE_TAR_CMD=" tar -C $BE_HOME_BASE -cf $TEMP_FOLDER/be.tar $BE_DIR/lib $BE_DIR/bin " if [ "$IMAGE_NAME" = "$RMS_IMAGE" ]; then - BE_TAR_CMD="$BE_TAR_CMD $BE_DIR/rms $BE_DIR/studio $BE_DIR/eclipse-platform $BE_DIR/examples/standard/WebStudio $BE_DIR/mm " + BE_TAR_CMD="$BE_TAR_CMD $BE_DIR/rms $BE_DIR/studio $BE_DIR/examples/standard/WebStudio $BE_DIR/mm " + [ -d "$BE_DIR/eclipse-platform" ] && BE_TAR_CMD="$BE_TAR_CMD $BE_DIR/eclipse-platform " elif [ "$IMAGE_NAME" = "$TEA_IMAGE" ]; then BE_TAR_CMD="$BE_TAR_CMD $BE_DIR/teagent $BE_DIR/mm " fi @@ -1154,6 +1155,7 @@ if [ "$ARG_BUILD_TOOL" = "buildah" ]; then buildah bud -f $TEMP_FOLDER/$ARG_DOCKER_FILE $BUILD_ARGS else docker build --force-rm -f $TEMP_FOLDER/${ARG_DOCKER_FILE##*/} $BUILD_ARGS + # docker build --progress=plain --no-cache --force-rm -f $TEMP_FOLDER/${ARG_DOCKER_FILE##*/} $BUILD_ARGS fi if [ "$?" != 0 ]; then diff --git a/cloud/docker/lib/be_docker_install.bat b/cloud/docker/lib/be_docker_install.bat index fa22cbb1..425e3965 100644 --- a/cloud/docker/lib/be_docker_install.bat +++ b/cloud/docker/lib/be_docker_install.bat @@ -169,7 +169,8 @@ if exist "c:\working\%DEL_LIST_FILE_NAME%" ( if "%COMPONENT%" EQU "rms" ( mkdir c:\_tibco\be\%BE_SHORT_VERSION%\bin c:\_tibco\be\%BE_SHORT_VERSION%\examples\standard - powershell -Command "Copy-Item '%BE_HOME%\lib','%BE_HOME%\rms','%BE_HOME%\studio','%BE_HOME%\mm','%BE_HOME%\eclipse-platform' -Destination 'c:\_tibco\be\%BE_SHORT_VERSION%' -Recurse | out-null" + if exist "%BE_HOME%\eclipse-platform" powershell -Command "Copy-Item '%BE_HOME%\eclipse-platform' -Destination 'c:\_tibco\be\%BE_SHORT_VERSION%' -Recurse | out-null" + powershell -Command "Copy-Item '%BE_HOME%\lib','%BE_HOME%\rms','%BE_HOME%\studio','%BE_HOME%\mm' -Destination 'c:\_tibco\be\%BE_SHORT_VERSION%' -Recurse | out-null" powershell -Command "Get-ChildItem -Path 'c:\_tibco\be\%BE_SHORT_VERSION%\lib\ext\tpcl\aws' -exclude guava*.jar | Remove-Item -force" powershell -Command "Copy-Item '%BE_HOME%\examples\standard\WebStudio' -Destination 'c:\_tibco\be\%BE_SHORT_VERSION%\examples\standard' -Recurse | out-null" if exist "%BE_HOME%\decisionmanager" powershell -Command "Copy-Item '%BE_HOME%\decisionmanager' -Destination 'c:\_tibco\be\%BE_SHORT_VERSION%' -Recurse | out-null" diff --git a/cloud/docker/lib/prepare_finalimage.sh b/cloud/docker/lib/prepare_finalimage.sh index 50324d8f..481bb306 100644 --- a/cloud/docker/lib/prepare_finalimage.sh +++ b/cloud/docker/lib/prepare_finalimage.sh @@ -98,7 +98,8 @@ if [ "$COMPONENT" != "tea" ]; then cp -r /opt/tibco/be/ext /tibco_home/be if [ "$COMPONENT" = "rms" ]; then - cp -r ../mm ../rms ../studio ../eclipse-platform /tibco_home/be/${BE_SHORT_VERSION} + [ -d "../eclipse-platform" ] && cp -r ../eclipse-platform /tibco_home/be/${BE_SHORT_VERSION} + cp -r ../mm ../rms ../studio /tibco_home/be/${BE_SHORT_VERSION} rm -f /tibco_home/be/${BE_SHORT_VERSION}/rms/bin/be-rms.tra.1 rm -f /tibco_home/be/${BE_SHORT_VERSION}/rms/bin/be-rms.tra.2 mkdir -p /tibco_home/be/${BE_SHORT_VERSION}/examples/standard diff --git a/cloud/docker/tests/run_tests.sh b/cloud/docker/tests/run_tests.sh index cca1e7ad..a4b092f7 100755 --- a/cloud/docker/tests/run_tests.sh +++ b/cloud/docker/tests/run_tests.sh @@ -18,6 +18,7 @@ ARG_TEA_VERSION=na ARG_CP_PROVIDER=na ARG_IMAGE_TYPE=app ARG_KEY_VALUE_PAIRS='' +ARG_TRA_FILENAME=bin\\/be-engine.tra ## local variables TEMP_FOLDER="tmp_$RANDOM" @@ -171,13 +172,16 @@ if [ $ARG_BE_SHORT_VERSION != na ]; then echo "INFO: be version: [${ARG_BE_SHORT_VERSION}]" if [ $ARG_IMAGE_TYPE = rms ]; then CONFIG_FILE_ARGS+=" --config /test/${TEMP_FOLDER}/be-rms.yaml " + ARG_TRA_FILENAME=rms\\/bin\\/be-rms.tra elif [ $ARG_IMAGE_TYPE = teagent ]; then CONFIG_FILE_ARGS+=" --config /test/${TEMP_FOLDER}/be-teagent.yaml " + ARG_TRA_FILENAME=teagent\\/bin\\/be-teagent.tra else CONFIG_FILE_ARGS+=" --config /test/${TEMP_FOLDER}/be.yaml " fi SED_EXP+=" -e s/BE_SHORT_VERSION/${ARG_BE_SHORT_VERSION}/g " SED_EXP+=" -e s/JAVA_HOME_DIR_NAME/$ARG_JAVA_HOME_DIR_NAME/g " + SED_EXP+=" -e s/TRA_FILENAME/${ARG_TRA_FILENAME}/g " else echo "ERROR: Be version is mandatory " printf " ${USAGE} " diff --git a/cloud/docker/tests/testcases/as.yaml b/cloud/docker/tests/testcases/as.yaml index 3af5b4b7..56bf3009 100644 --- a/cloud/docker/tests/testcases/as.yaml +++ b/cloud/docker/tests/testcases/as.yaml @@ -12,5 +12,5 @@ fileExistenceTests: shouldExist: true fileContentTests: - name: 'BE TRA Updated with ACTIVESPACES home' - path: '/opt/tibco/be/BE_SHORT_VERSION/bin/be-engine.tra' + path: '/opt/tibco/be/BE_SHORT_VERSION/TRA_FILENAME' expectedContents: ['ACTIVESPACES_HOME=/opt/tibco/as/AS_SHORT_VERSION'] \ No newline at end of file diff --git a/cloud/docker/tests/testcases/ftl.yaml b/cloud/docker/tests/testcases/ftl.yaml index 6751fd7b..1c28a442 100644 --- a/cloud/docker/tests/testcases/ftl.yaml +++ b/cloud/docker/tests/testcases/ftl.yaml @@ -12,5 +12,5 @@ fileExistenceTests: shouldExist: true fileContentTests: - name: 'BE TRA Updated with FTL home' - path: '/opt/tibco/be/BE_SHORT_VERSION/bin/be-engine.tra' + path: '/opt/tibco/be/BE_SHORT_VERSION/TRA_FILENAME' expectedContents: ['FTL_HOME=/opt/tibco/ftl/FTL_SHORT_VERSION'] \ No newline at end of file From 099d279eef17813eb4e12297977cfdb253a3ec0c Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Tue, 4 Jun 2024 12:10:59 +0530 Subject: [PATCH 10/14] jre suppliment changes added for shell scripts --- cloud/docker/build_image.sh | 34 ++++++++++++++++--- cloud/docker/dockerfiles/Dockerfile | 5 ++- cloud/docker/lib/be_docker_install.pm | 47 +++++++++++++++++++++++++-- cloud/docker/scripts/be.bat | 2 +- cloud/docker/scripts/jresplmnt.sh | 15 +++++++++ cloud/docker/scripts/utils.sh | 8 +++-- 6 files changed, 100 insertions(+), 11 deletions(-) create mode 100644 cloud/docker/scripts/jresplmnt.sh diff --git a/cloud/docker/build_image.sh b/cloud/docker/build_image.sh index e2cbe2b0..5a473e5d 100755 --- a/cloud/docker/build_image.sh +++ b/cloud/docker/build_image.sh @@ -125,6 +125,11 @@ OPEN_JDK_FILENAME="na" JAVA_HOME_DIR_NAME=tibcojre64 +# JRE SUPPLEMENT related args +ARG_JRESPLMNT_VERSION="na" +ARG_JRESPLMNT_SHORT_VERSION="na" +ARG_JRESPLMNT_HOTFIX="na" + # container image size optimize related vars OPTIMIZATION_SUPPORTED_MODULES=$(perl -e 'require "./lib/be_container_optimize.pl"; print be_container_optimize::get_all_modules_print_friendly()') INCLUDE_MODULES="na" @@ -587,6 +592,9 @@ else fi ARG_PYTHON_VERSION=python2 fi + + # check jresplmnt installer + source ./scripts/jresplmnt.sh fi #Find JRE Version for given BE Version @@ -764,6 +772,13 @@ if ! [ "$ARG_TEA_VERSION" = "na" -o -z "${ARG_TEA_VERSION// }" ]; then fi fi +if ! [ "$ARG_JRESPLMNT_VERSION" = "na" -o -z "${ARG_JRESPLMNT_VERSION// }" ]; then + echo "INFO: JRESPLMNT VERSION : [$ARG_JRESPLMNT_VERSION]" + if ! [ "$ARG_JRESPLMNT_HOTFIX" = "na" -o -z "${ARG_JRESPLMNT_HOTFIX// }" ]; then + echo "INFO: JRESPLMNT HF : [$ARG_JRESPLMNT_HOTFIX]" + fi +fi + if ! [ "$AS_HOME" = "na" -o -z "${AS_HOME// }" ]; then echo "INFO: AS HOME : [$AS_HOME]" fi @@ -1136,20 +1151,31 @@ if [ -z "$DOCKER_BUILDKIT" ]; then export DOCKER_BUILDKIT=1 fi +BUILD_ARGS=$(echo --build-arg BE_PRODUCT_VERSION="$ARG_BE_VERSION" --build-arg BE_SHORT_VERSION="$ARG_BE_SHORT_VERSION" --build-arg BE_PRODUCT_IMAGE_VERSION="$ARG_IMAGE_VERSION" ) +BUILD_ARGS=$(echo $BUILD_ARGS --build-arg JRE_VERSION=$ARG_JRE_VERSION --build-arg OPEN_JDK_FILENAME=$OPEN_JDK_FILENAME ) +BUILD_ARGS_CDD_EAR_CONFG=$(echo --build-arg CDD_FILE_NAME=$CDD_FILE_NAME --build-arg EAR_FILE_NAME=$EAR_FILE_NAME --build-arg CONFIGPROVIDER=$ARG_CONFIGPROVIDER ) +BUILD_ARGS_AS=$(echo --build-arg AS_VERSION="$ARG_AS_LEG_VERSION" --build-arg AS_SHORT_VERSION="$ARG_AS_LEG_SHORT_VERSION" --build-arg AS_PRODUCT_HOTFIX="$ARG_AS_LEG_HOTFIX" ) +BUILD_ARGS_FTL=$(echo --build-arg FTL_VERSION="$ARG_FTL_VERSION" --build-arg FTL_SHORT_VERSION="$ARG_FTL_SHORT_VERSION" --build-arg FTL_PRODUCT_HOTFIX="$ARG_FTL_HOTFIX" ) +BUILD_ARGS_HAWK=$(echo --build-arg HAWK_VERSION="$ARG_HAWK_VERSION" --build-arg HAWK_SHORT_VERSION="$ARG_HAWK_SHORT_VERSION" --build-arg HAWK_PRODUCT_HOTFIX="$ARG_HAWK_HOTFIX" ) +BUILD_ARGS_ACTIVESPACES=$(echo --build-arg ACTIVESPACES_VERSION="$ARG_AS_VERSION" --build-arg ACTIVESPACES_SHORT_VERSION="$ARG_AS_SHORT_VERSION" --build-arg ACTIVESPACES_PRODUCT_HOTFIX="$ARG_AS_HOTFIX" ) +BUILD_ARGS_JRESPLMNT=$(echo --build-arg JRESPLMNT_VERSION="$ARG_JRESPLMNT_VERSION" --build-arg JRESPLMNT_PRODUCT_HOTFIX="$ARG_JRESPLMNT_HOTFIX" ) + if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then if [ "$IMAGE_NAME" = "$TEA_IMAGE" ]; then - BUILD_ARGS=$(echo --build-arg PYTHON_VERSION="$ARG_PYTHON_VERSION" --build-arg BE_PRODUCT_VERSION="$ARG_BE_VERSION" --build-arg BE_SHORT_VERSION="$ARG_BE_SHORT_VERSION" --build-arg BE_PRODUCT_IMAGE_VERSION="$ARG_IMAGE_VERSION" --build-arg JRE_VERSION=$ARG_JRE_VERSION --build-arg OPEN_JDK_FILENAME=$OPEN_JDK_FILENAME -t "$ARG_IMAGE_VERSION" "$TEMP_FOLDER") + BUILD_ARGS=$(echo $BUILD_ARGS --build-arg PYTHON_VERSION="$ARG_PYTHON_VERSION" ) else - BUILD_ARGS=$(echo --build-arg BE_PRODUCT_VERSION="$ARG_BE_VERSION" --build-arg BE_SHORT_VERSION="$ARG_BE_SHORT_VERSION" --build-arg BE_PRODUCT_IMAGE_VERSION="$ARG_IMAGE_VERSION" --build-arg JRE_VERSION=$ARG_JRE_VERSION --build-arg OPEN_JDK_FILENAME=$OPEN_JDK_FILENAME --build-arg CDD_FILE_NAME=$CDD_FILE_NAME --build-arg EAR_FILE_NAME=$EAR_FILE_NAME --build-arg CONFIGPROVIDER=$ARG_CONFIGPROVIDER -t "$ARG_IMAGE_VERSION" "$TEMP_FOLDER") + BUILD_ARGS=$(echo $BUILD_ARGS $BUILD_ARGS_CDD_EAR_CONFG ) fi else if [ "$IMAGE_NAME" = "$TEA_IMAGE" ]; then - BUILD_ARGS=$(echo --build-arg PYTHON_VERSION="$ARG_PYTHON_VERSION" --build-arg BE_PRODUCT_VERSION="$ARG_BE_VERSION" --build-arg BE_SHORT_VERSION="$ARG_BE_SHORT_VERSION" --build-arg BE_PRODUCT_IMAGE_VERSION="$ARG_IMAGE_VERSION" --build-arg BE_PRODUCT_HOTFIX="$ARG_BE_HOTFIX" --build-arg JRE_VERSION=$ARG_JRE_VERSION --build-arg TEA_VERSION="$ARG_TEA_VERSION" --build-arg TEA_PRODUCT_HOTFIX="$ARG_TEA_HOTFIX" --build-arg OPEN_JDK_FILENAME=$OPEN_JDK_FILENAME -t "$ARG_IMAGE_VERSION" $TEMP_FOLDER) + BUILD_ARGS=$(echo $BUILD_ARGS --build-arg PYTHON_VERSION="$ARG_PYTHON_VERSION" --build-arg BE_PRODUCT_HOTFIX="$ARG_BE_HOTFIX" --build-arg TEA_VERSION="$ARG_TEA_VERSION" --build-arg TEA_PRODUCT_HOTFIX="$ARG_TEA_HOTFIX" $BUILD_ARGS_JRESPLMNT ) else - BUILD_ARGS=$(echo --build-arg BE_PRODUCT_VERSION="$ARG_BE_VERSION" --build-arg BE_SHORT_VERSION="$ARG_BE_SHORT_VERSION" --build-arg BE_PRODUCT_HOTFIX="$ARG_BE_HOTFIX" --build-arg BE_PRODUCT_ADDONS="$ARG_ADDONS" --build-arg AS_VERSION="$ARG_AS_LEG_VERSION" --build-arg AS_SHORT_VERSION="$ARG_AS_LEG_SHORT_VERSION" --build-arg AS_PRODUCT_HOTFIX="$ARG_AS_LEG_HOTFIX" --build-arg FTL_VERSION="$ARG_FTL_VERSION" --build-arg FTL_SHORT_VERSION="$ARG_FTL_SHORT_VERSION" --build-arg FTL_PRODUCT_HOTFIX="$ARG_FTL_HOTFIX" --build-arg HAWK_VERSION="$ARG_HAWK_VERSION" --build-arg HAWK_SHORT_VERSION="$ARG_HAWK_SHORT_VERSION" --build-arg HAWK_PRODUCT_HOTFIX="$ARG_HAWK_HOTFIX" --build-arg ACTIVESPACES_VERSION="$ARG_AS_VERSION" --build-arg ACTIVESPACES_SHORT_VERSION="$ARG_AS_SHORT_VERSION" --build-arg ACTIVESPACES_PRODUCT_HOTFIX="$ARG_AS_HOTFIX" --build-arg CDD_FILE_NAME=$CDD_FILE_NAME --build-arg EAR_FILE_NAME=$EAR_FILE_NAME --build-arg JRE_VERSION=$ARG_JRE_VERSION --build-arg OPEN_JDK_FILENAME=$OPEN_JDK_FILENAME --build-arg CONFIGPROVIDER=$ARG_CONFIGPROVIDER --build-arg BE_PRODUCT_IMAGE_VERSION="$ARG_IMAGE_VERSION" -t "$ARG_IMAGE_VERSION" $TEMP_FOLDER) + BUILD_ARGS=$(echo $BUILD_ARGS --build-arg BE_PRODUCT_HOTFIX="$ARG_BE_HOTFIX" --build-arg BE_PRODUCT_ADDONS="$ARG_ADDONS" $BUILD_ARGS_AS $BUILD_ARGS_FTL $BUILD_ARGS_HAWK $BUILD_ARGS_ACTIVESPACES $BUILD_ARGS_JRESPLMNT $BUILD_ARGS_CDD_EAR_CONFG ) fi fi +BUILD_ARGS=$(echo $BUILD_ARGS -t "$ARG_IMAGE_VERSION" "$TEMP_FOLDER" ) + if [ "$ARG_BUILD_TOOL" = "buildah" ]; then SKIP_CONTAINER_TESTS="true" buildah bud -f $TEMP_FOLDER/$ARG_DOCKER_FILE $BUILD_ARGS diff --git a/cloud/docker/dockerfiles/Dockerfile b/cloud/docker/dockerfiles/Dockerfile index da4935c2..ab11e160 100644 --- a/cloud/docker/dockerfiles/Dockerfile +++ b/cloud/docker/dockerfiles/Dockerfile @@ -43,6 +43,8 @@ ARG OPEN_JDK_FILENAME ARG CDD_FILE_NAME ARG EAR_FILE_NAME ARG AS_SHORT_VERSION +ARG JRESPLMNT_VERSION +ARG JRESPLMNT_PRODUCT_HOTFIX LABEL be-intermediate-image=true @@ -65,9 +67,10 @@ RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_with_sil RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('ftl','$FTL_VERSION','$FTL_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('as','$ACTIVESPACES_VERSION','$ACTIVESPACES_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_be('$BE_PRODUCT_VERSION','enterprise','$BE_PRODUCT_ADDONS','$BE_PRODUCT_HOTFIX','$AS_PRODUCT_HOTFIX','$AS_VERSION')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_with_universal_installer('JRESupplement','jresplmnt','$JRESPLMNT_VERSION','$JRESPLMNT_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::replaceRunbeVersionToken('$BE_PRODUCT_VERSION','./run')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::generateAnnotationIndexes('/opt/tibco/be/${BE_SHORT_VERSION}', '/opt/tibco/tibcojre64/${JRE_VERSION}')" \ - && rm -rf as_installers as_installers-hf be_installers ftl_installers ftl_installers_hf hawk_installer hawk_installer-hf activespaces_installers activespaces_installers_hf *.zip + && rm -rf JRESupplement_installers as_installers as_installers-hf be_installers ftl_installers ftl_installers_hf hawk_installer hawk_installer-hf activespaces_installers activespaces_installers_hf *.zip RUN ./prepare_finalimage.sh RUN chgrp -R 0 /tibco_home && chmod -R g=u /tibco_home \ diff --git a/cloud/docker/lib/be_docker_install.pm b/cloud/docker/lib/be_docker_install.pm index 0e62454e..531ac0a3 100755 --- a/cloud/docker/lib/be_docker_install.pm +++ b/cloud/docker/lib/be_docker_install.pm @@ -13,7 +13,7 @@ local $/ ; ##PROPERTIES----------------------------------------------------------------------------------------------------------- # SCRIPT CONSTANTS----------------------------------------------- -my $DEBUG_ENABLE = 0; #Set it to 1 to enable debug logs +my $DEBUG_ENABLE = 1; #Set it to 1 to enable debug logs # CONSTANTS---------------------------------------------------------- my $ROOT_FOLDER = "."; @@ -183,7 +183,6 @@ sub install_be { print "\nINFO:Performing cleanup...\n"; my $beShortVersion = getShortVersion($arg_beVersion); - `rm -rf /opt/tibco/tools`; `rm -rf /opt/tibco/be/$beShortVersion/admin-plugins`; `rm -rf /opt/tibco/be/$beShortVersion/api`; `rm -rf /opt/tibco/be/$beShortVersion/uninstaller_scripts`; @@ -223,6 +222,50 @@ sub install_package_with_silentfile { print "\nINFO:Installing $arg_pkgName $arg_pkgVersion...DONE\n\n"; } +sub install_package_with_universal_installer { + my $arg_pkgName = shift; + my $arg_installerKeyWord = shift; + my $arg_pkgVersion = shift; + my $arg_pkgHotfix = shift; + + if($arg_pkgVersion == "na"){ + return 1; + } + + my $basePkgHfRegex='*'.$arg_installerKeyWord.'_'.$arg_pkgVersion.'*'.$arg_pkgHotfix.'*zip'; + my (@basePkgHf) = glob "$ROOT_FOLDER/$basePkgHfRegex"; + + my $basePkgHfPkgVal="na"; + if(scalar @basePkgHf == 1){ + $basePkgHfPkgVal=$basePkgHf[0]; + } + + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion $basePkgHf[0] ...\n"; + + my $copyToDir=$arg_pkgName.'_installers'; + + my $result=extractPackage($arg_pkgName,$ROOT_FOLDER,$basePkgHf[0],$copyToDir); + if($result == 0){ + print "\nERROR : Error occurred while extracting $arg_pkgName installer package - $basePkgHf[0]. Aborting\n"; + return 0; + } + + # COPY Universal installer to extracted location + print "\nINFO:Copy Universal Installer to $copyToDir ...\n"; + my $copyInstallerToHf=`cp /opt/tibco/tools/universal_installer/TIBCOUniversalInstaller-lnx-x86-64.bin $copyToDir`; + print "\nINFO:Copy Universal Installer to $copyInstallerToHf ... END\n"; + print "$copyToDir exists!\n" if -e "$copyToDir/TIBCOUniversalInstaller-lnx-x86-64.bin" ; + + $result=installHotfix('','','',$copyToDir); + if($result == 0) + { + print "\nERROR : Error occurred while installing $arg_pkgName installer package - $basePkgHf[0]. Aborting\n"; + return 0; + } + + print "\nINFO:Installing $arg_pkgName $arg_pkgVersion...DONE\n\n"; +} + sub install_package_withtar { my $arg_pkgName = shift; my $arg_pkgVersion = shift; diff --git a/cloud/docker/scripts/be.bat b/cloud/docker/scripts/be.bat index 0edd1bd2..99209c01 100644 --- a/cloud/docker/scripts/be.bat +++ b/cloud/docker/scripts/be.bat @@ -17,7 +17,7 @@ SET GLOBAL_JRE_VERSION_MAP[6.2.0]=11 SET GLOBAL_JRE_VERSION_MAP[6.2.1]=11 SET GLOBAL_JRE_VERSION_MAP[6.2.2]=11 SET GLOBAL_JRE_VERSION_MAP[6.3.0]=11 -SET GLOBAL_JRE_VERSION_MAP[6.3.1]=11 +SET GLOBAL_JRE_VERSION_MAP[6.3.1]=17 REM variables SET ARG_BE_VERSION=na diff --git a/cloud/docker/scripts/jresplmnt.sh b/cloud/docker/scripts/jresplmnt.sh new file mode 100644 index 00000000..ed2b7d93 --- /dev/null +++ b/cloud/docker/scripts/jresplmnt.sh @@ -0,0 +1,15 @@ +#supported JRE Suppliment versions for be version +JRESPLMNT_VERSION_MAP_MIN=( "6.2.1:1.0.0" "6.3.0:1.0.0" ) +JRESPLMNT_VERSION_MAP_MAX=( "6.2.1:2.0.0" "6.3.0:2.0.0" ) + +jresplmntMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${JRESPLMNT_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) +jresplmntMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${JRESPLMNT_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) + +jresplmntPkgRegex="TIB_jresplmnt_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_HF-[0-9][0-9][0-9]_linux_x86_64.zip" +jresplmntPkgHfRegex="TIB_jresplmnt_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_HF-[0-9][0-9][0-9]_linux_x86_64.zip" + +validateInstallers "JRESPLMNT" "$jresplmntPkgRegex" "$jresplmntPkgHfRegex" "$jresplmntMinVersion" "$jresplmntMaxVersion" + +ARG_JRESPLMNT_VERSION=$ARG_BASE_VERSION +ARG_JRESPLMNT_SHORT_VERSION=$ARG_BASE_SHORT_VERSION +ARG_JRESPLMNT_HOTFIX=$ARG_BASE_HOTFIX diff --git a/cloud/docker/scripts/utils.sh b/cloud/docker/scripts/utils.sh index aafc6546..e7a60520 100644 --- a/cloud/docker/scripts/utils.sh +++ b/cloud/docker/scripts/utils.sh @@ -132,9 +132,11 @@ validateInstallers() printf "ERROR: Improper $pkgName HF version: [$BASE_HF_PACKAGE]. It should be in (xxx) format Ex: (002).\n" exit 1 fi - #add $pkgName hf package to file list and increment index - FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$BASE_HF_PACKAGE" - FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` + if [ "$pkgName" != "JRESPLMNT" ] ; then + #add $pkgName hf package to file list and increment index + FILE_LIST[$FILE_LIST_INDEX]="$ARG_INSTALLER_LOCATION/$BASE_HF_PACKAGE" + FILE_LIST_INDEX=`expr $FILE_LIST_INDEX + 1` + fi else printf "\nERROR: TIBCO $pkgName version: [$baseHfBaseVersion] in HF installer and TIBCO $pkgName Base version: [$ARG_BASE_VERSION] is not matching.\n" exit 1; From f2f11d8250f727066e302d0b16db8c3b7b5ffd80 Mon Sep 17 00:00:00 2001 From: "Naresh Kumar Thota[NareshKumar.Thota]" Date: Thu, 6 Jun 2024 14:01:45 +0530 Subject: [PATCH 11/14] sample changes --- cloud/docker/build_image.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cloud/docker/build_image.bat b/cloud/docker/build_image.bat index e2e29c36..88385539 100644 --- a/cloud/docker/build_image.bat +++ b/cloud/docker/build_image.bat @@ -77,6 +77,11 @@ set "S2I_DOCKER_FILE_APP=.\dockerfiles\Dockerfile-s2i" REM default installation type fromlocal set "INSTALLATION_TYPE=fromlocal" +REM JRE SUPPLEMENT related args +set "ARG_JRESPLMNT_VERSION=na" +set "ARG_JRESPLMNT_SHORT_VERSION=na" +set "ARG_JRESPLMNT_HOTFIX=na" + REM container image size optimize related vars perl -e1 2>NUL if "!errorlevel!" NEQ "0" ( From 52a0bc14d48dded03084d4f54b1380d618952ad5 Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Wed, 12 Jun 2024 18:03:49 +0530 Subject: [PATCH 12/14] windows related changes updated --- cloud/docker/build_image.bat | 13 ++++++++++- cloud/docker/scripts/be.sh | 2 +- cloud/docker/scripts/jresplmnt.bat | 36 ++++++++++++++++++++++++++++++ cloud/docker/scripts/jresplmnt.sh | 4 ++-- cloud/docker/scripts/util.bat | 14 +++++++++++- cloud/docker/scripts/utils.sh | 7 +++++- 6 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 cloud/docker/scripts/jresplmnt.bat diff --git a/cloud/docker/build_image.bat b/cloud/docker/build_image.bat index 88385539..a0d27110 100644 --- a/cloud/docker/build_image.bat +++ b/cloud/docker/build_image.bat @@ -584,6 +584,10 @@ if !INSTALLATION_TYPE! EQU fromlocal ( if !ERROR_VAL! EQU true GOTO END-withError echo OPENJDK#!OPEN_JDK_FILENAME! >> !TEMP_FOLDER!/package_files.txt ) + + REM check for jre suppliment + call .\scripts\jresplmnt.bat !ARG_INSTALLER_LOCATION! !ARG_INSTALLERS_PLATFORM! !TEMP_FOLDER! !ARG_BE_VERSION! ARG_JRESPLMNT_VERSION ARG_JRESPLMNT_HOTFIX ERROR_VAL + if !ERROR_VAL! EQU true GOTO END-withError ) if "!ARG_USE_OPEN_JDK!" EQU "true" ( @@ -724,6 +728,13 @@ if !ARG_TEA_VERSION! NEQ na ( ) ) +if !ARG_JRESPLMNT_VERSION! NEQ na ( + echo INFO: JRESPLMNT VERSION : [!ARG_JRESPLMNT_VERSION!] + if !ARG_JRESPLMNT_HOTFIX! NEQ na ( + echo INFO: JRESPLMNT HF : [!ARG_JRESPLMNT_HOTFIX!] + ) +) + if !AS_HOME! NEQ na ( echo INFO: AS HOME : [!AS_HOME!] ) @@ -1041,7 +1052,7 @@ if !INSTALLATION_TYPE! EQU frominstallers ( if !IMAGE_NAME! EQU !TEA_IMAGE! ( docker build -f !TEMP_FOLDER!\!ARG_DOCKER_FILE! --build-arg PYTHON_VERSION="!ARG_PYTHON_VERSION!" --build-arg BE_PRODUCT_VERSION="!ARG_BE_VERSION!" --build-arg BE_SHORT_VERSION="!ARG_BE_SHORT_VERSION!" --build-arg BE_PRODUCT_IMAGE_VERSION="!ARG_IMAGE_VERSION!" --build-arg BE_PRODUCT_ADDONS="!ARG_ADDONS!" --build-arg BE_PRODUCT_HOTFIX="!ARG_BE_HOTFIX!" --build-arg TEA_VERSION="!ARG_TEA_VERSION!" --build-arg TEA_PRODUCT_HOTFIX="!ARG_TEA_HOTFIX!" --build-arg OPEN_JDK_FILENAME=!OPEN_JDK_FILENAME! --build-arg JRE_VERSION=!ARG_JRE_VERSION! -t "!ARG_IMAGE_VERSION!" !TEMP_FOLDER! ) else ( - docker build -f !TEMP_FOLDER!\!ARG_DOCKER_FILE! --build-arg BE_PRODUCT_VERSION="!ARG_BE_VERSION!" --build-arg BE_SHORT_VERSION="!ARG_BE_SHORT_VERSION!" --build-arg BE_PRODUCT_IMAGE_VERSION="!ARG_IMAGE_VERSION!" --build-arg BE_PRODUCT_ADDONS="!ARG_ADDONS!" --build-arg BE_PRODUCT_HOTFIX="!ARG_BE_HOTFIX!" --build-arg AS_PRODUCT_HOTFIX="!ARG_AS_LEG_HOTFIX!" --build-arg OPEN_JDK_FILENAME=!OPEN_JDK_FILENAME! --build-arg AS_VERSION="!ARG_AS_LEG_VERSION!" --build-arg AS_SHORT_VERSION="!ARG_AS_LEG_SHORT_VERSION!" --build-arg JRE_VERSION=!ARG_JRE_VERSION! --build-arg CDD_FILE_NAME=!CDD_FILE_NAME! --build-arg EAR_FILE_NAME=!EAR_FILE_NAME! --build-arg CONFIGPROVIDER="!ARG_CONFIGPROVIDER!" --build-arg FTL_VERSION="!ARG_FTL_VERSION!" --build-arg FTL_SHORT_VERSION="!ARG_FTL_SHORT_VERSION!" --build-arg FTL_PRODUCT_HOTFIX="!ARG_FTL_HOTFIX!" --build-arg HAWK_VERSION="!ARG_HAWK_VERSION!" --build-arg HAWK_SHORT_VERSION="!ARG_HAWK_SHORT_VERSION!" --build-arg HAWK_PRODUCT_HOTFIX="!ARG_HAWK_HOTFIX!" --build-arg ACTIVESPACES_VERSION="!ARG_AS_VERSION!" --build-arg ACTIVESPACES_SHORT_VERSION="!ARG_AS_SHORT_VERSION!" --build-arg ACTIVESPACES_PRODUCT_HOTFIX="!ARG_AS_HOTFIX!" -t "!ARG_IMAGE_VERSION!" !TEMP_FOLDER! + docker build -f !TEMP_FOLDER!\!ARG_DOCKER_FILE! --build-arg BE_PRODUCT_VERSION="!ARG_BE_VERSION!" --build-arg BE_SHORT_VERSION="!ARG_BE_SHORT_VERSION!" --build-arg BE_PRODUCT_IMAGE_VERSION="!ARG_IMAGE_VERSION!" --build-arg BE_PRODUCT_ADDONS="!ARG_ADDONS!" --build-arg BE_PRODUCT_HOTFIX="!ARG_BE_HOTFIX!" --build-arg AS_PRODUCT_HOTFIX="!ARG_AS_LEG_HOTFIX!" --build-arg OPEN_JDK_FILENAME=!OPEN_JDK_FILENAME! --build-arg AS_VERSION="!ARG_AS_LEG_VERSION!" --build-arg AS_SHORT_VERSION="!ARG_AS_LEG_SHORT_VERSION!" --build-arg JRE_VERSION=!ARG_JRE_VERSION! --build-arg CDD_FILE_NAME=!CDD_FILE_NAME! --build-arg EAR_FILE_NAME=!EAR_FILE_NAME! --build-arg CONFIGPROVIDER="!ARG_CONFIGPROVIDER!" --build-arg FTL_VERSION="!ARG_FTL_VERSION!" --build-arg FTL_SHORT_VERSION="!ARG_FTL_SHORT_VERSION!" --build-arg FTL_PRODUCT_HOTFIX="!ARG_FTL_HOTFIX!" --build-arg HAWK_VERSION="!ARG_HAWK_VERSION!" --build-arg HAWK_SHORT_VERSION="!ARG_HAWK_SHORT_VERSION!" --build-arg HAWK_PRODUCT_HOTFIX="!ARG_HAWK_HOTFIX!" --build-arg ACTIVESPACES_VERSION="!ARG_AS_VERSION!" --build-arg ACTIVESPACES_SHORT_VERSION="!ARG_AS_SHORT_VERSION!" --build-arg ACTIVESPACES_PRODUCT_HOTFIX="!ARG_AS_HOTFIX!" --build-arg JRESPLMNT_VERSION="!ARG_JRESPLMNT_VERSION!" --build-arg JRESPLMNT_PRODUCT_HOTFIX="!ARG_JRESPLMNT_HOTFIX!" -t "!ARG_IMAGE_VERSION!" !TEMP_FOLDER! ) ) else ( docker build -f !TEMP_FOLDER!\!ARG_DOCKER_FILE! --build-arg BE_PRODUCT_VERSION="!ARG_BE_VERSION!" --build-arg BE_SHORT_VERSION="!ARG_BE_SHORT_VERSION!" --build-arg BE_PRODUCT_IMAGE_VERSION="!ARG_IMAGE_VERSION!" --build-arg JRE_VERSION=!ARG_JRE_VERSION! --build-arg CDD_FILE_NAME=!CDD_FILE_NAME! --build-arg EAR_FILE_NAME=!EAR_FILE_NAME! --build-arg CONFIGPROVIDER="!ARG_CONFIGPROVIDER!" -t "!ARG_IMAGE_VERSION!" !TEMP_FOLDER! diff --git a/cloud/docker/scripts/be.sh b/cloud/docker/scripts/be.sh index 66f06e26..592fea4f 100644 --- a/cloud/docker/scripts/be.sh +++ b/cloud/docker/scripts/be.sh @@ -1,7 +1,7 @@ BLANK="" BE_HF_REGEX="${BE_PRODUCT}-hf_[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}_HF-[0-9][0-9][0-9]${INSTALLER_PLATFORM}" -validateInstallers "BusinessEvents" "$BE_BASE_PKG_REGEX" "$BE_HF_REGEX" "" "" +validateInstallers "BusinessEvents" "$BE_BASE_PKG_REGEX" "$BE_HF_REGEX" "na" "na" ARG_BE_VERSION=$ARG_BASE_VERSION ARG_BE_SHORT_VERSION=$ARG_BASE_SHORT_VERSION diff --git a/cloud/docker/scripts/jresplmnt.bat b/cloud/docker/scripts/jresplmnt.bat new file mode 100644 index 00000000..85e1965c --- /dev/null +++ b/cloud/docker/scripts/jresplmnt.bat @@ -0,0 +1,36 @@ +@echo off +@rem Copyright (c) 2019-2020. TIBCO Software Inc. +@rem This file is subject to the license terms contained in the license file that is distributed with this file. + +REM input variables +SET ARG_INSTALLER_LOCATION=%1 +SET ARG_INSTALLERS_PLATFORM=%2 +SET ARG_TEMP_FOLDER=%3 +SET ARG_BE_VERSION=%4 + +set VALID_JRESPLMNT_MAP_MIN[6.2.1]=1.0.0 +set VALID_JRESPLMNT_MAP_MAX[6.2.1]=2.0.0 + +REM variables +SET ARG_JRESPLMNT_VERSION=na +SET ARG_JRESPLMNT_HOTFIX=na +SET FILE_NAME=na +SET ERROR_VAL=false +SET JRESPLMNT_REG="^.*jresplmnt.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET JRESPLMNT_HF_REG="^.*jresplmnt.*[0-9]\.[0-9]\.[0-9]_HF-[0-9]*_!ARG_INSTALLERS_PLATFORM!.*\.zip$" +SET DISPLAY_NAME="TIBCO JRESPLMNT" + +if "!VALID_JRESPLMNT_MAP_MIN[%ARG_BE_VERSION%]!" NEQ "" ( + SET /a jresplmntminval=!VALID_JRESPLMNT_MAP_MIN[%ARG_BE_VERSION%]:.=! > NUL +) +if "!VALID_JRESPLMNT_MAP_MAX[%ARG_BE_VERSION%]!" NEQ "" ( + SET /a jresplmntmaxval=!VALID_JRESPLMNT_MAP_MAX[%ARG_BE_VERSION%]:.=! > NUL +) + +call .\scripts\util.bat :CheckInstallerAndHF !ARG_INSTALLER_LOCATION! !JRESPLMNT_REG! !JRESPLMNT_HF_REG! !DISPLAY_NAME! "!jresplmntminval!" "!jresplmntmaxval!" !ARG_TEMP_FOLDER! ARG_JRESPLMNT_VERSION ARG_JRESPLMNT_HOTFIX +if "!ARG_JRESPLMNT_HOTFIX!" EQU "true" ( + SET ERROR_VAL=true + SET ARG_JRESPLMNT_HOTFIX=na +) +SET "%5=!ARG_JRESPLMNT_VERSION!" & SET "%6=!ARG_JRESPLMNT_HOTFIX!" & SET "%7=!ERROR_VAL!" +EXIT /B 0 diff --git a/cloud/docker/scripts/jresplmnt.sh b/cloud/docker/scripts/jresplmnt.sh index ed2b7d93..794d417f 100644 --- a/cloud/docker/scripts/jresplmnt.sh +++ b/cloud/docker/scripts/jresplmnt.sh @@ -1,6 +1,6 @@ #supported JRE Suppliment versions for be version -JRESPLMNT_VERSION_MAP_MIN=( "6.2.1:1.0.0" "6.3.0:1.0.0" ) -JRESPLMNT_VERSION_MAP_MAX=( "6.2.1:2.0.0" "6.3.0:2.0.0" ) +JRESPLMNT_VERSION_MAP_MIN=( "6.2.1:1.0.0" ) +JRESPLMNT_VERSION_MAP_MAX=( "6.2.1:2.0.0" ) jresplmntMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${JRESPLMNT_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) jresplmntMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${JRESPLMNT_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) diff --git a/cloud/docker/scripts/util.bat b/cloud/docker/scripts/util.bat index 98b061aa..1b059848 100644 --- a/cloud/docker/scripts/util.bat +++ b/cloud/docker/scripts/util.bat @@ -98,6 +98,16 @@ GOTO :EOF SET /a baseval=!BASE_INST_VERSION:.=! + if "!BASE_MIN_VALUE!" EQU "" ( + echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with !DISPLAY_NAME! version: [!BASE_INST_VERSION!]. + GOTO END-withError + ) + + if "!BASE_MAX_VALUE!" EQU "" ( + echo ERROR: BE version: [!ARG_BE_VERSION!] not compatible with !DISPLAY_NAME! version: [!BASE_INST_VERSION!]. + GOTO END-withError + ) + if !BASE_MIN_VALUE! NEQ na if !BASE_MAX_VALUE! NEQ na ( if !baseval! GEQ !BASE_MIN_VALUE! if !baseval! LEQ !BASE_MAX_VALUE! SET BASE_VALIDATION=true if "!BASE_VALIDATION!" NEQ "true" ( @@ -157,7 +167,9 @@ GOTO :EOF echo ERROR: !DISPLAY_NAME_NEW! version: [!INSTLR_HF_VERSION!] It should be in [xxx] format Ex: [001]. GOTO END-withError ) - echo !DISPLAY_NAME_NEW!#!FILENAME! >> !ARG_TEMP_FOLDER!/package_files.txt + if "!DISPLAY_NAME!" NEQ "TIBCO JRESPLMNT" ( + echo !DISPLAY_NAME_NEW!#!FILENAME! >> !ARG_TEMP_FOLDER!/package_files.txt + ) ) ) else ( echo ERROR: !DISPLAY_NAME! version: [!HF_INSTLR_VERSION!] in HF installer and !DISPLAY_NAME_NEW! Base version: [!BASE_INST_VERSION!] is not matching. diff --git a/cloud/docker/scripts/utils.sh b/cloud/docker/scripts/utils.sh index e7a60520..2c63bc8a 100644 --- a/cloud/docker/scripts/utils.sh +++ b/cloud/docker/scripts/utils.sh @@ -108,7 +108,12 @@ validateInstallers() exit 1 fi - if [ "$baseMinVersion" != "" ]; then + if [ "$baseMinVersion" = "" -o "$baseMaxVersion" = "" ]; then + printf "ERROR: BE version: [$ARG_BE_VERSION] not compatible with $pkgName version: [$ARG_BASE_VERSION].\n"; + exit 1 + fi + + if [ "$baseMinVersion" != "na" -a "$baseMaxVersion" != "na" ]; then # validate $pkgName version with be base version baseVersion=$(echo "${ARG_BASE_VERSION}" | sed -e "s/${DOT}/${BLANK}/g" ) From b79b6da8877620a5bd57102a4d59abe8d86c5fbf Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Fri, 14 Jun 2024 10:17:08 +0530 Subject: [PATCH 13/14] jre splmnt changes updated for tea and rms images also --- cloud/docker/build_image.bat | 2 +- cloud/docker/build_image.sh | 7 ++++--- cloud/docker/dockerfiles/Dockerfile-rms | 5 ++++- cloud/docker/dockerfiles/Dockerfile-teagent | 5 ++++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/cloud/docker/build_image.bat b/cloud/docker/build_image.bat index a0d27110..0b4f82ce 100644 --- a/cloud/docker/build_image.bat +++ b/cloud/docker/build_image.bat @@ -1050,7 +1050,7 @@ for %%f in (!ARG_DOCKER_FILE!) do set ARG_DOCKER_FILE=%%~nxf if !INSTALLATION_TYPE! EQU frominstallers ( if !IMAGE_NAME! EQU !TEA_IMAGE! ( - docker build -f !TEMP_FOLDER!\!ARG_DOCKER_FILE! --build-arg PYTHON_VERSION="!ARG_PYTHON_VERSION!" --build-arg BE_PRODUCT_VERSION="!ARG_BE_VERSION!" --build-arg BE_SHORT_VERSION="!ARG_BE_SHORT_VERSION!" --build-arg BE_PRODUCT_IMAGE_VERSION="!ARG_IMAGE_VERSION!" --build-arg BE_PRODUCT_ADDONS="!ARG_ADDONS!" --build-arg BE_PRODUCT_HOTFIX="!ARG_BE_HOTFIX!" --build-arg TEA_VERSION="!ARG_TEA_VERSION!" --build-arg TEA_PRODUCT_HOTFIX="!ARG_TEA_HOTFIX!" --build-arg OPEN_JDK_FILENAME=!OPEN_JDK_FILENAME! --build-arg JRE_VERSION=!ARG_JRE_VERSION! -t "!ARG_IMAGE_VERSION!" !TEMP_FOLDER! + docker build -f !TEMP_FOLDER!\!ARG_DOCKER_FILE! --build-arg PYTHON_VERSION="!ARG_PYTHON_VERSION!" --build-arg BE_PRODUCT_VERSION="!ARG_BE_VERSION!" --build-arg BE_SHORT_VERSION="!ARG_BE_SHORT_VERSION!" --build-arg BE_PRODUCT_IMAGE_VERSION="!ARG_IMAGE_VERSION!" --build-arg BE_PRODUCT_ADDONS="!ARG_ADDONS!" --build-arg BE_PRODUCT_HOTFIX="!ARG_BE_HOTFIX!" --build-arg TEA_VERSION="!ARG_TEA_VERSION!" --build-arg TEA_PRODUCT_HOTFIX="!ARG_TEA_HOTFIX!" --build-arg OPEN_JDK_FILENAME=!OPEN_JDK_FILENAME! --build-arg JRE_VERSION=!ARG_JRE_VERSION! --build-arg JRESPLMNT_VERSION="!ARG_JRESPLMNT_VERSION!" --build-arg JRESPLMNT_PRODUCT_HOTFIX="!ARG_JRESPLMNT_HOTFIX!" -t "!ARG_IMAGE_VERSION!" !TEMP_FOLDER! ) else ( docker build -f !TEMP_FOLDER!\!ARG_DOCKER_FILE! --build-arg BE_PRODUCT_VERSION="!ARG_BE_VERSION!" --build-arg BE_SHORT_VERSION="!ARG_BE_SHORT_VERSION!" --build-arg BE_PRODUCT_IMAGE_VERSION="!ARG_IMAGE_VERSION!" --build-arg BE_PRODUCT_ADDONS="!ARG_ADDONS!" --build-arg BE_PRODUCT_HOTFIX="!ARG_BE_HOTFIX!" --build-arg AS_PRODUCT_HOTFIX="!ARG_AS_LEG_HOTFIX!" --build-arg OPEN_JDK_FILENAME=!OPEN_JDK_FILENAME! --build-arg AS_VERSION="!ARG_AS_LEG_VERSION!" --build-arg AS_SHORT_VERSION="!ARG_AS_LEG_SHORT_VERSION!" --build-arg JRE_VERSION=!ARG_JRE_VERSION! --build-arg CDD_FILE_NAME=!CDD_FILE_NAME! --build-arg EAR_FILE_NAME=!EAR_FILE_NAME! --build-arg CONFIGPROVIDER="!ARG_CONFIGPROVIDER!" --build-arg FTL_VERSION="!ARG_FTL_VERSION!" --build-arg FTL_SHORT_VERSION="!ARG_FTL_SHORT_VERSION!" --build-arg FTL_PRODUCT_HOTFIX="!ARG_FTL_HOTFIX!" --build-arg HAWK_VERSION="!ARG_HAWK_VERSION!" --build-arg HAWK_SHORT_VERSION="!ARG_HAWK_SHORT_VERSION!" --build-arg HAWK_PRODUCT_HOTFIX="!ARG_HAWK_HOTFIX!" --build-arg ACTIVESPACES_VERSION="!ARG_AS_VERSION!" --build-arg ACTIVESPACES_SHORT_VERSION="!ARG_AS_SHORT_VERSION!" --build-arg ACTIVESPACES_PRODUCT_HOTFIX="!ARG_AS_HOTFIX!" --build-arg JRESPLMNT_VERSION="!ARG_JRESPLMNT_VERSION!" --build-arg JRESPLMNT_PRODUCT_HOTFIX="!ARG_JRESPLMNT_HOTFIX!" -t "!ARG_IMAGE_VERSION!" !TEMP_FOLDER! ) diff --git a/cloud/docker/build_image.sh b/cloud/docker/build_image.sh index 5a473e5d..6743f193 100755 --- a/cloud/docker/build_image.sh +++ b/cloud/docker/build_image.sh @@ -1153,12 +1153,13 @@ fi BUILD_ARGS=$(echo --build-arg BE_PRODUCT_VERSION="$ARG_BE_VERSION" --build-arg BE_SHORT_VERSION="$ARG_BE_SHORT_VERSION" --build-arg BE_PRODUCT_IMAGE_VERSION="$ARG_IMAGE_VERSION" ) BUILD_ARGS=$(echo $BUILD_ARGS --build-arg JRE_VERSION=$ARG_JRE_VERSION --build-arg OPEN_JDK_FILENAME=$OPEN_JDK_FILENAME ) +BUILD_ARGS=$(echo $BUILD_ARGS --build-arg JRESPLMNT_VERSION="$ARG_JRESPLMNT_VERSION" --build-arg JRESPLMNT_PRODUCT_HOTFIX="$ARG_JRESPLMNT_HOTFIX" ) + BUILD_ARGS_CDD_EAR_CONFG=$(echo --build-arg CDD_FILE_NAME=$CDD_FILE_NAME --build-arg EAR_FILE_NAME=$EAR_FILE_NAME --build-arg CONFIGPROVIDER=$ARG_CONFIGPROVIDER ) BUILD_ARGS_AS=$(echo --build-arg AS_VERSION="$ARG_AS_LEG_VERSION" --build-arg AS_SHORT_VERSION="$ARG_AS_LEG_SHORT_VERSION" --build-arg AS_PRODUCT_HOTFIX="$ARG_AS_LEG_HOTFIX" ) BUILD_ARGS_FTL=$(echo --build-arg FTL_VERSION="$ARG_FTL_VERSION" --build-arg FTL_SHORT_VERSION="$ARG_FTL_SHORT_VERSION" --build-arg FTL_PRODUCT_HOTFIX="$ARG_FTL_HOTFIX" ) BUILD_ARGS_HAWK=$(echo --build-arg HAWK_VERSION="$ARG_HAWK_VERSION" --build-arg HAWK_SHORT_VERSION="$ARG_HAWK_SHORT_VERSION" --build-arg HAWK_PRODUCT_HOTFIX="$ARG_HAWK_HOTFIX" ) BUILD_ARGS_ACTIVESPACES=$(echo --build-arg ACTIVESPACES_VERSION="$ARG_AS_VERSION" --build-arg ACTIVESPACES_SHORT_VERSION="$ARG_AS_SHORT_VERSION" --build-arg ACTIVESPACES_PRODUCT_HOTFIX="$ARG_AS_HOTFIX" ) -BUILD_ARGS_JRESPLMNT=$(echo --build-arg JRESPLMNT_VERSION="$ARG_JRESPLMNT_VERSION" --build-arg JRESPLMNT_PRODUCT_HOTFIX="$ARG_JRESPLMNT_HOTFIX" ) if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then if [ "$IMAGE_NAME" = "$TEA_IMAGE" ]; then @@ -1168,9 +1169,9 @@ if [ "$INSTALLATION_TYPE" = "fromlocal" ]; then fi else if [ "$IMAGE_NAME" = "$TEA_IMAGE" ]; then - BUILD_ARGS=$(echo $BUILD_ARGS --build-arg PYTHON_VERSION="$ARG_PYTHON_VERSION" --build-arg BE_PRODUCT_HOTFIX="$ARG_BE_HOTFIX" --build-arg TEA_VERSION="$ARG_TEA_VERSION" --build-arg TEA_PRODUCT_HOTFIX="$ARG_TEA_HOTFIX" $BUILD_ARGS_JRESPLMNT ) + BUILD_ARGS=$(echo $BUILD_ARGS --build-arg PYTHON_VERSION="$ARG_PYTHON_VERSION" --build-arg BE_PRODUCT_HOTFIX="$ARG_BE_HOTFIX" --build-arg TEA_VERSION="$ARG_TEA_VERSION" --build-arg TEA_PRODUCT_HOTFIX="$ARG_TEA_HOTFIX" ) else - BUILD_ARGS=$(echo $BUILD_ARGS --build-arg BE_PRODUCT_HOTFIX="$ARG_BE_HOTFIX" --build-arg BE_PRODUCT_ADDONS="$ARG_ADDONS" $BUILD_ARGS_AS $BUILD_ARGS_FTL $BUILD_ARGS_HAWK $BUILD_ARGS_ACTIVESPACES $BUILD_ARGS_JRESPLMNT $BUILD_ARGS_CDD_EAR_CONFG ) + BUILD_ARGS=$(echo $BUILD_ARGS --build-arg BE_PRODUCT_HOTFIX="$ARG_BE_HOTFIX" --build-arg BE_PRODUCT_ADDONS="$ARG_ADDONS" $BUILD_ARGS_AS $BUILD_ARGS_FTL $BUILD_ARGS_HAWK $BUILD_ARGS_ACTIVESPACES $BUILD_ARGS_CDD_EAR_CONFG ) fi fi diff --git a/cloud/docker/dockerfiles/Dockerfile-rms b/cloud/docker/dockerfiles/Dockerfile-rms index b084991b..a63266c1 100644 --- a/cloud/docker/dockerfiles/Dockerfile-rms +++ b/cloud/docker/dockerfiles/Dockerfile-rms @@ -39,6 +39,8 @@ ARG JRE_VERSION ARG OPEN_JDK_FILENAME ARG CDD_FILE_NAME ARG EAR_FILE_NAME +ARG JRESPLMNT_VERSION +ARG JRESPLMNT_PRODUCT_HOTFIX LABEL be-intermediate-image=true @@ -60,9 +62,10 @@ RUN chmod +x *.sh *.pm run RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('ftl','$FTL_VERSION','$FTL_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_withtar('as','$ACTIVESPACES_VERSION','$ACTIVESPACES_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_be('$BE_PRODUCT_VERSION','enterprise','$BE_PRODUCT_ADDONS','$BE_PRODUCT_HOTFIX','$AS_PRODUCT_HOTFIX','$AS_VERSION')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_with_universal_installer('JRESupplement','jresplmnt','$JRESPLMNT_VERSION','$JRESPLMNT_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::replaceRunbeVersionToken('$BE_PRODUCT_VERSION','./run')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::generateAnnotationIndexes('/opt/tibco/be/${BE_SHORT_VERSION}', '/opt/tibco/tibcojre64/${JRE_VERSION}')" \ - && rm -rf as_installers as_installers-hf be_installers ftl_installers ftl_installers_hf activespaces_installers activespaces_installers_hf *.zip + && rm -rf JRESupplement_installers as_installers as_installers-hf be_installers ftl_installers ftl_installers_hf activespaces_installers activespaces_installers_hf *.zip COPY app/* /opt/tibco/be/ext/ diff --git a/cloud/docker/dockerfiles/Dockerfile-teagent b/cloud/docker/dockerfiles/Dockerfile-teagent index 993bd4ad..e916d445 100644 --- a/cloud/docker/dockerfiles/Dockerfile-teagent +++ b/cloud/docker/dockerfiles/Dockerfile-teagent @@ -24,6 +24,8 @@ ARG OPEN_JDK_FILENAME ARG TEA_VERSION ARG TEA_PRODUCT_HOTFIX ARG DEBIAN_FRONTEND=noninteractive +ARG JRESPLMNT_VERSION +ARG JRESPLMNT_PRODUCT_HOTFIX LABEL be-intermediate-image=true @@ -41,10 +43,11 @@ ENV TIBCO_HOME=/opt/tibco \ WORKDIR /home/tibco/be RUN chmod +x *.sh *.pm && chmod +x *.py run RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_be('$BE_PRODUCT_VERSION','enterprise','na','$BE_PRODUCT_HOTFIX','na','na')" +RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_with_universal_installer('JRESupplement','jresplmnt','$JRESPLMNT_VERSION','$JRESPLMNT_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::install_package_with_silentfile('tea','tea','$TEA_VERSION','$TEA_PRODUCT_HOTFIX')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::replaceRunbeVersionToken('$BE_PRODUCT_VERSION','./run')" RUN perl -I. -Mbe_docker_install -e "be_docker_install::generateAnnotationIndexes('/opt/tibco/be/${BE_SHORT_VERSION}', '/opt/tibco/tibcojre64/${JRE_VERSION}')" \ - && rm -rf tea_installer tea_installer-hf as_installers be_installers *.zip + && rm -rf JRESupplement_installers tea_installer tea_installer-hf as_installers be_installers *.zip RUN ./prepare_finalimage.sh From cdb4249845dcc1a85c20b4b06b6a1aa56a756f3f Mon Sep 17 00:00:00 2001 From: nareshkumarthota Date: Thu, 29 Aug 2024 12:08:59 +0530 Subject: [PATCH 14/14] version compatability update as per be 6.3.1 --- cloud/docker/scripts/as.bat | 2 +- cloud/docker/scripts/as.sh | 2 +- cloud/docker/scripts/ftl.bat | 2 +- cloud/docker/scripts/ftl.sh | 2 +- cloud/docker/scripts/hawk.bat | 2 +- cloud/docker/scripts/hawk.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cloud/docker/scripts/as.bat b/cloud/docker/scripts/as.bat index 340a84cb..d0ac16da 100644 --- a/cloud/docker/scripts/as.bat +++ b/cloud/docker/scripts/as.bat @@ -25,7 +25,7 @@ set VALID_AS_MAP_MAX[6.2.2]=4.7.1 set VALID_AS_MAP_MIN[6.3.0]=4.7.0 set VALID_AS_MAP_MAX[6.3.0]=4.8.1 set VALID_AS_MAP_MIN[6.3.1]=4.7.0 -set VALID_AS_MAP_MAX[6.3.1]=4.8.1 +set VALID_AS_MAP_MAX[6.3.1]=4.10.1 REM variables SET ARG_AS_VERSION=na diff --git a/cloud/docker/scripts/as.sh b/cloud/docker/scripts/as.sh index 90c4966a..03adfe4d 100644 --- a/cloud/docker/scripts/as.sh +++ b/cloud/docker/scripts/as.sh @@ -1,6 +1,6 @@ #supported As versions for be version AS_VERSION_MAP_MIN=( "6.0.0:4.4.0" "6.1.0:4.6.1" "6.1.1:4.6.1" "6.1.2:4.7.0" "6.2.0:4.7.0" "6.2.1:4.7.0" "6.2.2:4.7.0" "6.3.0:4.7.0" "6.3.1:4.7.0" ) -AS_VERSION_MAP_MAX=( "6.0.0:4.4.0" "6.1.0:4.6.1" "6.1.1:4.7.0" "6.1.2:4.7.0" "6.2.0:4.7.0" "6.2.1:4.7.0" "6.2.2:4.7.1" "6.3.0:4.8.1" "6.3.1:4.8.1" ) +AS_VERSION_MAP_MAX=( "6.0.0:4.4.0" "6.1.0:4.6.1" "6.1.1:4.7.0" "6.1.2:4.7.0" "6.2.0:4.7.0" "6.2.1:4.7.0" "6.2.2:4.7.1" "6.3.0:4.8.1" "6.3.1:4.10.1" ) asMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) asMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${AS_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) diff --git a/cloud/docker/scripts/ftl.bat b/cloud/docker/scripts/ftl.bat index 8cea3be8..d3d73c9e 100644 --- a/cloud/docker/scripts/ftl.bat +++ b/cloud/docker/scripts/ftl.bat @@ -25,7 +25,7 @@ set VALID_FTL_MAP_MAX[6.2.2]=6.7.3 set VALID_FTL_MAP_MIN[6.3.0]=6.7.1 set VALID_FTL_MAP_MAX[6.3.0]=6.10.0 set VALID_FTL_MAP_MIN[6.3.1]=6.7.1 -set VALID_FTL_MAP_MAX[6.3.1]=6.10.0 +set VALID_FTL_MAP_MAX[6.3.1]=7.0.0 REM variables SET ARG_FTL_VERSION=na diff --git a/cloud/docker/scripts/ftl.sh b/cloud/docker/scripts/ftl.sh index 0a91198e..ba9e2863 100644 --- a/cloud/docker/scripts/ftl.sh +++ b/cloud/docker/scripts/ftl.sh @@ -1,6 +1,6 @@ #supported FTL versions for be version FTL_VERSION_MAP_MIN=( "6.0.0:6.4.0" "6.1.0:6.5.0" "6.1.1:6.5.0" "6.1.2:6.7.1" "6.2.0:6.7.1" "6.2.1:6.7.1" "6.2.2:6.7.1" "6.3.0:6.7.1" "6.3.1:6.7.1" ) -FTL_VERSION_MAP_MAX=( "6.0.0:6.4.x" "6.1.0:6.5.0" "6.1.1:6.6.1" "6.1.2:6.7.1" "6.2.0:6.7.1" "6.2.1:6.7.1" "6.2.2:6.7.3" "6.3.0:6.10.0" "6.3.1:6.10.0" ) +FTL_VERSION_MAP_MAX=( "6.0.0:6.4.x" "6.1.0:6.5.0" "6.1.1:6.6.1" "6.1.2:6.7.1" "6.2.0:6.7.1" "6.2.1:6.7.1" "6.2.2:6.7.3" "6.3.0:6.10.0" "6.3.1:7.0.0" ) ftlMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${FTL_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) ftlMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${FTL_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" ) diff --git a/cloud/docker/scripts/hawk.bat b/cloud/docker/scripts/hawk.bat index 89f5fcf1..b800fc68 100644 --- a/cloud/docker/scripts/hawk.bat +++ b/cloud/docker/scripts/hawk.bat @@ -13,7 +13,7 @@ set VALID_HAWK_MAP_MAX[6.2.2]=7.1.0 set VALID_HAWK_MAP_MIN[6.3.0]=7.1.0 set VALID_HAWK_MAP_MAX[6.3.0]=7.2.1 set VALID_HAWK_MAP_MIN[6.3.1]=7.1.0 -set VALID_HAWK_MAP_MAX[6.3.1]=7.2.1 +set VALID_HAWK_MAP_MAX[6.3.1]=7.2.2 REM variables SET ARG_HAWK_VERSION=na diff --git a/cloud/docker/scripts/hawk.sh b/cloud/docker/scripts/hawk.sh index ff0756e6..a173936b 100644 --- a/cloud/docker/scripts/hawk.sh +++ b/cloud/docker/scripts/hawk.sh @@ -1,6 +1,6 @@ #supported HAWK versions for be version HAWK_VERSION_MAP_MIN=( "6.2.2:7.1.0" "6.3.0:7.1.0" "6.3.1:7.1.0" ) -HAWK_VERSION_MAP_MAX=( "6.2.2:7.1.0" "6.3.0:7.2.1" "6.3.1:7.2.1" ) +HAWK_VERSION_MAP_MAX=( "6.2.2:7.1.0" "6.3.0:7.2.1" "6.3.1:7.2.2" ) hawkMinVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${HAWK_VERSION_MAP_MIN[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" ) hawkMaxVersion=$(echo $( getFromArray "$ARG_BE_VERSION" "${HAWK_VERSION_MAP_MAX[@]}" ) | sed -e "s/${DOT}/${BLANK}/g" | sed -e "s/x/9/g" )