mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge remote-tracking branch 'origin/merge-3.0/APPS-238_APPS-104_no' into merge-3.0/APPS-238_APPS-104_no
This commit is contained in:
13
.travis.yml
13
.travis.yml
@@ -1,7 +1,7 @@
|
||||
import:
|
||||
- source: travis-env-vars.yml
|
||||
os: linux
|
||||
dist: xenial
|
||||
sudo: required
|
||||
language: java
|
||||
jdk:
|
||||
- openjdk11
|
||||
@@ -75,8 +75,7 @@ jobs:
|
||||
stage: Tests
|
||||
install:
|
||||
- |
|
||||
echo ${TRAVIS_COMMIT_MESSAGE}
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} =~ '"[tests on community]"' ]]; then
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then
|
||||
travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-rm-community-repo -am
|
||||
else
|
||||
travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-rm-enterprise-repo -am
|
||||
@@ -84,7 +83,7 @@ jobs:
|
||||
- travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-rm-automation-community-rest-api -am
|
||||
before_script:
|
||||
- |
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} =~ '"[tests on community]"' ]]; then
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then
|
||||
bash scripts/startAlfresco.sh $COMMUNITY_REPO_PATH
|
||||
else
|
||||
bash scripts/startAlfresco.sh $ENTERPRISE_REPO_PATH
|
||||
@@ -119,7 +118,7 @@ jobs:
|
||||
target_paths: $TRAVIS_BUILD_NUMBER
|
||||
before_install:
|
||||
- |
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} =~ '"[tests on community]"' ]]; then
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then
|
||||
travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-rm-community-repo,:alfresco-rm-community-share -am
|
||||
else
|
||||
travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-rm-enterprise-repo,:alfresco-rm-enterprise-share -am
|
||||
@@ -127,7 +126,7 @@ jobs:
|
||||
- travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-rm-automation-ui -am
|
||||
install:
|
||||
- |
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} =~ '"[tests on community]"' ]]; then
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then
|
||||
bash scripts/startAlfresco.sh $COMMUNITY_SHARE_PATH
|
||||
else
|
||||
bash scripts/startAlfresco.sh $ENTERPRISE_SHARE_PATH
|
||||
@@ -164,6 +163,8 @@ jobs:
|
||||
install:
|
||||
- bash scripts/startAlfresco.sh $ENTERPRISE_SHARE_PATH
|
||||
- bash scripts/waitForAlfrescoToStart.sh
|
||||
- bash scripts/dockerLimitMemory.sh
|
||||
- sudo free -m -t
|
||||
script:
|
||||
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-rm-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseLevel2Tests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
|
||||
|
||||
|
23
scripts/dockerLimitMemory.sh
Normal file
23
scripts/dockerLimitMemory.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
# Display containers resources usage before limitation
|
||||
docker stats --no-stream
|
||||
|
||||
#limit memory used by each container
|
||||
docker update --memory=2Gb --memory-swap -1 --restart on-failure $(docker ps -a | grep '_alfresco_' | awk '{print $1}')
|
||||
docker update --memory=1200Mb --memory-swap -1 $(docker ps -a | grep '_search_' | awk '{print $1}')
|
||||
docker update --memory=512Mb --memory-swap -1 $(docker ps -a | grep '_postgres_' | awk '{print $1}')
|
||||
docker update --memory=512Mb --memory-swap -1 $(docker ps -a | grep '_imagemagick_' | awk '{print $1}')
|
||||
docker update --memory=512Mb --memory-swap -1 $(docker ps -a | grep '_alfresco-pdf-renderer_' | awk '{print $1}')
|
||||
docker update --memory=512Mb --memory-swap -1 $(docker ps -a | grep '_libreoffice_' | awk '{print $1}')
|
||||
|
||||
shareContainerId=$(docker ps -a | grep '_share_' | awk '{print $1}')
|
||||
if [ -n "$shareContainerId" ]; then
|
||||
docker update --memory=1Gb --memory-swap -1 --restart on-failure $shareContainerId
|
||||
fi
|
||||
#stop not needed container
|
||||
docker stop $(docker ps -a | grep '_zeppelin_' | awk '{print $1}')
|
||||
|
||||
# Display containers resources usage after limitation
|
||||
docker stats --no-stream
|
Reference in New Issue
Block a user