From 22c4b7f68b9c73ec9f8e6a6ba0367eccba367980 Mon Sep 17 00:00:00 2001 From: alandavis Date: Wed, 5 May 2021 21:31:20 +0100 Subject: [PATCH] Pom and build cleanup [skip ci] (#431) * change artifacts target path [ags][skip db][no downstream] * Round 1 [ags][skip repo] * Remove eclipse-specific plugins [ags][skip repo][skip db][skip tas] * Remove a few unnecessary pom properties [skip ci] * Delete unused build scripts [ags][ags on MySQL] * [skip ci] Co-authored-by: Claudia Agache (cherry picked from commit 96847b1f1c8635ba02e5396ca2c67913815a9607) # Conflicts: # amps/ags/pom.xml # amps/ags/rm-automation/rm-automation-community-rest-api/pom.xml # amps/ags/rm-community/rm-community-repo/pom.xml # pom.xml --- .travis.yml | 2 +- amps/ags/.travis.yml | 43 ---- amps/ags/pom.xml | 19 +- .../rm-automation-community-rest-api/pom.xml | 3 +- .../rm-community/rm-community-repo/pom.xml | 2 +- .../rm-community-rest-api-explorer/README.md | 2 +- .../rm-community-rest-api-explorer/pom.xml | 4 - amps/ags/travis/.travis.deploy-stage.yml | 8 - amps/ags/travis/.travis.env-vars.yml | 13 -- .../travis/.travis.integration-test-MySQL.yml | 19 -- amps/ags/travis/.travis.tests-stage.yml | 221 ------------------ amps/ags/travis/scripts/cleanImages.sh | 19 -- amps/ags/travis/scripts/cleanup.sh | 21 -- amps/ags/travis/scripts/create-worm-bucket.sh | 26 --- .../scripts/delete-test-buckets-lambda.py | 105 --------- amps/ags/travis/scripts/dockerLimitMemory.sh | 15 -- .../ags/travis/scripts/pushDockerDigestTag.sh | 78 ------- amps/ags/travis/scripts/source_clear.sh | 16 -- amps/ags/travis/scripts/start-compose.sh | 20 -- amps/ags/travis/scripts/startAlfresco.sh | 11 - .../travis/scripts/waitForAlfrescoToStart.sh | 29 --- pom.xml | 9 +- 22 files changed, 23 insertions(+), 662 deletions(-) delete mode 100644 amps/ags/.travis.yml delete mode 100644 amps/ags/travis/.travis.deploy-stage.yml delete mode 100644 amps/ags/travis/.travis.env-vars.yml delete mode 100644 amps/ags/travis/.travis.integration-test-MySQL.yml delete mode 100644 amps/ags/travis/.travis.tests-stage.yml delete mode 100644 amps/ags/travis/scripts/cleanImages.sh delete mode 100644 amps/ags/travis/scripts/cleanup.sh delete mode 100644 amps/ags/travis/scripts/create-worm-bucket.sh delete mode 100644 amps/ags/travis/scripts/delete-test-buckets-lambda.py delete mode 100644 amps/ags/travis/scripts/dockerLimitMemory.sh delete mode 100644 amps/ags/travis/scripts/pushDockerDigestTag.sh delete mode 100644 amps/ags/travis/scripts/source_clear.sh delete mode 100644 amps/ags/travis/scripts/start-compose.sh delete mode 100644 amps/ags/travis/scripts/startAlfresco.sh delete mode 100644 amps/ags/travis/scripts/waitForAlfrescoToStart.sh diff --git a/.travis.yml b/.travis.yml index c77695a0f9..1b528a51f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -317,7 +317,7 @@ jobs: - ./amps/ags/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} + target_paths: community/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NAME} before_script: - ${TAS_SCRIPTS}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml - ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco" diff --git a/amps/ags/.travis.yml b/amps/ags/.travis.yml deleted file mode 100644 index d699ea43d7..0000000000 --- a/amps/ags/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -import: - - source: travis/.travis.env-vars.yml - - source: travis/.travis.tests-stage.yml - - source: travis/.travis.integration-test-MySQL.yml - - source: travis/.travis.deploy-stage.yml -dist: xenial -sudo: required -language: java -jdk: openjdk11 - -services: - - docker - -git: - depth: false - quiet: true - -branches: - only: - - master - - /release\/.*/ - - /feature\/.*/ - - /merge\/.*/ - - /hotfix\/.*/ - -cache: - directories: - - ${HOME}/.m2/repository - -before_cache: rm -rf ${HOME}/.m2/repository/org/alfresco/alfresco-governance-services* - -install: skip - -stages: - - name: Tests - if: commit_message !~ /\[skip tests\]/ - - name: Deploy - if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request - - name: Release - if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message =~ /\[(community|enterprise) release .*\]/ - - name: Publish - if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message =~ /\[publish\]/ diff --git a/amps/ags/pom.xml b/amps/ags/pom.xml index 8a5e47dcfb..cc784bc157 100644 --- a/amps/ags/pom.xml +++ b/amps/ags/pom.xml @@ -16,13 +16,10 @@ - true - 1.9.1 3.8.0 3.0.0-M2 3.1.0 - 8080 UTF-8 UTF-8 @@ -47,11 +44,27 @@ + + jakarta.xml.bind + jakarta.xml.bind-api + provided + + + org.glassfish.jaxb + jaxb-runtime + provided + jakarta.jws jakarta.jws-api provided + + + org.apache.camel + camel-mock + test + diff --git a/amps/ags/rm-automation/rm-automation-community-rest-api/pom.xml b/amps/ags/rm-automation/rm-automation-community-rest-api/pom.xml index 3fbecc94a6..3f7a4c010a 100644 --- a/amps/ags/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/amps/ags/rm-automation/rm-automation-community-rest-api/pom.xml @@ -11,8 +11,7 @@ - 2.7.9.1 - false + 2.7.9.1 diff --git a/amps/ags/rm-community/rm-community-repo/pom.xml b/amps/ags/rm-community/rm-community-repo/pom.xml index 3c9721a44d..7c484229f1 100644 --- a/amps/ags/rm-community/rm-community-repo/pom.xml +++ b/amps/ags/rm-community/rm-community-repo/pom.xml @@ -13,7 +13,6 @@ alfresco/alfresco-governance-repository-community - false @@ -64,6 +63,7 @@ org.alfresco.surf spring-webscripts + ${dependency.webscripts.version} tests test diff --git a/amps/ags/rm-community/rm-community-rest-api-explorer/README.md b/amps/ags/rm-community/rm-community-rest-api-explorer/README.md index 289481ed58..6568fe23e3 100644 --- a/amps/ags/rm-community/rm-community-rest-api-explorer/README.md +++ b/amps/ags/rm-community/rm-community-rest-api-explorer/README.md @@ -19,7 +19,7 @@ Now the application is running at [http://localhost:8085/api-explorer](http://lo #### Config option You can run tomcat on another port using the following command -- ` mvn clean install -Pstart-api-explorer -Dmaven.tomcat.port=8086` +- ` mvn clean install -Pstart-api-explorer` Then the application will run at [http://localhost:8086/api-explorer](http://localhost:8086/api-explorer/) diff --git a/amps/ags/rm-community/rm-community-rest-api-explorer/pom.xml b/amps/ags/rm-community/rm-community-rest-api-explorer/pom.xml index 1993ca3f96..56d85d3d0d 100644 --- a/amps/ags/rm-community/rm-community-rest-api-explorer/pom.xml +++ b/amps/ags/rm-community/rm-community-rest-api-explorer/pom.xml @@ -10,10 +10,6 @@ 11.7-ags-1.0-SNAPSHOT - - false - - diff --git a/amps/ags/travis/.travis.deploy-stage.yml b/amps/ags/travis/.travis.deploy-stage.yml deleted file mode 100644 index 0970d8ee4f..0000000000 --- a/amps/ags/travis/.travis.deploy-stage.yml +++ /dev/null @@ -1,8 +0,0 @@ -jobs: - include: - - name: "Deploy Maven & Docker" - stage: Deploy - install: travis_retry travis_wait 60 mvn -B -V -q clean install ${MVN_SKIP} - before_script: test "${TRAVIS_BRANCH}" = "master" && export IMAGE_TAG="latest" || export IMAGE_TAG="${TRAVIS_BRANCH:8}-latest" - script: travis_retry travis_wait 120 mvn -B -q deploy -DskipTests -Ppublish-docker-latest -Dimage.tag=${IMAGE_TAG} ${LOG_WARN} - diff --git a/amps/ags/travis/.travis.env-vars.yml b/amps/ags/travis/.travis.env-vars.yml deleted file mode 100644 index 99012c1f89..0000000000 --- a/amps/ags/travis/.travis.env-vars.yml +++ /dev/null @@ -1,13 +0,0 @@ -env: - global: - - MVN_SKIP='-Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests' - - AGS_AWS_ACCESS_KEY_ID=${CREATE_BUCKET_AWS_ACCESS_KEY} - - AGS_AWS_SECRET_ACCESS_KEY=${CREATE_BUCKET_AWS_SECRET_KEY} - - S3_BUCKET_REGION="us-east-1" - - S3_BUCKET_NAME="travis-ags-${TRAVIS_JOB_NUMBER}" - - S3_BUCKET2_NAME="travis-ags-worm-b2" - - ALFRESCO_URL="http://localhost:8080/alfresco" - - SHARE_URL="http://localhost:8181/share" - - DISPLAY=:99.0 - - WEBDRIVER_ARGUMENTS='-Dwebdriver.local.grid=true -Dwebdriver.browser=RemoteFireFox -Dwebdriver.localGrid=false -Dorg.alfresco.rm.timeout_seconds.MEDIUM=30' - - LOG_WARN="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" diff --git a/amps/ags/travis/.travis.integration-test-MySQL.yml b/amps/ags/travis/.travis.integration-test-MySQL.yml deleted file mode 100644 index f4a083baa9..0000000000 --- a/amps/ags/travis/.travis.integration-test-MySQL.yml +++ /dev/null @@ -1,19 +0,0 @@ -### Integration tests on MySQL are running: -## - on stable branch -## - on demand with commit message [execute tests on MySQL] - -jobs: - include: - - &integration_test_on_MYSQL - name: "Community Integrations Tests on MySQL" - stage: Tests - if: branch =~ /(release\/.*$|master)/ OR commit_message =~ /\[execute tests on MySQL\]/ - install: travis_retry travis_wait 60 mvn -B -V -q clean install ${MVN_SKIP} - before_script: - - docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mysql:5.7.23 --transaction-isolation='READ-COMMITTED' - - docker run -d -p 61617:61617 -p 5673:5673 alfresco/alfresco-activemq:5.15.8 - script: travis_retry travis_wait 80 mvn -B -q clean verify ${MVN_SKIP} -Puse-mysql -Dmy.db.name=alfresco -Dmy.db.port=3307 -f rm-community/pom.xml -amd ${LOG_WARN} - - - <<: *integration_test_on_MYSQL - name: "Enterprise Integrations Tests on MySQL" - script: travis_retry travis_wait 80 mvn -B -q clean verify ${MVN_SKIP} -Puse-mysql -Dmy.db.name=alfresco -Dmy.db.port=3307 -f rm-enterprise/pom.xml -amd ${LOG_WARN} diff --git a/amps/ags/travis/.travis.tests-stage.yml b/amps/ags/travis/.travis.tests-stage.yml deleted file mode 100644 index 4d217c4bbf..0000000000 --- a/amps/ags/travis/.travis.tests-stage.yml +++ /dev/null @@ -1,221 +0,0 @@ -jobs: - include: - - name: "Source Clear Scan (SCA)" - stage: Tests - if: branch = master OR branch =~ /release\/V3.\d+.*/ - script: travis_wait 30 bash travis/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 ${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 travis/scripts/startAlfresco.sh rm-community/rm-community-repo false - else - bash travis/scripts/startAlfresco.sh rm-enterprise/rm-enterprise-repo false - fi - - bash travis/scripts/waitForAlfrescoToStart.sh - script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false - after_script: bash travis/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 travis/scripts/startAlfresco.sh rm-enterprise/rm-enterprise-repo false - - bash travis/scripts/waitForAlfrescoToStart.sh - - bash travis/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 travis/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 travis/scripts/create-worm-bucket.sh - - bash travis/scripts/start-compose.sh "rm-enterprise/rm-enterprise-share/docker-compose-worm-support-rest.yml" - - bash travis/scripts/waitForAlfrescoToStart.sh - script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=wormTestSuite.xml -Dskip.automationtests=false - after_script: - - bash travis/scripts/getLogs.sh - - bash travis/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 travis/scripts/start-compose.sh "rm-enterprise/rm-enterprise-repo/docker-compose-cluster.yml" - - bash travis/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 travis/scripts/startAlfresco.sh rm-community/rm-community-share false - bash travis/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 travis/scripts/startAlfresco.sh rm-enterprise/rm-enterprise-share true - bash travis/scripts/waitForAlfrescoToStart.sh - bash travis/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 travis/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 travis/scripts/startAlfresco.sh rm-enterprise/rm-enterprise-share true - - bash travis/scripts/waitForAlfrescoToStart.sh - - bash travis/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 travis/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 travis/scripts/create-worm-bucket.sh - - bash travis/scripts/start-compose.sh "rm-enterprise/rm-enterprise-share/docker-compose-worm-support-ui.yml" - - bash travis/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 travis/scripts/getLogs.sh - - bash travis/scripts/cleanup.sh diff --git a/amps/ags/travis/scripts/cleanImages.sh b/amps/ags/travis/scripts/cleanImages.sh deleted file mode 100644 index 8d58cfdc02..0000000000 --- a/amps/ags/travis/scripts/cleanImages.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -set -x - -echo $imagesToBeDeleted -echo "List all images:" -docker images -a - -docker_images_list=$(docker images | grep $imagesToBeDeleted | awk '{print $3}' | uniq) -if [ "$docker_images_list" == "" ]; then - echo "No docker images on the agent" -else - echo "Clearing images: $docker_images_list" - if docker rmi -f $docker_images_list ; then - echo "Deleting images was successful." - else - echo "Deleting specified images failed, so falling back to delete ALL images on system." - docker rmi -f $(docker images -aq) - fi -fi diff --git a/amps/ags/travis/scripts/cleanup.sh b/amps/ags/travis/scripts/cleanup.sh deleted file mode 100644 index d7993ad92f..0000000000 --- a/amps/ags/travis/scripts/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -echo "=========================== Starting Cleanup Script ===========================" -PS4="\[\e[35m\]+ \[\e[m\]" -set -vx -pushd "$(dirname "${BASH_SOURCE[0]}")/../" - - -# Stop and remove the containers -docker ps -a -q | xargs -l -r docker stop -docker ps -a -q | xargs -l -r docker rm - -pip install awscli -printf "${CREATE_BUCKET_AWS_ACCESS_KEY}\n${CREATE_BUCKET_AWS_SECRET_KEY}\n\n\n" | aws configure - -aws s3 ls | awk '{print $3}' | grep "^${S3_BUCKET_NAME}" | xargs -l -r -I{} aws s3 rb "s3://{}" --force -aws s3 ls | awk '{print $3}' | grep "^${S3_BUCKET2_NAME}" | xargs -l -r -I{} aws s3 rb "s3://{}" --force - -popd -set +vx -echo "=========================== Finishing Cleanup Script ==========================" \ No newline at end of file diff --git a/amps/ags/travis/scripts/create-worm-bucket.sh b/amps/ags/travis/scripts/create-worm-bucket.sh deleted file mode 100644 index a3ff254ad6..0000000000 --- a/amps/ags/travis/scripts/create-worm-bucket.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -echo "=========================== Create Worm Bucket ===========================" -PS4="\[\e[35m\]+ \[\e[m\]" -set -vex -pushd "$(dirname "${BASH_SOURCE[0]}")/../" - -pip install awscli -printf "${CREATE_BUCKET_AWS_ACCESS_KEY}\n${CREATE_BUCKET_AWS_SECRET_KEY}\n\n\n" | aws configure - -if aws s3 ls | awk '{print $3}' | grep -q "^${S3_BUCKET2_NAME}$" ; then - echo "Bucket ${S3_BUCKET2_NAME} already exists" - exit 0 -fi - -aws s3api create-bucket --bucket "${S3_BUCKET2_NAME}" --region ${S3_BUCKET_REGION} --object-lock-enabled-for-bucket -aws s3api put-object-lock-configuration \ - --bucket "${S3_BUCKET2_NAME}" \ - --object-lock-configuration 'ObjectLockEnabled=Enabled,Rule={DefaultRetention={Mode=COMPLIANCE,Days=1}}' - -aws s3api put-bucket-tagging --bucket "${S3_BUCKET2_NAME}" \ - --tagging="TagSet=[{Key=toDeleteAfterTests,Value=true}]" - -popd -set +vex -echo "=========================== Finishing Create Worm Bucket Script ==========================" diff --git a/amps/ags/travis/scripts/delete-test-buckets-lambda.py b/amps/ags/travis/scripts/delete-test-buckets-lambda.py deleted file mode 100644 index 974f1bb220..0000000000 --- a/amps/ags/travis/scripts/delete-test-buckets-lambda.py +++ /dev/null @@ -1,105 +0,0 @@ -import json -import boto3 -from datetime import datetime, timedelta, timezone -from botocore.exceptions import ClientError - - -# This python module is intended for use as a Python 3 AWS lambda function -# Tested in python 3.6 environment -# The AWS role used with this lambda function will need AmazonS3FullAccess and CloudWatchLogsFullAccess permissions -# Tested with role lambda_s3_execution_role in engineering account - -# Retrieve bucket's tag set -def get_tagset(bucket): - try: - return bucket.Tagging().tag_set - except ClientError as e: - return [] - -# Check if a bucket should be deleted -def tag_matches(bucket): - for tag in get_tagset(bucket): - if tag["Key"] == "toDeleteAfterTests" and tag["Value"] == "true" : - return True - return False - -def age_matches(bucket): - delta = datetime.now(timezone.utc) - bucket.creation_date - return delta.days > 0 - -def prefix_matches(bucket, prefix): - if not prefix: - return True - if bucket.name.startswith(prefix): - return True - return False - -# Get a list of buckets to delete -def get_buckets_to_delete(prefix): - s3 = boto3.resource('s3') - - # Get all buckets matching bucket name prefix - prefixed_buckets = [bucket for bucket in s3.buckets.all() if prefix_matches(bucket, prefix)] - - # Filter buckets on tag - # tagged_buckets = [bucket for bucket in prefixed_buckets if tag_matches(bucket)] - - # Filter buckets on age - old_buckets = [bucket for bucket in prefixed_buckets if age_matches(bucket)] - - return old_buckets - -# Delete bucket -def delete_bucket(bucket): - try: - [object.delete for object in bucket.objects.all()] - except ClientError as e: - print("Failed to delete objects in bucket: " + bucket.name) - print(e) - try: - bucket.objects.all().delete() - except ClientError as e: - print("Failed to delete objects in bucket: " + bucket.name) - print(e) - - try: - [version.delete() for version in bucket.object_versions.all()] - except ClientError as e: - print("Failed to delete object_versions in bucket: " + bucket.name) - print(e) - try: - bucket.object_versions.delete() - except ClientError as e: - print("Failed to delete object_versions in bucket: " + bucket.name) - print(e) - - try: - bucket.delete() - print("Bucket " + bucket.name + " was deleted") - except ClientError as e: - print("Failed to delete bucket: " + bucket.name) - print(e) - - -# Non-empty buckets are deleted (recursively); failed attempts will be logged. -# The buckets are filtered on the name prefix: "travis-ags-worm-" -def lambda_handler(event, context): - - # Retrieve bucket name prefix option - prefix = "travis-ags-" - - # Get a list of buckets to delete - buckets_to_delete = get_buckets_to_delete(prefix) - - # Delete buckets - print ("Deleting buckets:") - for bucket in buckets_to_delete : - print (bucket.name) - delete_bucket(bucket) - - return { - 'statusCode': 200, - 'body': json.dumps('Done!') - } - -#lambda_handler(None, None) diff --git a/amps/ags/travis/scripts/dockerLimitMemory.sh b/amps/ags/travis/scripts/dockerLimitMemory.sh deleted file mode 100644 index d0867177bc..0000000000 --- a/amps/ags/travis/scripts/dockerLimitMemory.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -set -x - -#stop not needed containers -docker stop $(docker ps -a | grep '_zeppelin_' | awk '{print $1}') -docker stop $(docker ps -a | grep '_sync-service_' | awk '{print $1}') - -shareContainerId=$(docker ps -a | grep '_share_' | awk '{print $1}') -if [ -n "$shareContainerId" ]; then - docker stop $(docker ps -a | grep '_transform-router_' | awk '{print $1}') - docker stop $(docker ps -a | grep '_shared-file-store_' | awk '{print $1}') -fi - -# Display containers resources usage -docker stats --no-stream diff --git a/amps/ags/travis/scripts/pushDockerDigestTag.sh b/amps/ags/travis/scripts/pushDockerDigestTag.sh deleted file mode 100644 index 876d92dfda..0000000000 --- a/amps/ags/travis/scripts/pushDockerDigestTag.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash -set -x - -scriptName=`basename "$0"` - -usage="Usage: $scriptName [options] - - -h , --help show this help text - -i a source image to use - (e.g. quay.io/alfresco/ags-share-community) - -r a repository to push new tags to - (e.g. registry.hub.docker.com) - -t the existing tag for the images (mandatory) - -d the length of digest to output (default 12 chars)" - -digestLength=12 - -while getopts ':hi:r:t:d:' option; do - case "$option" in - h) echo -e "Tag one or more images to include the digest and push this to some repositories.\n\n${usage}" - exit - ;; - i) sourceImages+=("$OPTARG") - ;; - r) repositories+=("$OPTARG") - ;; - t) existingTag=$OPTARG - ;; - d) digestLength=$OPTARG - ;; - :) echo -e "Missing argument for -${OPTARG}\n\n${usage}" >&2 - exit 1 - ;; - \?) echo -e "Illegal option: -${OPTARG}\n\n${usage}" >&2 - exit 1 - ;; - esac -done -shift $((OPTIND - 1)) - -if [ "#$existingTag" == "#" ]; then - echo -e "Please supply a tag with the -t option.\n\n${usage}" >&2 - exit 1 -fi - -for sourceImage in ${sourceImages[@]} -do - echo "Processing $sourceImage" - - # Note that this command should work even if the image is already present locally. - digest=`docker pull ${sourceImage}:${existingTag} | grep "Digest:" | awk -F':' '{print $3}' | cut -c 1-$digestLength` - - if [ ${#digest} != $digestLength ] - then - echo "Unexpected length for digest of ${sourceImage}: '${digest}'" >&2 - exit 1 - fi - - newTag=${existingTag}-${digest} - - # Remove the source repository name if it contains one. - slashes=`echo $sourceImage | sed "s|[^/]||g"` - if [ ${#slashes} == 2 ] - then - # The repository name is everything up to the first slash. - image=`echo $sourceImage | sed "s|[^/]*/||"` - else - # Assume the source image doesn't reference the repository name. - image=$sourceImage - fi - - for repository in ${repositories[@]} - do - docker tag ${sourceImage}:${existingTag} ${repository}/${image}:${newTag} - docker push ${repository}/${image}:${newTag} - echo "Pushed ${sourceImage}:${existingTag} to ${repository}/${image}:${newTag}" - done -done diff --git a/amps/ags/travis/scripts/source_clear.sh b/amps/ags/travis/scripts/source_clear.sh deleted file mode 100644 index 85576d3ad1..0000000000 --- a/amps/ags/travis/scripts/source_clear.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -# fail script immediately on any errors in external commands and print the lines -set -ev - -mvn -B -q clean install \ - -DskipTests \ - -Dmaven.javadoc.skip=true \ - -pl '!rm-automation,!rm-automation/rm-automation-community-rest-api,!rm-automation/rm-automation-enterprise-rest-api,!rm-automation/rm-automation-ui,!rm-benchmark' \ - com.srcclr:srcclr-maven-plugin:scan \ - -Dcom.srcclr.apiToken=$SRCCLR_API_TOKEN > scan.log - -SUCCESS=$? # this will read exit code of the previous command - -cat scan.log | grep -e 'Full Report Details' -e 'Failed' - -exit ${SUCCESS} diff --git a/amps/ags/travis/scripts/start-compose.sh b/amps/ags/travis/scripts/start-compose.sh deleted file mode 100644 index a3b47dcb2e..0000000000 --- a/amps/ags/travis/scripts/start-compose.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -export DOCKER_COMPOSE_PATH="${1}" - -if [ -z "$DOCKER_COMPOSE_PATH" ] ; then - echo "Please provide path to docker-compose.yml: \"${0##*/} /path/to/docker-compose.yml\"" - exit 1 -fi - -echo "Starting AGS stack in ${DOCKER_COMPOSE_PATH}" - -# .env files are picked up from project directory correctly on docker-compose 1.23.0+ -docker-compose --file "${DOCKER_COMPOSE_PATH}" --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d - -if [ $? -eq 0 ] ; then - echo "Docker Compose started ok" -else - echo "Docker Compose failed to start" >&2 - exit 1 -fi \ No newline at end of file diff --git a/amps/ags/travis/scripts/startAlfresco.sh b/amps/ags/travis/scripts/startAlfresco.sh deleted file mode 100644 index f1dad1fcb2..0000000000 --- a/amps/ags/travis/scripts/startAlfresco.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash -# fail script immediately on any errors in external commands and print the lines -set -ev - -cd $1 -# if 2nd input parameter is true then use .env.ci where TRANSFORM_SERVICE_ENABLED flag is set to false -# in order to not use anymore Transform router and Shared File Store -if $2 ; then - mv -u .env.ci .env -fi -docker-compose up -d diff --git a/amps/ags/travis/scripts/waitForAlfrescoToStart.sh b/amps/ags/travis/scripts/waitForAlfrescoToStart.sh deleted file mode 100644 index 4e378948d1..0000000000 --- a/amps/ags/travis/scripts/waitForAlfrescoToStart.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -set -xe -WAIT_INTERVAL=1 -COUNTER=0 -TIMEOUT=300 -t0=$(date +%s) - -echo "Waiting for alfresco to start" -until $(curl --output /dev/null --silent --head --fail ${ALFRESCO_URL}) || [ "$COUNTER" -eq "$TIMEOUT" ]; do - printf '.' - sleep $WAIT_INTERVAL - COUNTER=$(($COUNTER+$WAIT_INTERVAL)) -done - -if (("$COUNTER" < "$TIMEOUT")) ; then - t1=$(date +%s) - delta=$((($t1 - $t0)/60)) - echo "Alfresco Started in $delta minutes" -else - echo "Waited $COUNTER seconds" - echo "Alfresco Could not start in time." - echo "All started containers:" - docker ps -a - ALFCONTAINER=$(docker ps -a | grep _alfresco_1 | awk '{ print $1 }') - echo "Last 200 lines from alfresco.log on container $ALFCONTAINER:" - docker logs --tail=200 ${ALFCONTAINER} - exit 1 -fi - diff --git a/pom.xml b/pom.xml index 8e21c399d1..376728bf29 100644 --- a/pom.xml +++ b/pom.xml @@ -39,8 +39,6 @@ ${java.version} ${java.version} ${java.version} - 3.2.2 - 3.2.0 ${project.build.directory}/alf_data @@ -70,7 +68,7 @@ 20210307 1.4-DBCP330 2.8.0 - 2.8.5 + 2.8.6 4.5.13 4.4.14 3.1-HTTPCLIENT-1265 @@ -672,7 +670,6 @@ mysql mysql-connector-java ${dependency.mysql.version} - test org.mariadb.jdbc @@ -910,12 +907,12 @@ maven-war-plugin - ${maven.war.plugin.version} + 3.2.2 org.apache.maven.plugins maven-javadoc-plugin - ${maven.javadoc.plugin.version} + 3.2.0 org.apache.maven.plugins