From 78d405ae7991cbc79294b023a14ba9d94e5e6ee4 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Wed, 23 Aug 2023 16:51:57 +0500 Subject: [PATCH] fix Bug 63666 - Add priority use of OCI scripts with S3 --- .github/workflows/oci-release.yml | 14 ++++++++++++-- build/install/OneClickInstall/docspace-install.sh | 7 +++++-- build/install/OneClickInstall/install-Debian.sh | 8 ++++++-- build/install/OneClickInstall/install-RedHat.sh | 7 +++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/oci-release.yml b/.github/workflows/oci-release.yml index b75ecc8ef1..fd162c4df5 100644 --- a/.github/workflows/oci-release.yml +++ b/.github/workflows/oci-release.yml @@ -42,7 +42,12 @@ jobs: --metadata-directive REPLACE \ --exclude '*' \ --include="${{ env.PRODUCT }}-install.sh" \ - --include="${{ env.PRODUCT }}-enterprise-install.sh" + --include="${{ env.PRODUCT }}-enterprise-install.sh" \ + --include="install-RedHat.sh" \ + --include="install-RedHat/*" \ + --include="install-Debian.sh" \ + --include="install-Debian/*" \ + --include="install.Docker" - name: Invalidate AWS CloudFront cache run: | @@ -50,4 +55,9 @@ jobs: --distribution-id ${{ secrets.AWS_DISTRIBUTION_ID_OCI }} \ --paths \ "/${{ env.PRODUCT }}-install.sh" \ - "/${{ env.PRODUCT }}-enterprise-install.sh" + "/${{ env.PRODUCT }}-enterprise-install.sh" \ + "/install-RedHat.sh" \ + "/install-RedHat/*" \ + "/install-Debian.sh" \ + "/install-Debian/*" \ + "/install-Docker.sh" diff --git a/build/install/OneClickInstall/docspace-install.sh b/build/install/OneClickInstall/docspace-install.sh index ace2543849..01217b04f6 100644 --- a/build/install/OneClickInstall/docspace-install.sh +++ b/build/install/OneClickInstall/docspace-install.sh @@ -35,7 +35,6 @@ PARAMETERS="$PARAMETERS -it COMMUNITY"; DOCKER=""; LOCAL_SCRIPTS="false" product="docspace" -GIT_BRANCH="master" FILE_NAME="$(basename "$0")" while [ "$1" != "" ]; do @@ -140,7 +139,11 @@ if [ -z "$DOCKER" ]; then read_installation_method; fi -DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall" +if [ -z $GIT_BRANCH ]; then + DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/${product}" +else + DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall" +fi if [ "$DOCKER" == "true" ]; then if [ "$LOCAL_SCRIPTS" == "true" ]; then diff --git a/build/install/OneClickInstall/install-Debian.sh b/build/install/OneClickInstall/install-Debian.sh index 1232f42c0d..1729b5059c 100644 --- a/build/install/OneClickInstall/install-Debian.sh +++ b/build/install/OneClickInstall/install-Debian.sh @@ -6,7 +6,6 @@ package_sysname="onlyoffice"; DS_COMMON_NAME="onlyoffice"; product_name="DocSpace" product=$(tr '[:upper:]' '[:lower:]' <<< ${product_name}) -GIT_BRANCH="master" INSTALLATION_TYPE="ENTERPRISE" MAKESWAP="true" RES_APP_INSTALLED="is already installed"; @@ -119,7 +118,12 @@ if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") - apt-get install -yq curl; fi -DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall/install-Debian" +if [ -z $GIT_BRANCH ]; then + DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/${product}/install-Debian" +else + DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall/install-Debian" +fi + if [ "${LOCAL_SCRIPTS}" == "true" ]; then source install-Debian/bootstrap.sh else diff --git a/build/install/OneClickInstall/install-RedHat.sh b/build/install/OneClickInstall/install-RedHat.sh index 7e17618e4f..b7f9a49640 100644 --- a/build/install/OneClickInstall/install-RedHat.sh +++ b/build/install/OneClickInstall/install-RedHat.sh @@ -6,7 +6,6 @@ package_manager="yum" package_sysname="onlyoffice"; product_name="DocSpace" product=$(tr '[:upper:]' '[:lower:]' <<< ${product_name}) -GIT_BRANCH="master" INSTALLATION_TYPE="ENTERPRISE" MAKESWAP="true" RES_APP_INSTALLED="is already installed"; @@ -132,7 +131,11 @@ enabled=1 gpgkey=https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE END -DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall/install-RedHat" +if [ -z $GIT_BRANCH ]; then + DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/${product}/install-RedHat" +else + DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall/install-RedHat" +fi if [ "$LOCAL_SCRIPTS" = "true" ]; then source install-RedHat/tools.sh