Implement priority use of docker files with S3
This commit is contained in:
parent
4434c6708e
commit
74d600f1a5
16
.github/workflows/oci-release.yml
vendored
16
.github/workflows/oci-release.yml
vendored
@ -6,16 +6,19 @@ on:
|
|||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- 'build/install/OneClickInstall/**'
|
- 'build/install/OneClickInstall/**'
|
||||||
|
- 'build/install/docker/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
SCRIPT_DIR: 'build/install/OneClickInstall'
|
|
||||||
PRODUCT: $(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]' )
|
PRODUCT: $(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]' )
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Scripts release
|
name: Scripts release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_DIR: "$GITHUB_WORKSPACE/build/install/docker"
|
||||||
|
SCRIPT_DIR: "$GITHUB_WORKSPACE/build/install/OneClickInstall"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
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
|
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
|
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
|
- name: Configure AWS Credentials
|
||||||
uses: aws-actions/configure-aws-credentials@v1
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
with:
|
with:
|
||||||
@ -47,7 +55,8 @@ jobs:
|
|||||||
--include="install-RedHat/*" \
|
--include="install-RedHat/*" \
|
||||||
--include="install-Debian.sh" \
|
--include="install-Debian.sh" \
|
||||||
--include="install-Debian/*" \
|
--include="install-Debian/*" \
|
||||||
--include="install.Docker"
|
--include="install-Docker.sh" \
|
||||||
|
--include="docker.tar.gz"
|
||||||
|
|
||||||
- name: Invalidate AWS CloudFront cache
|
- name: Invalidate AWS CloudFront cache
|
||||||
run: |
|
run: |
|
||||||
@ -60,4 +69,5 @@ jobs:
|
|||||||
"/install-RedHat/*" \
|
"/install-RedHat/*" \
|
||||||
"/install-Debian.sh" \
|
"/install-Debian.sh" \
|
||||||
"/install-Debian/*" \
|
"/install-Debian/*" \
|
||||||
"/install-Docker.sh"
|
"/install-Docker.sh" \
|
||||||
|
"/docker.tar.gz"
|
||||||
|
@ -38,7 +38,6 @@ BASE_DIR="/app/$PACKAGE_SYSNAME";
|
|||||||
PROXY_YML="${BASE_DIR}/proxy.yml"
|
PROXY_YML="${BASE_DIR}/proxy.yml"
|
||||||
STATUS=""
|
STATUS=""
|
||||||
DOCKER_TAG=""
|
DOCKER_TAG=""
|
||||||
GIT_BRANCH="master"
|
|
||||||
INSTALLATION_TYPE="ENTERPRISE"
|
INSTALLATION_TYPE="ENTERPRISE"
|
||||||
IMAGE_NAME="${PACKAGE_SYSNAME}/${PRODUCT}-api"
|
IMAGE_NAME="${PACKAGE_SYSNAME}/${PRODUCT}-api"
|
||||||
CONTAINER_NAME="${PACKAGE_SYSNAME}-api"
|
CONTAINER_NAME="${PACKAGE_SYSNAME}-api"
|
||||||
@ -1142,10 +1141,6 @@ set_installation_type_data () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
download_files () {
|
download_files () {
|
||||||
if ! command_exists svn; then
|
|
||||||
install_service svn subversion
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! command_exists jq ; then
|
if ! command_exists jq ; then
|
||||||
if command_exists yum; then
|
if command_exists yum; then
|
||||||
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-$REV.noarch.rpm
|
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=""
|
[[ "${APP_URL_PORTAL}" == *${PACKAGE_SYSNAME}-proxy* ]] && APP_URL_PORTAL=""
|
||||||
|
|
||||||
echo -n "Downloading configuration files to the ${BASE_DIR} directory..."
|
echo -n "Downloading configuration files to the ${BASE_DIR} directory..."
|
||||||
svn export --force https://github.com/${PACKAGE_SYSNAME}/${PRODUCT}/branches/${GIT_BRANCH}/build/install/docker/ ${BASE_DIR} >/dev/null
|
|
||||||
|
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"
|
echo "OK"
|
||||||
|
|
||||||
reconfigure STATUS ${STATUS}
|
reconfigure STATUS ${STATUS}
|
||||||
|
Loading…
Reference in New Issue
Block a user