mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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 <claudia.agache@ness.com>
(cherry picked from commit 96847b1f1c
)
# 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
This commit is contained in:
@@ -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"
|
||||
|
@@ -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\]/
|
@@ -16,13 +16,10 @@
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.javadoc.skip>true</maven.javadoc.skip>
|
||||
|
||||
<maven.buildhelper.version>1.9.1</maven.buildhelper.version>
|
||||
<maven.compiler.version>3.8.0</maven.compiler.version>
|
||||
<maven.enforcer.plugin>3.0.0-M2</maven.enforcer.plugin>
|
||||
<maven.resources.version>3.1.0</maven.resources.version>
|
||||
<maven.tomcat.port>8080</maven.tomcat.port>
|
||||
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
@@ -47,11 +44,27 @@
|
||||
<!-- <scope>test</scope>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- XML jars removed in Java 11 but are provided by alfresco-content-services -->
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.jws</groupId>
|
||||
<artifactId>jakarta.jws-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-mock</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@@ -11,8 +11,7 @@
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<dependency.jackson-databind.version>2.7.9.1</dependency.jackson-databind.version> <!-- does this fix the 2 tests? -->
|
||||
<maven.javadoc.skip>false</maven.javadoc.skip>
|
||||
<jackson.databind.version>2.7.9.1</jackson.databind.version>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
@@ -13,7 +13,6 @@
|
||||
|
||||
<properties>
|
||||
<image.name>alfresco/alfresco-governance-repository-community</image.name>
|
||||
<maven.javadoc.skip>false</maven.javadoc.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -64,6 +63,7 @@
|
||||
<dependency>
|
||||
<groupId>org.alfresco.surf</groupId>
|
||||
<artifactId>spring-webscripts</artifactId>
|
||||
<version>${dependency.webscripts.version}</version>
|
||||
<classifier>tests</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
@@ -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/)
|
||||
|
||||
|
@@ -10,10 +10,6 @@
|
||||
<version>11.7-ags-1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<maven.javadoc.skip>false</maven.javadoc.skip>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@@ -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}
|
||||
|
@@ -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"
|
@@ -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}
|
@@ -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
|
@@ -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
|
@@ -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 =========================="
|
@@ -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 =========================="
|
@@ -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)
|
@@ -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
|
@@ -1,78 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
scriptName=`basename "$0"`
|
||||
|
||||
usage="Usage: $scriptName [options]
|
||||
|
||||
-h , --help show this help text
|
||||
-i <sourceImage> a source image to use
|
||||
(e.g. quay.io/alfresco/ags-share-community)
|
||||
-r <repository> a repository to push new tags to
|
||||
(e.g. registry.hub.docker.com)
|
||||
-t <tag> the existing tag for the images (mandatory)
|
||||
-d <digestLength> 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
|
@@ -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}
|
@@ -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
|
@@ -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
|
@@ -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
|
||||
|
9
pom.xml
9
pom.xml
@@ -39,8 +39,6 @@
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<maven.build.sourceVersion>${java.version}</maven.build.sourceVersion>
|
||||
<maven.war.plugin.version>3.2.2</maven.war.plugin.version>
|
||||
<maven.javadoc.plugin.version>3.2.0</maven.javadoc.plugin.version>
|
||||
|
||||
<dir.root>${project.build.directory}/alf_data</dir.root>
|
||||
|
||||
@@ -70,7 +68,7 @@
|
||||
<dependency.org-json.version>20210307</dependency.org-json.version>
|
||||
<dependency.commons-dbcp.version>1.4-DBCP330</dependency.commons-dbcp.version>
|
||||
<dependency.commons-io.version>2.8.0</dependency.commons-io.version>
|
||||
<dependency.gson.version>2.8.5</dependency.gson.version>
|
||||
<dependency.gson.version>2.8.6</dependency.gson.version>
|
||||
<dependency.httpclient.version>4.5.13</dependency.httpclient.version>
|
||||
<dependency.httpcore.version>4.4.14</dependency.httpcore.version>
|
||||
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
|
||||
@@ -672,7 +670,6 @@
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${dependency.mysql.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mariadb.jdbc</groupId>
|
||||
@@ -910,12 +907,12 @@
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>${maven.war.plugin.version}</version>
|
||||
<version>3.2.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>${maven.javadoc.plugin.version}</version>
|
||||
<version>3.2.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
Reference in New Issue
Block a user