Skip to content

Commit

Permalink
Add TAS tests to Travis builds (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
killerboot committed Nov 21, 2019
1 parent 1ff57b4 commit 8411ce5
Show file tree
Hide file tree
Showing 330 changed files with 57,943 additions and 12 deletions.
48 changes: 40 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ cache:
env:
global:
- VERSION_EDITION=Community
- DOCKER_IMAGE_TAG=latest
- DOCKER_IMAGE_REGISTRY=quay.io
- DOCKER_COMPOSE_VERSION=1.23.2
- ALFRESCO_IMAGE_NAME=alfresco/alfresco-content-repository-community

branches:
only:
Expand All @@ -29,13 +25,49 @@ matrix:
# only on master and if it is not a PR
if: fork = false AND branch = master AND type != pull_request
install:
- travis_retry travis_wait 30 mvn -q install -Dbuild-number=${TRAVIS_BUILD_NUMBER} "-Dbuild-key=${TRAVIS_COMMIT}" "-Dbuild-name=${TRAVIS_BUILD_WEB_URL}" "-Dscm-path=${TRAVIS_REPO_SLUG}" "-Dversion.edition=${VERSION_EDITION}" -f war/pom.xml
- travis_retry travis_wait 30 mvn -q install "-Dversion.edition=${VERSION_EDITION}" -f war/pom.xml
script:
# Download the latest version of WhiteSource Unified Agent
- curl -LJO https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.jar
# Run WhiteSource Unified Agent
- java -jar wss-unified-agent.jar -apiKey ${WHITESOURCE_API_KEY} -c .wss-unified-agent.config -d ./war
- name: "Build packaging"
install: skip
- name: "REST API TAS tests"
jdk: openjdk11
install:
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal+transforms.yml
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 60 mvn install -q -f tests/tas-restapi/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "CMIS TAS tests"
jdk: openjdk11
install:
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal+transforms.yml
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 40 mvn install -q -f tests/tas-cmis/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "Email TAS tests"
jdk: openjdk11
install:
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal.yml
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 30 mvn install -q -f tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "WebDAV TAS tests"
jdk: openjdk11
install:
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal.yml
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 30 mvn install -q -f tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "Integration TAS tests"
jdk: openjdk11
install:
- travis_retry travis_wait 40 mvn install -q "-Dversion.edition=${VERSION_EDITION}" -Dmaven.javadoc.skip=true -PcommunityDocker
- ./tests/scripts/start-compose.sh ./tests/environment/docker-compose-minimal.yml
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_retry travis_wait 40 mvn install -q -Dbuild-number=${TRAVIS_BUILD_NUMBER} -Dbuild-key=${TRAVIS_COMMIT} -Dbuild-name="${TRAVIS_BUILD_WEB_URL}" -Dscm-path=${TRAVIS_REPO_SLUG} "-Dversion.edition=${VERSION_EDITION}" "-Dimage.tag=${DOCKER_IMAGE_TAG}" -Dimage.registry=${DOCKER_IMAGE_REGISTRY} -Dimage.name=${ALFRESCO_IMAGE_NAME} -Dmaven.javadoc.skip=true -PcommunityDocker
- travis_wait 30 mvn install -q -f tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
6 changes: 2 additions & 4 deletions docker-alfresco/test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ services:
- 8082:8080
- 8000:8000
- 143:1143
- "21:1221"
- "30000-30099:30000-30099"
- 21:1221
- 30000-30099:30000-30099

alfresco-pdf-renderer:
image: alfresco/alfresco-pdf-renderer:${TRANSFORMERS_TAG}
Expand Down Expand Up @@ -106,8 +106,6 @@ services:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
ports:
- 5432:5432

solr6:
image: alfresco/alfresco-search-services:${SOLR6_TAG}
Expand Down
15 changes: 15 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
<module>docker-alfresco</module>
</modules>
</profile>
<profile>
<id>all-tas-tests</id>
<modules>
<module>tests</module>
</modules>
</profile>
</profiles>

<scm>
Expand Down Expand Up @@ -101,6 +107,15 @@

<dependency.postgresql.version>42.2.6</dependency.postgresql.version>

<dependency.tas-utility.version>3.0.14</dependency.tas-utility.version>
<dependency.rest-assured.version>3.3.0</dependency.rest-assured.version>
<dependency.javax.json.version>1.0.4</dependency.javax.json.version>
<dependency.tas-restapi.version>1.15</dependency.tas-restapi.version>
<dependency.tas-cmis.version>1.5</dependency.tas-cmis.version>
<dependency.tas-email.version>1.1</dependency.tas-email.version>
<dependency.tas-webdav.version>1.0</dependency.tas-webdav.version>
<dependency.tas-ftp.version>1.0</dependency.tas-ftp.version>
<dependency.tas-dataprep.version>2.2</dependency.tas-dataprep.version>
</properties>

<dependencyManagement>
Expand Down
4 changes: 4 additions & 0 deletions tests/environment/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TRANSFORMERS_TAG=2.1.0
SOLR6_TAG=1.4.0
POSTGRES_TAG=11.4
ACTIVEMQ_TAG=5.15.8
143 changes: 143 additions & 0 deletions tests/environment/docker-compose-minimal+transforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
version: "3"

# The acs-community-deployment project contains the product version of docker-compose.
#
# This version is for testing and development use. For testing and debug we need to have a more open version.
# For remote debug we need the CATALINA_OPTS and to expose port 8000.

services:
alfresco:
image: alfresco/alfresco-content-repository-community:latest
environment:
CATALINA_OPTS : "-agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n"
JAVA_OPTS :
"
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dalfresco.restApi.basicAuthScheme=true
-Dimap.server.enabled=true
-Dftp.enabled=true
-Dftp.dataPortFrom=30000
-Dftp.dataPortTo=30099
-Dshare.host=localhost
-Daos.baseUrlOverwrite=http://localhost:8082/alfresco/aos
-Dmessaging.broker.url=\"failover:(tcp://activemq:61616)?timeout=3000&jms.useCompression=true\"
-Dlocal.transform.service.enabled=true
-DlocalTransform.pdfrenderer.url=http://alfresco-pdf-renderer:8090/
-DlocalTransform.imagemagick.url=http://imagemagick:8090/
-DlocalTransform.libreoffice.url=http://libreoffice:8090/
-DlocalTransform.tika.url=http://tika:8090/
-DlocalTransform.misc.url=http://transform-misc:8090/
-Dlegacy.transform.service.enabled=true
-Dalfresco-pdf-renderer.url=http://alfresco-pdf-renderer:8090/
-Djodconverter.url=http://libreoffice:8090/
-Dimg.url=http://imagemagick:8090/
-Dtika.url=http://tika:8090/
-Dtransform.misc.url=http://transform-misc:8090/
-Dimap.server.port=1143
-Dftp.port=1221
-Dcors.enabled=true
-Dcors.allowed.origins=http://localhost:4200
"
ports:
- 8082:8080
- 8000:8000
- 143:1143
- 21:1221
- 30000-30099:30000-30099

postgres:
image: library/postgres:${POSTGRES_TAG}
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco

solr6:
image: alfresco/alfresco-search-services:${SOLR6_TAG}
environment:
#Solr needs to know how to register itself with Alfresco
- SOLR_ALFRESCO_HOST=alfresco
- SOLR_ALFRESCO_PORT=8080
#Alfresco needs to know how to call solr
- SOLR_SOLR_HOST=solr6
- SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
#HTTP by default
- ALFRESCO_SECURE_COMMS=none
ports:
- 8083:8983 #Browser port

activemq:
image: alfresco/alfresco-activemq:${ACTIVEMQ_TAG}
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP

alfresco-pdf-renderer:
image: alfresco/alfresco-pdf-renderer:${TRANSFORMERS_TAG}
environment:
JAVA_OPTS: " -Xms256m -Xmx256m"
ACTIVEMQ_URL: "nio://activemq:61616"
ACTIVEMQ_USER: "admin"
ACTIVEMQ_PASSWORD: "admin"
FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ports:
- 8090:8090

imagemagick:
image: alfresco/alfresco-imagemagick:${TRANSFORMERS_TAG}
environment:
JAVA_OPTS: " -Xms256m -Xmx256m"
ACTIVEMQ_URL: "nio://activemq:61616"
ACTIVEMQ_USER: "admin"
ACTIVEMQ_PASSWORD: "admin"
FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ports:
- 8091:8090

libreoffice:
image: alfresco/alfresco-libreoffice:${TRANSFORMERS_TAG}
environment:
JAVA_OPTS: " -Xms256m -Xmx256m"
ACTIVEMQ_URL: "nio://activemq:61616"
ACTIVEMQ_USER: "admin"
ACTIVEMQ_PASSWORD: "admin"
FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ports:
- 8092:8090

tika:
image: alfresco/alfresco-tika:${TRANSFORMERS_TAG}
environment:
JAVA_OPTS: " -Xms256m -Xmx256m"
ACTIVEMQ_URL: "nio://activemq:61616"
FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ACTIVEMQ_USER: "admin"
ACTIVEMQ_PASSWORD: "admin"
ports:
- 8093:8090

transform-misc:
image: alfresco/alfresco-transform-misc:${TRANSFORMERS_TAG}
environment:
JAVA_OPTS: " -Xms256m -Xmx256m"
ACTIVEMQ_URL: "nio://activemq:61616"
ACTIVEMQ_USER: "admin"
ACTIVEMQ_PASSWORD: "admin"
FILE_STORE_URL: "http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file"
ports:
- 8094:8090
77 changes: 77 additions & 0 deletions tests/environment/docker-compose-minimal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
version: "3"

# The acs-community-deployment project contains the product version of docker-compose.
#
# This version is for testing and development use. For testing and debug we need to have a more open version.
# For remote debug we need the CATALINA_OPTS and to expose port 8000.

services:
alfresco:
image: alfresco/alfresco-content-repository-community:latest
environment:
CATALINA_OPTS : "-agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n"
JAVA_OPTS :
"
-Ddb.driver=org.postgresql.Driver
-Ddb.username=alfresco
-Ddb.password=alfresco
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
-Dsolr.host=solr6
-Dsolr.port=8983
-Dsolr.secureComms=none
-Dsolr.base.url=/solr
-Dindex.subsystem.name=solr6
-Dalfresco.restApi.basicAuthScheme=true
-Dimap.server.enabled=true
-Dftp.enabled=true
-Dftp.dataPortFrom=30000
-Dftp.dataPortTo=30099
-Dshare.host=localhost
-Daos.baseUrlOverwrite=http://localhost:8082/alfresco/aos
-Dmessaging.broker.url=\"failover:(tcp://activemq:61616)?timeout=3000&jms.useCompression=true\"
-Dlocal.transform.service.enabled=false
-Dlegacy.transform.service.enabled=false
-Dimap.server.port=1143
-Dftp.port=1221
-Dcors.enabled=true
-Dcors.allowed.origins=http://localhost:4200
"
ports:
- 8082:8080
- 8000:8000
- 143:1143
- 21:1221
- 30000-30099:30000-30099

postgres:
image: library/postgres:${POSTGRES_TAG}
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco

solr6:
image: alfresco/alfresco-search-services:${SOLR6_TAG}
environment:
#Solr needs to know how to register itself with Alfresco
- SOLR_ALFRESCO_HOST=alfresco
- SOLR_ALFRESCO_PORT=8080
#Alfresco needs to know how to call solr
- SOLR_SOLR_HOST=solr6
- SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
#HTTP by default
- ALFRESCO_SECURE_COMMS=none
ports:
- 8083:8983 #Browser port

activemq:
image: alfresco/alfresco-activemq:${ACTIVEMQ_TAG}
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP
- 61616:61616 # OpenWire
- 61613:61613 # STOMP
Loading

0 comments on commit 8411ce5

Please sign in to comment.