get logs for each job. increase memory for docker containers

This commit is contained in:
Claudia Agache
2021-02-22 20:43:44 +02:00
parent 2f715a1c51
commit 696bc7c52a
2 changed files with 37 additions and 12 deletions

View File

@@ -1,6 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -x set -x
# Display running containers
docker ps
alfrescoContainerId=$(docker ps -a | grep '_alfresco_' | awk '{print $1}') alfrescoContainerId=$(docker ps -a | grep '_alfresco_' | awk '{print $1}')
shareContainerId=$(docker ps -a | grep '_share_' | awk '{print $1}') shareContainerId=$(docker ps -a | grep '_share_' | awk '{print $1}')
solrContainerId=$(docker ps -a | grep '_search_' | awk '{print $1}') solrContainerId=$(docker ps -a | grep '_search_' | awk '{print $1}')
@@ -9,4 +12,6 @@ docker logs $alfrescoContainerId > alfresco.log
if [ -n "$shareContainerId" ]; then if [ -n "$shareContainerId" ]; then
docker logs $shareContainerId > share.log docker logs $shareContainerId > share.log
fi fi
if [ -n "$solrContainerId" ]; then
docker logs $solrContainerId > solr.log docker logs $solrContainerId > solr.log
fi

View File

@@ -2,6 +2,13 @@ jobs:
include: include:
- name: "Community Rest API Tests" - name: "Community Rest API Tests"
stage: Tests stage: Tests
addons:
artifacts:
paths:
- ./rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log
- alfresco.log
- solr.log
target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
install: install:
- | - |
if [[ ${TRAVIS_BRANCH} == *community* ]]; then if [[ ${TRAVIS_BRANCH} == *community* ]]; then
@@ -19,10 +26,17 @@ jobs:
fi fi
- bash scripts/waitForAlfrescoToStart.sh - bash scripts/waitForAlfrescoToStart.sh
script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false
after_failure: docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 after_script: bash scripts/getLogs.sh
- name: "Enterprise Rest API Tests" - name: "Enterprise Rest API Tests"
stage: Tests stage: Tests
addons:
artifacts:
paths:
- ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log
- alfresco.log
- solr.log
target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
install: install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am - travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am
- travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am
@@ -33,15 +47,17 @@ jobs:
- sudo free -m -t - sudo free -m -t
script: script:
- travis_wait 90 mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -Dskip.automationtests=false - travis_wait 90 mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -Dskip.automationtests=false
after_failure: docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 after_script: bash scripts/getLogs.sh
- name: "Enterprise Rest API WORM Tests"
stage: Tests
addons: addons:
artifacts: artifacts:
paths: paths:
- ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log
- ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports - alfresco.log
- solr.log
- name: "Enterprise Rest API WORM Tests" target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
stage: Tests
install: install:
- travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am
- travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am
@@ -50,8 +66,10 @@ jobs:
- bash scripts/start-compose.sh "${ENTERPRISE_SHARE_PATH}/docker-compose-worm-support-rest.yml" - bash scripts/start-compose.sh "${ENTERPRISE_SHARE_PATH}/docker-compose-worm-support-rest.yml"
- bash scripts/waitForAlfrescoToStart.sh - bash scripts/waitForAlfrescoToStart.sh
script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=wormTestSuite.xml -Dskip.automationtests=false script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=wormTestSuite.xml -Dskip.automationtests=false
after_script: bash scripts/cleanup.sh after_script:
after_failure: docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 - bash scripts/getLogs.sh
- bash scripts/cleanup.sh
- &community_shared_UI_configuration - &community_shared_UI_configuration
name: "Community Smoke UI Tests for Records" name: "Community Smoke UI Tests for Records"
@@ -83,7 +101,7 @@ jobs:
- travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-ui -am - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-ui -am
script: script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=communitySmokeRecords.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=communitySmokeRecords.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
after_failure: bash scripts/getLogs.sh after_script: bash scripts/getLogs.sh
- <<: *community_shared_UI_configuration - <<: *community_shared_UI_configuration
name: "Community Smoke UI Tests for actions in RM site" name: "Community Smoke UI Tests for actions in RM site"
@@ -124,7 +142,7 @@ jobs:
- sudo free -m -t - sudo free -m -t
script: script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseLevel2Tests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseLevel2Tests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
after_failure: bash scripts/getLogs.sh after_script: bash scripts/getLogs.sh
- <<: *enterprise_shared_UI_configuration - <<: *enterprise_shared_UI_configuration
name: "Enterprise Classification Level 2 UI Tests" name: "Enterprise Classification Level 2 UI Tests"
@@ -167,4 +185,6 @@ jobs:
- bash scripts/waitForAlfrescoToStart.sh - bash scripts/waitForAlfrescoToStart.sh
script: script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -DsuiteXmlFile=wormTestSuite.xml -Dskip.automationtests=false -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS} - travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -DsuiteXmlFile=wormTestSuite.xml -Dskip.automationtests=false -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
after_script: bash scripts/cleanup.sh after_script:
- bash scripts/getLogs.sh
- bash scripts/cleanup.sh