Files
alfresco-community-repo/travis/.travis.tests-stage.yml
Cezar.Leahu 3e57490e04 APPS-900 APPS-894 APPS-889 Simplify maven POM setup. Reorganize build stages
* remove unnecessary build environment variables
* add a LOG_WARN environment variable - for shorter build commands
* split the `release.sh` script into `community_release.sh` and `enterprise_release.sh`
* remove usage of the `-Dcommunity` build variable where not needed - use/exclude the `-Penterprise` profile explicitly where needed
* modify the Travis `install` phase on some jobs so it runs a basic Java compilation of the project (without docker)
* remove the *internal* profile and renamed the *master* profile into *publish-docker-latest*
* modifiy the profiles for the docker builds so that the same profile handles both community (DockerHub&Quay) and enteprise (only Quay) docker image deploys
* run all the _Unit&Integration Tests_ across community&enteprise in one single job, in parallel with the REST API & UI test suites (APPS-889)
* reorganize the job order so that the *Tests* stage is the first one executed (APPS-894)
* only run the *Maven&Docker deploy* tasks on the *master* & *release* branches after the *Tests* stage (APPS-894)
2021-03-25 13:14:32 +02:00

222 lines
13 KiB
YAML

jobs:
include:
- name: "Source Clear Scan (SCA)"
stage: Tests
if: branch = master OR branch =~ /release\/V3.\d+.*/
script: travis_wait 30 bash scripts/source_clear.sh
- name: "Unit & Integration Tests"
stage: Tests
install: travis_retry travis_wait 60 mvn -B -V -q clean install ${MVN_SKIP}
script: travis_retry travis_wait 120 mvn -B -q verify -Dskip.integrationtests=false ${LOG_WARN}
- name: "Community Rest API 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:
- |
if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then
travis_retry travis_wait 90 mvn -B -q install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-community-repo -am
else
travis_retry travis_wait 90 mvn -B -q install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am
fi
- travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-community-rest-api -am
before_script:
- |
if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then
bash scripts/startAlfresco.sh rm-community/rm-community-repo false
else
bash scripts/startAlfresco.sh rm-enterprise/rm-enterprise-repo false
fi
- bash scripts/waitForAlfrescoToStart.sh
script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false
after_script: bash scripts/getLogs.sh
- name: "Enterprise Rest API Tests"
stage: Tests
if: commit_message !~ /\[tests on community\]/
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:
- 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
before_script:
- bash scripts/startAlfresco.sh rm-enterprise/rm-enterprise-repo false
- bash scripts/waitForAlfrescoToStart.sh
- bash scripts/dockerLimitMemory.sh
- sudo free -m -t
script:
- travis_wait 90 mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -Dskip.automationtests=false
after_script: bash scripts/getLogs.sh
- name: "Enterprise Rest API WORM Tests"
stage: Tests
if: commit_message !~ /\[tests on community\]/
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:
- 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
before_script:
- bash scripts/create-worm-bucket.sh
- bash scripts/start-compose.sh "rm-enterprise/rm-enterprise-share/docker-compose-worm-support-rest.yml"
- bash scripts/waitForAlfrescoToStart.sh
script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=wormTestSuite.xml -Dskip.automationtests=false
after_script:
- bash scripts/getLogs.sh
- bash scripts/cleanup.sh
- name: "Enterprise Rest API Cluster Tests"
stage: Tests
if: commit_message !~ /\[tests on community\]/
addons:
artifacts:
paths:
- ./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
target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
install:
- travis_retry travis_wait 90 mvn -B -U -q clean 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
before_script:
- bash scripts/start-compose.sh "rm-enterprise/rm-enterprise-repo/docker-compose-cluster.yml"
- bash scripts/waitForAlfrescoToStart.sh
script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=clusterTestSuite.xml -Dskip.automationtests=false
after_failure:
- docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000
- docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000
- &community_shared_UI_configuration
name: "Community Smoke UI Tests for Records"
stage: Tests
addons:
firefox: "43.0.1"
artifacts:
paths:
- ./rm-automation/rm-automation-ui/target/surefire-reports
- ./rm-automation/rm-automation-ui/target/reports
- ./rm-automation/rm-automation-ui/target/screenshots
- alfresco.log
- solr.log
- share.log
target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
install:
- |
if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then
travis_retry travis_wait 90 mvn -B -q install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-community-repo,:alfresco-governance-services-community-share -am
bash scripts/startAlfresco.sh rm-community/rm-community-share false
bash scripts/waitForAlfrescoToStart.sh
else
travis_retry travis_wait 90 mvn -B -q install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am
bash scripts/startAlfresco.sh rm-enterprise/rm-enterprise-share true
bash scripts/waitForAlfrescoToStart.sh
bash scripts/dockerLimitMemory.sh
sudo free -m -t
fi
- travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-ui -am
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}
after_script: bash scripts/getLogs.sh
- <<: *community_shared_UI_configuration
name: "Community Smoke UI Tests for actions in RM site"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=communitySmokeRMSite.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- <<: *community_shared_UI_configuration
name: "Community Level 2: Disposition Schedules, Holds, Records UI Tests"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=communityLevel2Tests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- <<: *community_shared_UI_configuration
name: "Community Level 2: Audit, Rules, User Dashboard and Node Browser UI Tests"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=communityL2AuditRulesDashboardNodeBrowserTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- &enterprise_shared_UI_configuration
name: "Enterprise Level 2 UI Tests"
stage: Tests
if: commit_message !~ /\[tests on community\]/
addons:
firefox: "43.0.1"
artifacts:
paths:
- ./rm-automation/rm-automation-ui/target/surefire-reports
- ./rm-automation/rm-automation-ui/target/reports
- ./rm-automation/rm-automation-ui/target/screenshots
- alfresco.log
- solr.log
- share.log
target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER
install:
- travis_retry travis_wait 90 mvn -B -q 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-ui -am
- bash scripts/startAlfresco.sh rm-enterprise/rm-enterprise-share true
- 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-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseLevel2Tests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
after_script: bash scripts/getLogs.sh
- <<: *enterprise_shared_UI_configuration
name: "Enterprise Classification Level 2 UI Tests"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseLevel2ClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- <<: *enterprise_shared_UI_configuration
name: "Enterprise Records Classification UI Tests"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseRecordsClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- <<: *enterprise_shared_UI_configuration
name: "Enterprise Folders Classification UI Tests"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseFoldersClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- <<: *enterprise_shared_UI_configuration
name: "Enterprise Documents Classification UI Tests"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseDocumentsClassificationTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- <<: *enterprise_shared_UI_configuration
name: "Enterprise Security Marks UI Tests"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseSecurityMarksTests.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- <<: *enterprise_shared_UI_configuration
name: "Enterprise Console, Guides and Configuration UI Tests"
script:
- travis_wait 90 xvfb-run --server-args="-screen 0 1920x1080x24" mvn -B test -pl :alfresco-governance-services-automation-ui -Dskip.automationtests=false -DsuiteXmlFile=enterpriseConsoleGuidesAndConfiguration.xml -Dshare.url=${SHARE_URL} -Dalfresco.url=${ALFRESCO_URL} ${WEBDRIVER_ARGUMENTS}
- <<: *enterprise_shared_UI_configuration
name: "Enterprise WORM UI Tests"
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 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-ui -am
before_script:
- bash scripts/create-worm-bucket.sh
- bash scripts/start-compose.sh "rm-enterprise/rm-enterprise-share/docker-compose-worm-support-ui.yml"
- bash scripts/waitForAlfrescoToStart.sh
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}
after_script:
- bash scripts/getLogs.sh
- bash scripts/cleanup.sh