Merge pull request #1782 from ONLYOFFICE/bugfix/oci-docker-tar

fix Bug 63666 - Implement priority use of docker files with S3
This commit is contained in:
Alexey Golubev 2023-09-28 15:34:32 +03:00 committed by GitHub
commit e9995ea640
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 9 deletions

View File

@ -6,16 +6,19 @@ on:
- master
paths:
- 'build/install/OneClickInstall/**'
- 'build/install/docker/**'
workflow_dispatch:
env:
SCRIPT_DIR: 'build/install/OneClickInstall'
PRODUCT: $(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]' )
jobs:
release:
name: Scripts release
runs-on: ubuntu-latest
env:
DOCKER_DIR: "$GITHUB_WORKSPACE/build/install/docker"
SCRIPT_DIR: "$GITHUB_WORKSPACE/build/install/OneClickInstall"
steps:
- name: Checkout
uses: actions/checkout@v3
@ -25,6 +28,11 @@ jobs:
cp ${{ env.SCRIPT_DIR }}/${{ env.PRODUCT }}-install.sh ${{ env.SCRIPT_DIR }}/${{ env.PRODUCT }}-enterprise-install.sh
sed -i 's/\(PARAMETERS -it\).*";/\1 ENTERPRISE";/' ${{ env.SCRIPT_DIR }}/${{ env.PRODUCT }}-enterprise-install.sh
- name: Create Docker Tarball
run: |
cd ${{ env.DOCKER_DIR }}
tar -czvf ${{ env.SCRIPT_DIR }}/docker.tar.gz --exclude='config/supervisor*' *.yml .env config/
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
@ -47,7 +55,8 @@ jobs:
--include="install-RedHat/*" \
--include="install-Debian.sh" \
--include="install-Debian/*" \
--include="install.Docker"
--include="install-Docker.sh" \
--include="docker.tar.gz"
- name: Invalidate AWS CloudFront cache
run: |
@ -60,4 +69,5 @@ jobs:
"/install-RedHat/*" \
"/install-Debian.sh" \
"/install-Debian/*" \
"/install-Docker.sh"
"/install-Docker.sh" \
"/docker.tar.gz"

View File

@ -38,7 +38,6 @@ BASE_DIR="/app/$PACKAGE_SYSNAME";
PROXY_YML="${BASE_DIR}/proxy.yml"
STATUS=""
DOCKER_TAG=""
GIT_BRANCH="master"
INSTALLATION_TYPE="ENTERPRISE"
IMAGE_NAME="${PACKAGE_SYSNAME}/${PRODUCT}-api"
CONTAINER_NAME="${PACKAGE_SYSNAME}-api"
@ -1142,10 +1141,6 @@ set_installation_type_data () {
}
download_files () {
if ! command_exists svn; then
install_service svn subversion
fi
if ! command_exists jq ; then
if command_exists yum; then
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-$REV.noarch.rpm
@ -1163,7 +1158,23 @@ download_files () {
[[ "${APP_URL_PORTAL}" == *${PACKAGE_SYSNAME}-proxy* ]] && APP_URL_PORTAL=""
echo -n "Downloading configuration files to the ${BASE_DIR} directory..."
if [ -z "${GIT_BRANCH}" ]; then
if ! command_exists tar; then
install_service tar
fi
[ -d "${BASE_DIR}" ] && rm -rf "${BASE_DIR}"
mkdir -p ${BASE_DIR}
curl -s -O https://download.onlyoffice.com/${PRODUCT}/docker.tar.gz
tar -xzvf docker.tar.gz -C ${BASE_DIR} >/dev/null
rm -rf docker.tar.gz
else
if ! command_exists svn; then
install_service svn subversion
fi
svn export --force https://github.com/${PACKAGE_SYSNAME}/${PRODUCT}/branches/${GIT_BRANCH}/build/install/docker/ ${BASE_DIR} >/dev/null
fi
echo "OK"
reconfigure STATUS ${STATUS}