Skip to content

Commit

Permalink
replace build => buildtools
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeybannov committed Oct 2, 2023
1 parent 6bb5f6a commit 1584336
Show file tree
Hide file tree
Showing 32 changed files with 157 additions and 157 deletions.
14 changes: 7 additions & 7 deletions build.backend.docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "Run script directory:" $dir

dir=$(builtin cd $rd/../; pwd)
dockerDir="$dir/build/install/docker"
dockerDir="$dir/buildtools/install/docker"

echo "Root directory:" $dir
echo "Docker files root directory:" $dockerDir
Expand Down Expand Up @@ -32,7 +32,7 @@ fi
echo "FORCE BUILD BASE IMAGES: $force"

# Stop all backend services"
$dir/build/start/stop.backend.docker.sh
$dir/buildtools/start/stop.backend.docker.sh

echo "Run MySQL"

Expand Down Expand Up @@ -60,15 +60,15 @@ echo "Clear publish folder"
rm -rf $dir/publish/services

echo "Build backend services (to "publish/" folder)"
bash $dir/build/install/common/build-services.sh -pb backend-publish -pc Debug -de "$dockerDir/docker-entrypoint.py"
bash $dir/buildtools/install/common/build-services.sh -pb backend-publish -pc Debug -de "$dockerDir/docker-entrypoint.py"

dotnet_version=dev

exists=$(docker images | egrep "onlyoffice/4testing-docspace-dotnet-runtime" | egrep "$dotnet_version" | awk 'NR>0 {print $1 ":" $2}')

