Skip to content

Commit

Permalink
Merge branch 'develop' into feature/webhooks
Browse files Browse the repository at this point in the history
# Conflicts:
#	ASC.Web.sln
#	common/ASC.Api.Core/Core/BaseStartup.cs
#	common/services/ASC.Data.Backup/ASC.Data.Backup.csproj
#	web/ASC.Web.Api/ASC.Web.Api.csproj
  • Loading branch information
pavelbannov committed Oct 19, 2021
2 parents 017d367 + 34378fa commit 5a5e299
Show file tree
Hide file tree
Showing 631 changed files with 36,154 additions and 27,370 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ Data/
Logs/
**/.DS_Store
.eslintcache
build/deploy/
build/deploy/
/public/debuginfo.md
Binary file not shown.
Binary file not shown.
20 changes: 13 additions & 7 deletions ASC.Web.sln
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Feed.Aggregator", "comm
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Thumbnails.Svc", "common\services\ASC.Thumbnails.Svc\ASC.Thumbnails.Svc.csproj", "{1D2F61B2-B1F4-45F0-83CA-03370FD6E62C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup", "common\services\ASC.Data.Backup\ASC.Data.Backup.csproj", "{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Files.Core", "products\ASC.Files\Core\ASC.Files.Core.csproj", "{F0A39728-940D-4DBE-A37A-05D4EB57F342}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Socket.IO.Svc", "common\services\ASC.Socket.IO.Svc\ASC.Socket.IO.Svc.csproj", "{2DADEAD3-0FE9-4199-9817-41A32E6BF450}"
Expand Down Expand Up @@ -89,12 +87,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Radicale", "common\serv
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.SsoAuth.Svc", "common\services\ASC.SsoAuth.Svc\ASC.SsoAuth.Svc.csproj", "{6AD828EA-FBA2-4D30-B969-756B3BE78E4E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ASC.Web.HealthChecks.UI", "web\ASC.Web.HealthChecks.UI\ASC.Web.HealthChecks.UI.csproj", "{0C1A387E-0CD0-4BE8-82FC-9FCAD05BF289}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Web.HealthChecks.UI", "web\ASC.Web.HealthChecks.UI\ASC.Web.HealthChecks.UI.csproj", "{0C1A387E-0CD0-4BE8-82FC-9FCAD05BF289}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.ClearEvents", "common\services\ASC.ClearEvents\ASC.ClearEvents.csproj", "{448221A8-EABA-4200-9192-E08BF241A487}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.CRM.BackgroundTasks", "products\ASC.CRM\BackgroundTasks\ASC.CRM.BackgroundTasks.csproj", "{E52C0E35-A05C-437F-8FF2-3E0AC9F81433}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup.Core", "common\ASC.Data.Backup.Core\ASC.Data.Backup.Core.csproj", "{F5D9DE01-06CD-4881-9F41-46882E9ED45C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Data.Backup", "common\services\ASC.Data.Backup\ASC.Data.Backup.csproj", "{027EEE53-7491-48F4-B467-6404D68798A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Core", "common\ASC.Webhooks.Core\ASC.Webhooks.Core.csproj", "{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ASC.Webhooks.Service", "common\services\ASC.Webhooks.Service\ASC.Webhooks.Service.csproj", "{DAE2912D-1465-4D60-B1D7-90EE835003E4}"
Expand Down Expand Up @@ -209,10 +211,6 @@ Global
{1D2F61B2-B1F4-45F0-83CA-03370FD6E62C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D2F61B2-B1F4-45F0-83CA-03370FD6E62C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D2F61B2-B1F4-45F0-83CA-03370FD6E62C}.Release|Any CPU.Build.0 = Release|Any CPU
{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE3DAF51-FB29-41FC-AF41-A4BA8D91BFB6}.Release|Any CPU.Build.0 = Release|Any CPU
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0A39728-940D-4DBE-A37A-05D4EB57F342}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -273,6 +271,14 @@ Global
{E52C0E35-A05C-437F-8FF2-3E0AC9F81433}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E52C0E35-A05C-437F-8FF2-3E0AC9F81433}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E52C0E35-A05C-437F-8FF2-3E0AC9F81433}.Release|Any CPU.Build.0 = Release|Any CPU
{F5D9DE01-06CD-4881-9F41-46882E9ED45C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5D9DE01-06CD-4881-9F41-46882E9ED45C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5D9DE01-06CD-4881-9F41-46882E9ED45C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5D9DE01-06CD-4881-9F41-46882E9ED45C}.Release|Any CPU.Build.0 = Release|Any CPU
{027EEE53-7491-48F4-B467-6404D68798A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{027EEE53-7491-48F4-B467-6404D68798A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{027EEE53-7491-48F4-B467-6404D68798A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{027EEE53-7491-48F4-B467-6404D68798A7}.Release|Any CPU.Build.0 = Release|Any CPU
{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{760BFF3A-1A67-43A1-A94C-78D11A4BB1E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
12 changes: 6 additions & 6 deletions build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ pipeline {
stages {
stage('Frontend') {
steps {
sh 'yarn install && yarn build'
sh 'yarn install --frozen-lockfile && yarn build'
}
}
stage('Backend') {
steps {
sh 'dotnet build ASC.Web.sln'
sh 'dotnet build -c Release ASC.Web.sln'
}
}
}
Expand All @@ -23,12 +23,12 @@ pipeline {
stages {
stage('Frontend') {
steps {
bat 'yarn install && yarn build'
bat "yarn install --frozen-lockfile && yarn build"
}
}
stage('Backend') {
steps {
bat 'dotnet build ASC.Web.sln'
bat 'dotnet build -c Release ASC.Web.sln'
}
}
}
Expand All @@ -43,7 +43,7 @@ pipeline {
stages {
stage('Components') {
steps {
sh "yarn install && yarn build && cd ${env.WORKSPACE}/packages/asc-web-components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
sh "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}/packages/asc-web-components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
}
post {
success {
Expand Down Expand Up @@ -72,7 +72,7 @@ pipeline {
stages {
stage('Components') {
steps {
bat "yarn install && yarn build && cd ${env.WORKSPACE}\\packages\\asc-web-components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
bat "yarn install --frozen-lockfile && yarn build && cd ${env.WORKSPACE}\\packages\\asc-web-components && yarn test:coverage --ci --reporters=default --reporters=jest-junit || true"
}
post {
success {
Expand Down
14 changes: 12 additions & 2 deletions build/build.static.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@ call runasadmin.bat "%~dpnx0"
if %errorlevel% == 0 (
PUSHD %~dp0..

echo "mode=%1"

REM call yarn wipe
call yarn install

REM call yarn build
call yarn build
IF "%1"=="" (
call yarn build
) ELSE (
call yarn build:personal
)

REM call yarn wipe
call yarn deploy
IF "%1"=="" (
call yarn deploy
) ELSE (
call yarn deploy:personal
)

REM copy nginx configurations to deploy folder
xcopy config\nginx\onlyoffice.conf build\deploy\nginx\ /E /R /Y
Expand Down
18 changes: 18 additions & 0 deletions build/buildAndDeploy.PERSONAL.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PUSHD %~dp0
call runasadmin.bat "%~dpnx0"
if %errorlevel% == 0 (

call start\stop.bat

PUSHD %~dp0..

echo "FRONT-END static"
call build\build.static.bat --personal

echo "BACK-END"
call build\build.backend.bat

start /b call build\start\start.bat

pause
)
13 changes: 11 additions & 2 deletions build/install/OneClickInstall/appserver-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,25 @@ DOCKER="";
LOCAL_SCRIPTS="false"
HELP="false";
product="appserver"
GIT_BRANCH="develop"

while [ "$1" != "" ]; do
case $1 in
-ls | --local_scripts )
-ls | --localscripts )
if [ "$2" == "true" ] || [ "$2" == "false" ]; then
PARAMETERS="$PARAMETERS ${1}";
LOCAL_SCRIPTS=$2
shift
fi
;;

-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
fi
;;

"-?" | -h | --help )
HELP="true";
Expand Down Expand Up @@ -119,7 +128,7 @@ if [ "$HELP" == "false" ]; then
fi

#DOWNLOAD_URL_PREFIX="http://download.onlyoffice.com/install-appserver/"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/develop/build/install/OneClickInstall"
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall"

if [ "$DOCKER" == "true" ]; then
if [ "$LOCAL_SCRIPTS" == "true" ]; then
Expand Down
94 changes: 94 additions & 0 deletions build/install/OneClickInstall/install-Debian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#!/bin/bash

set -e

package_sysname="onlyoffice";
DS_COMMON_NAME="onlyoffice";
product="appserver"
GIT_BRANCH="develop"
RES_APP_INSTALLED="is already installed";
RES_APP_CHECK_PORTS="uses ports"
RES_CHECK_PORTS="please, make sure that the ports are free.";
RES_INSTALL_SUCCESS="Thank you for installing ONLYOFFICE ${product^^}.";
RES_QUESTIONS="In case you have any questions contact us via http://support.onlyoffice.com or visit our forum at http://dev.onlyoffice.org"

while [ "$1" != "" ]; do
case $1 in

-u | --update )
if [ "$2" != "" ]; then
UPDATE=$2
shift
fi
;;

-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
fi
;;

-ls | --localscripts )
if [ "$2" != "" ]; then
LOCAL_SCRIPTS=$2
shift
fi
;;

-? | -h | --help )
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
echo " Parameters:"
echo " -it, --installation_type installation type (COMMUNITY|ENTERPRISE|DEVELOPER)"
echo " -u, --update use to update existing components (true|false)"
echo " -ls, --local_scripts use 'true' to run local scripts (true|false)"
echo " -?, -h, --help this help"
echo
exit 0
;;

esac
shift
done

if [ -z "${UPDATE}" ]; then
UPDATE="false";
fi

if [ -z "${LOCAL_SCRIPTS}" ]; then
LOCAL_SCRIPTS="false";
fi

if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
apt-get update;
apt-get install -yq curl;
fi

DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/${GIT_BRANCH}/build/install/OneClickInstall/install-Debian"
if [ "${LOCAL_SCRIPTS}" == "true" ]; then
source install-Debian/bootstrap.sh
else
source <(curl ${DOWNLOAD_URL_PREFIX}/bootstrap.sh)
fi

# add onlyoffice repo
echo "deb http://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
echo "deb http://static.teamlab.info.s3.amazonaws.com/repo/4testing/debian stable main" | sudo tee /etc/apt/sources.list.d/onlyoffice4testing.list

declare -x LANG="en_US.UTF-8"
declare -x LANGUAGE="en_US:en"
declare -x LC_ALL="en_US.UTF-8"

if [ "${LOCAL_SCRIPTS}" == "true" ]; then
source install-Debian/tools.sh
source install-Debian/check-ports.sh
source install-Debian/install-preq.sh
source install-Debian/install-app.sh
else
source <(curl ${DOWNLOAD_URL_PREFIX}/tools.sh)
source <(curl ${DOWNLOAD_URL_PREFIX}/check-ports.sh)
source <(curl ${DOWNLOAD_URL_PREFIX}/install-preq.sh)
source <(curl ${DOWNLOAD_URL_PREFIX}/install-app.sh)
fi
23 changes: 23 additions & 0 deletions build/install/OneClickInstall/install-Debian/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e

cat<<EOF
#######################################
# BOOTSTRAP
#######################################
EOF

if ! dpkg -l | grep -q "sudo"; then
apt-get install -yq sudo
fi

if ! dpkg -l | grep -q "net-tools"; then
apt-get install -yq net-tools
fi

if ! dpkg -l | grep -q "dirmngr"; then
apt-get install -yq dirmngr
fi
39 changes: 39 additions & 0 deletions build/install/OneClickInstall/install-Debian/check-ports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

set -e

cat<<EOF
#######################################
# CHECK PORTS
#######################################
EOF

if dpkg -l | grep -q "${product}"; then
echo "${product} $RES_APP_INSTALLED"
APPSERVER_INSTALLED="true";
elif [ $UPDATE != "true" ] && netstat -lnp | awk '{print $4}' | grep -qE ":80$|:8081$|:8083$|:5001$|:5002$|:8080$|:80$"; then
echo "${product} $RES_APP_CHECK_PORTS: 80, 8081, 8083, 5001, 5002";
echo "$RES_CHECK_PORTS"
exit
else
APPSERVER_INSTALLED="false";
fi

if dpkg -l | grep -q "${package_sysname}-documentserver"; then
echo "${package_sysname}-documentserver $RES_APP_INSTALLED"
DOCUMENT_SERVER_INSTALLED="true";
elif [ $UPDATE != "true" ] && netstat -lnp | awk '{print $4}' | grep -qE ":8083$|:5432$|:5672$|:6379$|:8000$|:8080$"; then
echo "${package_sysname}-documentserver $RES_APP_CHECK_PORTS: 8083, 5432, 5672, 6379, 8000, 8080";
echo "$RES_CHECK_PORTS"
exit
else
DOCUMENT_SERVER_INSTALLED="false";
fi

if [ "$APPSERVER_INSTALLED" = "true" ] || [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
if [ "$UPDATE" != "true" ]; then
exit;
fi
fi
Loading

0 comments on commit 5a5e299

Please sign in to comment.