if [ "${exists}" = "" ] || [ "$force" = true ]; then
echo "Build dotnet base image from source (apply new dotnet config)"
docker build -t onlyoffice/4testing-docspace-dotnet-runtime:$dotnet_version -f ./build/install/docker/Dockerfile.runtime --target dotnetrun .
docker build -t onlyoffice/4testing-docspace-dotnet-runtime:$dotnet_version -f ./buildtools/install/docker/Dockerfile.runtime --target dotnetrun .
else
echo "SKIP build dotnet base image (already exists)"
fi
Expand All @@ -79,7 +79,7 @@ exists=$(docker images | egrep "onlyoffice/4testing-docspace-nodejs-runtime" | e

if [ "${exists}" = "" ] || [ "$force" = true ]; then
echo "Build nodejs base image from source"
docker build -t onlyoffice/4testing-docspace-nodejs-runtime:$node_version -f ./build/install/docker/Dockerfile.runtime --target noderun .
docker build -t onlyoffice/4testing-docspace-nodejs-runtime:$node_version -f ./buildtools/install/docker/Dockerfile.runtime --target noderun .
else
echo "SKIP build nodejs base image (already exists)"
fi
Expand All @@ -90,7 +90,7 @@ exists=$(docker images | egrep "onlyoffice/4testing-docspace-proxy-runtime" | eg

if [ "${exists}" = "" ] || [ "$force" = true ]; then
echo "Build proxy base image from source (apply new nginx config)"
docker build -t onlyoffice/4testing-docspace-proxy-runtime:$proxy_version -f ./build/install/docker/Dockerfile.runtime --target router .
docker build -t onlyoffice/4testing-docspace-proxy-runtime:$proxy_version -f ./buildtools/install/docker/Dockerfile.runtime --target router .
else
echo "SKIP build proxy base image (already exists)"
fi
Expand All @@ -109,4 +109,4 @@ BUILD_PATH="/var/www" \
SRC_PATH="$dir/publish/services" \
DATA_DIR="$dir/data" \
APP_URL_PORTAL=$portal_url \
docker-compose -f $dockerDir/docspace.profiles.yml -f $dockerDir/docspace.overcome.yml --profile migration-runner --profile backend-local up -d
docker-compose -f $dockerDir/docspace.profiles.yml -f $dockerDir/docspace.overcome.yml --profile migration-runner --profile backend-local up -d
4 changes: 2 additions & 2 deletions clear.backend.docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Containers=$(docker ps -a | egrep "onlyoffice" | awk 'NR>0 {print $1}')
RunDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
RootDir=$(builtin cd $RunDir/../; pwd)
DockerDir="${RootDir}/build/install/docker"
DockerDir="${RootDir}/buildtools/install/docker"

echo "Clean up containers, volumes or networks"

Expand Down Expand Up @@ -35,4 +35,4 @@ then
docker network prune -f
else
echo "No containers, images, volumes or networks to clean up"
fi
fi
2 changes: 1 addition & 1 deletion install/OneClickInstall/docspace-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fi
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"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/buildtools/install/OneClickInstall"
fi

if [ "$DOCKER" == "true" ]; then
Expand Down
2 changes: 1 addition & 1 deletion install/OneClickInstall/install-Debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fi
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"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/buildtools/install/OneClickInstall/install-Debian"
fi

if [ "${LOCAL_SCRIPTS}" == "true" ]; then
Expand Down
4 changes: 2 additions & 2 deletions install/OneClickInstall/install-Docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ download_files () {
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
svn export --force https://github.com/${PACKAGE_SYSNAME}/${PRODUCT}/branches/${GIT_BRANCH}/buildtools/install/docker/ ${BASE_DIR} >/dev/null
fi

echo "OK"
Expand Down Expand Up @@ -1389,4 +1389,4 @@ start_installation () {
exit 0;
}

start_installation
start_installation
2 changes: 1 addition & 1 deletion install/OneClickInstall/install-RedHat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ END
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"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/buildtools/install/OneClickInstall/install-RedHat"
fi

if [ "$LOCAL_SCRIPTS" = "true" ]; then
Expand Down
4 changes: 2 additions & 2 deletions install/common/build-services.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dotnet build "$SRC_PATH\server\ASC.Migrations.sln" -o "$BUILD_PATH\services\ASC.

Write-Host "== Add docker-migration-entrypoint.sh to ASC.Migration.Runner ==" -ForegroundColor Green
$FilePath = "$BUILD_PATH\services\ASC.Migration.Runner\service\docker-migration-entrypoint.sh"
Get-Content "$SRC_PATH\build\install\docker\docker-migration-entrypoint.sh" -raw | % {$_ -replace "`r", ""} | Set-Content -NoNewline $FilePath
Get-Content "$SRC_PATH\buildtools\install\docker\docker-migration-entrypoint.sh" -raw | % {$_ -replace "`r", ""} | Set-Content -NoNewline $FilePath

foreach ($SERVICE in $BACKEND_NODEJS_SERVICES)
{
Expand Down Expand Up @@ -54,4 +54,4 @@ foreach ($SERVICE in $BACKEND_DOTNETCORE_SERVICES)
Write-Host "== Add docker-entrypoint.py to $SERVICE ==" -ForegroundColor Green
$DST = "$BUILD_PATH\services\$SERVICE\service\"
Copy-Item $DOCKER_ENTRYPOINT -Destination $DST
}
}
12 changes: 6 additions & 6 deletions install/common/build-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ while [ "$1" != "" ]; do
echo " Parameters:"
echo -e " -sp, --srcpath \t path to project root directory"
echo -e " -bp, --buildpath \t path where generated output is placed (by default={SRC_PATH}/publish)"
echo -e " -st, --status \t build status Ex. all/frontend-build/backend-publish/backend-dotnet-publish/backend-nodejs-publish/backend-build"
echo -e " -st, --status \t build status Ex. all/frontend-buildtools/backend-publish/backend-dotnet-publish/backend-nodejs-publish/backend-build"
echo -e " -sc, --self-contained \t publish the .NET runtime with your application (by default=false)"
echo -e " -pc, --publish-configuration \t dotnet publish configuration Ex. Release/Debug"
echo -e " -yb, --frontend-build-args \t arguments for yarn building"
Expand Down Expand Up @@ -139,8 +139,8 @@ function build_dotnetcore_backend {
fi
if [[ ${DOCKER_ENTRYPOINT} != "false" ]]
then
echo "== ADD ${SRC_PATH}/build/install/docker/docker-migration-entrypoint.sh to ASC.Migration.Runner =="
cp ${SRC_PATH}/build/install/docker/docker-migration-entrypoint.sh ${BUILD_PATH}/services/ASC.Migration.Runner/service/
echo "== ADD ${SRC_PATH}/buildtools/install/docker/docker-migration-entrypoint.sh to ASC.Migration.Runner =="
cp ${SRC_PATH}/buildtools/install/docker/docker-migration-entrypoint.sh ${BUILD_PATH}/services/ASC.Migration.Runner/service/
fi
fi
}
Expand Down Expand Up @@ -210,9 +210,9 @@ function build_nodejs_frontend {
if [[ ${DOCKER_ENTRYPOINT} != "false" ]]
then
echo "== ADD ${DOCKER_ENTRYPOINT} to ASC.Login =="
cp ${DOCKER_ENTRYPOINT} ${SRC_PATH}/build/deploy/login/
cp ${DOCKER_ENTRYPOINT} ${SRC_PATH}/buildtools/deploy/login/
echo "== ADD ${DOCKER_ENTRYPOINT} toASC.Editors =="
cp ${DOCKER_ENTRYPOINT} ${SRC_PATH}/build/deploy/editor/
cp ${DOCKER_ENTRYPOINT} ${SRC_PATH}/buildtools/deploy/editor/
fi
}

Expand Down Expand Up @@ -244,7 +244,7 @@ function run {
build_dotnetcore_backend "${MIGRATION_CHECK}"
;;
* )
echo "Unknown - \"$1\", Ex. all/frontend-build/backend-publish/backend-dotnet-publish/backend-nodejs-publish/backend-build" 1>&2
echo "Unknown - \"$1\", Ex. all/frontend-buildtools/backend-publish/backend-dotnet-publish/backend-nodejs-publish/backend-build" 1>&2
exit 1
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion install/deb/debian/product-doceditor.install
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../build/deploy/editor var/www/{{product}}/products/ASC.Files
../../../buildtools/deploy/editor var/www/{{product}}/products/ASC.Files
2 changes: 1 addition & 1 deletion install/deb/debian/product-login.install
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../build/deploy/login/* var/www/{{product}}/products/ASC.Login/login
../../../buildtools/deploy/login/* var/www/{{product}}/products/ASC.Login/login
12 changes: 6 additions & 6 deletions install/deb/debian/product-proxy.install
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## COPY PUBLIC ##
../../../build/install/common/{{product}}-ssl-setup usr/bin
../../../build/install/docker/config/nginx/templates/*.template etc/onlyoffice/{{product}}/openresty
../../../build/install/docker/config/nginx/onlyoffice* etc/openresty/conf.d
../../../buildtools/install/common/{{product}}-ssl-setup usr/bin
../../../buildtools/install/docker/config/nginx/templates/*.template etc/onlyoffice/{{product}}/openresty
../../../buildtools/install/docker/config/nginx/onlyoffice* etc/openresty/conf.d
../../../config/nginx/onlyoffice*.conf etc/openresty/conf.d
../../../build/install/docker/config/nginx/letsencrypt* etc/openresty/includes
../../../buildtools/install/docker/config/nginx/letsencrypt* etc/openresty/includes
../../../config/nginx/includes/onlyoffice*.conf etc/openresty/includes
../../../build/deploy/public/* var/www/{{product}}/public
../../../build/deploy/client/* var/www/{{product}}/client
../../../buildtools/deploy/public/* var/www/{{product}}/public
../../../buildtools/deploy/client/* var/www/{{product}}/client
2 changes: 1 addition & 1 deletion install/deb/debian/product-radicale.install
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../build/install/RadicalePlugins/* var/www/{{product}}/Tools/radicale/plugins
../../../buildtools/install/RadicalePlugins/* var/www/{{product}}/Tools/radicale/plugins
12 changes: 6 additions & 6 deletions install/deb/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export DH_OPTIONS=-v
PRODUCT={{product}}
CURRENT_PATH=${CURDIR}
SRC_PATH=$(shell cd ../../../; pwd)
SCRIPT_PATH=build/install/common
SCRIPT_PATH=buildtools/install/common

override_dh_auto_clean:
@echo "RULES.$@"
dh_testdir
rm -rf ${CURRENT_PATH}/debian/*.service
rm -rf ${CURRENT_PATH}/debian/*.lintian-overrides
rm -rf ${SRC_PATH}/build/install/${PRODUCT}*
rm -rf ${SRC_PATH}/buildtools/install/${PRODUCT}*

override_dh_auto_configure:
@echo "RULES.$@"
Expand Down Expand Up @@ -51,10 +51,10 @@ override_dh_auto_build:

sed 's_etc/nginx_etc/openresty_g' -i ${SRC_PATH}/config/nginx/*.conf
sed 's/teamlab.info/onlyoffice.com/g' -i ${SRC_PATH}/config/autofac.consumers.json
sed -e 's/$$router_host/127.0.0.1/g' -e 's/the_host/host/g' -e 's/the_scheme/scheme/g' -e 's_includes_/etc/openresty/includes_g' -i ${SRC_PATH}/build/install/docker/config/nginx/onlyoffice-proxy*.conf
sed "s_\(.*root\).*;_\1 \"/var/www/${PRODUCT}\";_g" -i ${SRC_PATH}/build/install/docker/config/nginx/letsencrypt.conf
sed -e '/.pid/d' -e '/temp_path/d' -e 's_etc/nginx_etc/openresty_g' -i ${SRC_PATH}/build/install/docker/config/nginx/templates/nginx.conf.template
mv -f ${SRC_PATH}/build/install/docker/config/nginx/onlyoffice-proxy-ssl.conf ${SRC_PATH}/build/install/docker/config/nginx/onlyoffice-proxy-ssl.conf.template
sed -e 's/$$router_host/127.0.0.1/g' -e 's/the_host/host/g' -e 's/the_scheme/scheme/g' -e 's_includes_/etc/openresty/includes_g' -i ${SRC_PATH}/buildtools/install/docker/config/nginx/onlyoffice-proxy*.conf
sed "s_\(.*root\).*;_\1 \"/var/www/${PRODUCT}\";_g" -i ${SRC_PATH}/buildtools/install/docker/config/nginx/letsencrypt.conf
sed -e '/.pid/d' -e '/temp_path/d' -e 's_etc/nginx_etc/openresty_g' -i ${SRC_PATH}/buildtools/install/docker/config/nginx/templates/nginx.conf.template
mv -f ${SRC_PATH}/buildtools/install/docker/config/nginx/onlyoffice-proxy-ssl.conf ${SRC_PATH}/buildtools/install/docker/config/nginx/onlyoffice-proxy-ssl.conf.template

for i in ${PRODUCT} $$(ls ${CURRENT_PATH}/debian/*.install | grep -oP 'debian/\K.*' | grep -o '^[^.]*'); do \
cp ${CURRENT_PATH}/debian/source/lintian-overrides ${CURRENT_PATH}/debian/$$i.lintian-overrides; \
Expand Down
Loading

0 comments on commit 1584336

Please sign in to comment.