mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge pull request #1413 from Alfresco/feature-3.5.0.x/APPS-894_build-updates
APPS-900 APPS-894 APPS-889 APPS-896 Pull latest CI configuration from *master*
This commit is contained in:
@@ -22,18 +22,8 @@
|
||||
<pluginRepository>
|
||||
<id>alfresco-internal</id>
|
||||
<name>Alfresco Internal Repository</name>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>alfresco-public</id>
|
||||
<name>Alfresco Public Repository</name>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>alfresco-private</id>
|
||||
<name>Alfresco Private Repository</name>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
@@ -55,7 +45,7 @@
|
||||
<password>${env.MAVEN_PASSWORD}</password>
|
||||
</server>
|
||||
<server>
|
||||
<id>alfresco-private</id>
|
||||
<id>alfresco-public</id>
|
||||
<username>${env.MAVEN_USERNAME}</username>
|
||||
<password>${env.MAVEN_PASSWORD}</password>
|
||||
</server>
|
||||
|
40
.travis.yml
40
.travis.yml
@@ -3,6 +3,7 @@ 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
|
||||
- source: travis/.travis.release-stage.yml
|
||||
- source: travis/.travis.publish-stage.yml
|
||||
dist: xenial
|
||||
@@ -28,7 +29,6 @@ cache:
|
||||
directories:
|
||||
- ${HOME}/.m2/repository
|
||||
|
||||
# the cache can grow constantly
|
||||
before_cache: rm -rf ${HOME}/.m2/repository/org/alfresco/alfresco-governance-services*
|
||||
|
||||
before_install:
|
||||
@@ -36,47 +36,15 @@ before_install:
|
||||
- find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
|
||||
- echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin
|
||||
- echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io
|
||||
|
||||
install: skip
|
||||
|
||||
stages:
|
||||
- name: Build AGS
|
||||
- name: Tests
|
||||
if: commit_message !~ /\[skip tests\]/
|
||||
- name: Security Scans
|
||||
- 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\]/
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- name: "Build AGS Community"
|
||||
stage: Build AGS
|
||||
before_script: source scripts/setUpMavenPhase.sh
|
||||
script:
|
||||
- travis_retry travis_wait 120 mvn -B -q clean ${MAVEN_PHASE} -P${BUILD_PROFILE} -Dimage.tag=${IMAGE_TAG} -Dskip.integrationtests=false -Dcommunity -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
|
||||
- name: "Build AGS Enterprise"
|
||||
stage: Build AGS
|
||||
install:
|
||||
- travis_retry travis_wait 30 mvn -B deploy -N
|
||||
- travis_retry travis_wait 60 mvn -B -q clean install $MVN_SKIP -f rm-community/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
before_script: source scripts/setUpMavenPhase.sh
|
||||
script:
|
||||
- travis_retry travis_wait 80 mvn -B -q ${MAVEN_PHASE} -P${BUILD_PROFILE} -Dimage.tag=${IMAGE_TAG} -Dskip.integrationtests=false -f rm-enterprise/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
|
||||
- name: "Build AGS Benchmark"
|
||||
stage: Build AGS
|
||||
install:
|
||||
- travis_retry travis_wait 80 mvn -B -q clean install $MVN_SKIP -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
before_script: source scripts/setUpMavenPhase.sh
|
||||
script:
|
||||
- travis_retry travis_wait 35 mvn -B -q ${MAVEN_PHASE} -Dskip.integrationtests=false -f rm-benchmark/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
|
||||
- name: "Source Clear Scan (SCA)"
|
||||
stage: Security Scans
|
||||
script: travis_wait 30 bash scripts/source_clear.sh
|
||||
- name: "Static Analysis (SAST)"
|
||||
stage: Security Scans
|
||||
script:
|
||||
- echo "Static Analysis (SAST)"
|
||||
|
143
pom.xml
143
pom.xml
@@ -34,42 +34,6 @@
|
||||
<maven>3.3.9</maven>
|
||||
</prerequisites>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>alfresco-internal</id>
|
||||
<name>Alfresco Internal Repository</name>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/internal/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>alfresco-public</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>alfresco-public-snapshots</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>alfresco-private</id>
|
||||
<name>Alfresco Internal Repository</name>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>alfresco-public</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>alfresco-plugin-public</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>alfresco-plugin-public-snapshots</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>alfresco-internal</id>
|
||||
@@ -98,22 +62,10 @@
|
||||
<module>rm-automation</module>
|
||||
<module>rm-benchmark</module>
|
||||
</modules>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>alfresco-internal</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>alfresco-private</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
<!-- Generate the Javadoc for Public API only (filtered on AlfrescoPublicApi annotation) -->
|
||||
<profile>
|
||||
<id>publicapi</id>
|
||||
<id>publicapi</id>
|
||||
<properties>
|
||||
<docflex.version>1.6.1</docflex.version>
|
||||
</properties>
|
||||
@@ -259,7 +211,6 @@
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${fabric8.docker.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
@@ -286,86 +237,6 @@
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- Profile used to build docker images with a specific tag and push them to the given image registry (quay.io)-->
|
||||
<profile>
|
||||
<id>internal</id>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${fabric8.docker.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-push-image</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<registry>${image.registry}</registry>
|
||||
<build>
|
||||
<dockerFileDir>${project.basedir}/</dockerFileDir>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- Profile used to build and push docker images with a specific tag to the given image registry (quay.io) and
|
||||
hub.docker -->
|
||||
<profile>
|
||||
<id>master</id>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${fabric8.docker.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-push-image</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<registry>${image.registry}</registry>
|
||||
<build>
|
||||
<dockerFileDir>${project.basedir}/</dockerFileDir>
|
||||
</build>
|
||||
</image>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<build>
|
||||
<dockerFileDir>${project.basedir}/</dockerFileDir>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
|
||||
<!-- Profile used to build and push docker images with project.version tag to hub.docker when the enterprise deploy goal encounters-->
|
||||
@@ -377,7 +248,6 @@
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${fabric8.docker.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-push-image</id>
|
||||
@@ -415,7 +285,6 @@
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${fabric8.docker.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-push-image</id>
|
||||
@@ -462,7 +331,6 @@
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${fabric8.docker.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>start</id>
|
||||
@@ -561,7 +429,7 @@
|
||||
|
||||
<jackson.version>2.12.1</jackson.version>
|
||||
<jackson-databind.version>2.12.1</jackson-databind.version>
|
||||
<fabric8.docker.version>0.31.0</fabric8.docker.version>
|
||||
<fabric8.docker.version>0.34.1</fabric8.docker.version>
|
||||
<mockito.version>1.10.19</mockito.version>
|
||||
<postgresql.version>42.2.16</postgresql.version>
|
||||
<postgresql.port>5432</postgresql.port>
|
||||
@@ -884,6 +752,7 @@
|
||||
<filtering>${app.filtering.enabled}</filtering>
|
||||
</testResource>
|
||||
</testResources>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -1201,6 +1070,12 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>${fabric8.docker.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
@@ -79,4 +79,47 @@
|
||||
<!-- The properties app.amp.* need to be set for share to work. -->
|
||||
<app.filtering.enabled>true</app.filtering.enabled>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>publish-docker-latest</id>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-push-image</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<goal>push</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<images>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<registry>${image.registry}</registry>
|
||||
<build>
|
||||
<dockerFileDir>${project.basedir}/</dockerFileDir>
|
||||
</build>
|
||||
</image>
|
||||
<image>
|
||||
<name>${image.name}:${image.tag}</name>
|
||||
<build>
|
||||
<dockerFileDir>${project.basedir}/</dockerFileDir>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
@@ -639,18 +639,7 @@
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>internal</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>master</id>
|
||||
<id>publish-docker-latest</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Use full history for release
|
||||
git checkout -B "${TRAVIS_BRANCH}"
|
||||
|
||||
git config user.email "build@alfresco.com"
|
||||
|
||||
release_type=$1
|
||||
echo Release type: "$release_type"
|
||||
|
||||
if [ -z $release_type ]; then
|
||||
echo "Please provide a release type."
|
||||
exit 1
|
||||
elif [ $release_type != "community" -a $release_type != "enterprise" ]; then
|
||||
echo "The provided release type is not valid."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z ${RELEASE_VERSION} ] || [ -z ${DEVELOPMENT_VERSION} ]; then
|
||||
echo "Please provide a Release and Development verison"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if it's a hotfix version by counting the number of dots in the version number.
|
||||
if [ $(echo "${RELEASE_VERSION}" | grep -o "\." | wc -l) == 3 ] && [ ${release_type} == "enterprise" ];
|
||||
then
|
||||
deployment_repository="hotfix-release"
|
||||
else
|
||||
deployment_repository="${release_type}-release"
|
||||
fi
|
||||
|
||||
mvn --batch-mode \
|
||||
-Dusername="${GIT_USERNAME}" \
|
||||
-Dpassword="${GIT_PASSWORD}" \
|
||||
-DreleaseVersion=${RELEASE_VERSION} \
|
||||
-DdevelopmentVersion=${DEVELOPMENT_VERSION} \
|
||||
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
|
||||
-DuseReleaseProfile=false \
|
||||
"-Darguments=-DskipTests -D${release_type} -P${deployment_repository},release-${release_type}" \
|
||||
release:clean release:prepare release:perform
|
@@ -1,23 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "Branch name: ${TRAVIS_BRANCH}"
|
||||
echo "Pull request: ${TRAVIS_PULL_REQUEST}"
|
||||
echo "Travis job name: ${TRAVIS_JOB_NAME}"
|
||||
echo "Image tag: ${TRAVIS_BRANCH:8}"
|
||||
|
||||
if [[ ${TRAVIS_JOB_NAME} == "Build AGS Enterprise" ]] ; then
|
||||
export BUILD_PROFILE="internal"
|
||||
else
|
||||
export BUILD_PROFILE="master"
|
||||
fi
|
||||
|
||||
if [[ "${TRAVIS_BRANCH}" == "master" && "${TRAVIS_PULL_REQUEST}" == "false" ]] ; then
|
||||
export MAVEN_PHASE="deploy"
|
||||
export IMAGE_TAG="latest"
|
||||
elif [[ ${TRAVIS_BRANCH} = release* && "${TRAVIS_PULL_REQUEST}" == "false" ]] ; then
|
||||
export MAVEN_PHASE="deploy"
|
||||
export IMAGE_TAG="${TRAVIS_BRANCH:8}-latest"
|
||||
else
|
||||
export MAVEN_PHASE="verify"
|
||||
export BUILD_PROFILE="buildDockerImage"
|
||||
export IMAGE_TAG="latest"
|
||||
fi
|
8
travis/.travis.deploy-stage.yml
Normal file
8
travis/.travis.deploy-stage.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
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,12 +1,5 @@
|
||||
env:
|
||||
global:
|
||||
- AUTOMATION_COMMUNITY_PATH=rm-automation/rm-automation-community-rest-api
|
||||
- AUTOMATION_ENTERPRISE_PATH=rm-automation/rm-automation-enterprise-rest-api
|
||||
- AUTOMATION_UI_PATH=rm-automation/rm-automation-ui
|
||||
- COMMUNITY_REPO_PATH=rm-community/rm-community-repo
|
||||
- COMMUNITY_SHARE_PATH=rm-community/rm-community-share
|
||||
- ENTERPRISE_REPO_PATH=rm-enterprise/rm-enterprise-repo
|
||||
- ENTERPRISE_SHARE_PATH=rm-enterprise/rm-enterprise-share
|
||||
- MVN_SKIP='-Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests'
|
||||
- AWS_ACCESS_KEY_ID=${CREATE_BUCKET_AWS_ACCESS_KEY}
|
||||
- AWS_SECRET_ACCESS_KEY=${CREATE_BUCKET_AWS_SECRET_KEY}
|
||||
@@ -17,3 +10,4 @@ env:
|
||||
- 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"
|
||||
|
@@ -6,17 +6,14 @@ jobs:
|
||||
include:
|
||||
- &integration_test_on_MYSQL
|
||||
name: "Community Integrations Tests on MySQL"
|
||||
services: docker
|
||||
stage: Tests
|
||||
if: branch =~ /(release\/.*$|master)/ OR commit_message =~ /\[execute tests on MySQL\]/
|
||||
install:
|
||||
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 install -Puse-mysql -DskipTests -Dskip.integrationtests=false -Dmy.db.name=alfresco -Dmy.db.port=3307 -Dcommunity -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
script: travis_retry travis_wait 80 mvn -B -q clean verify ${MVN_SKIP} -Puse-mysql -Dskip.integrationtests=false -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"
|
||||
install:
|
||||
- travis_retry travis_wait 60 mvn -B -q clean install ${MVN_SKIP} -f rm-community/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -am
|
||||
script: travis_retry travis_wait 80 mvn -B -q clean install ${MVN_SKIP} -Puse-mysql -Dskip.integrationtests=false -Dmy.db.name=alfresco -Dmy.db.port=3307 -f rm-enterprise/pom.xml -amd -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
install: travis_retry travis_wait 60 mvn -B -V -q clean install ${MVN_SKIP}
|
||||
script: travis_retry travis_wait 80 mvn -B -q clean verify ${MVN_SKIP} -Puse-mysql -Dskip.integrationtests=false -Dmy.db.name=alfresco -Dmy.db.port=3307 -f rm-enterprise/pom.xml -amd ${LOG_WARN}
|
||||
|
@@ -3,9 +3,9 @@ jobs:
|
||||
- name: "Community Publish to S3 Release Bucket"
|
||||
stage: Publish
|
||||
if: commit_message =~ /\[community release .*\]/ AND commit_message =~ /\[publish\]/
|
||||
before_script: source scripts/set-release-variables.sh
|
||||
before_script: source travis/scripts/set-release-variables.sh
|
||||
script: skip
|
||||
before_deploy: bash scripts/zip-artifacts-release.sh "community"
|
||||
before_deploy: bash travis/scripts/zip-artifacts-release.sh "community"
|
||||
deploy:
|
||||
- provider: s3
|
||||
access_key_id: ${RELEASE_AWS_ACCESS_KEY}
|
||||
@@ -24,9 +24,9 @@ jobs:
|
||||
- name: "Enterprise Publish to S3 Release Bucket"
|
||||
stage: Publish
|
||||
if: commit_message =~ /\[enterprise release .*\]/ AND commit_message =~ /\[publish\]/
|
||||
before_script: source scripts/set-release-variables.sh
|
||||
before_script: source travis/scripts/set-release-variables.sh
|
||||
script: skip
|
||||
before_deploy: bash scripts/zip-artifacts-release.sh "enterprise"
|
||||
before_deploy: bash travis/scripts/zip-artifacts-release.sh "enterprise"
|
||||
deploy:
|
||||
- provider: s3
|
||||
access_key_id: ${RELEASE_AWS_ACCESS_KEY}
|
||||
|
@@ -4,13 +4,13 @@ jobs:
|
||||
stage: Release
|
||||
if: commit_message =~ /\[community release .*\]/
|
||||
before_script:
|
||||
- source scripts/set-release-variables.sh
|
||||
- bash scripts/check-existing-tags.sh "alfresco/alfresco-governance-share-community"
|
||||
- source travis/scripts/set-release-variables.sh
|
||||
- bash travis/scripts/check-existing-tags.sh "alfresco/alfresco-governance-share-community"
|
||||
script:
|
||||
- bash scripts/release.sh "community"
|
||||
- bash travis/scripts/community_release.sh
|
||||
before_deploy:
|
||||
- bash scripts/zip-artifacts-staging.sh "community"
|
||||
- bash scripts/pushDockerDigestTag.sh -i quay.io/alfresco/alfresco-governance-repository-community -i quay.io/alfresco/alfresco-governance-share-community -r quay.io -t ${RELEASE_VERSION}
|
||||
- bash travis/scripts/zip-artifacts-staging.sh "community"
|
||||
- bash travis/scripts/pushDockerDigestTag.sh -i quay.io/alfresco/alfresco-governance-repository-community -i quay.io/alfresco/alfresco-governance-share-community -r quay.io -t ${RELEASE_VERSION}
|
||||
deploy:
|
||||
- provider: s3
|
||||
access_key_id: ${STAGING_AWS_ACCESS_KEY}
|
||||
@@ -30,12 +30,12 @@ jobs:
|
||||
stage: Release
|
||||
if: commit_message =~ /\[enterprise release .*\]/
|
||||
before_script:
|
||||
- source scripts/set-release-variables.sh
|
||||
- source travis/scripts/set-release-variables.sh
|
||||
script:
|
||||
- bash scripts/release.sh "enterprise"
|
||||
- bash travis/scripts/enterprise_release.sh
|
||||
before_deploy:
|
||||
- bash scripts/zip-artifacts-staging.sh "enterprise"
|
||||
- bash scripts/pushDockerDigestTag.sh -i quay.io/alfresco/alfresco-governance-repository-enterprise -i quay.io/alfresco/alfresco-governance-share-enterprise -r quay.io -t ${RELEASE_VERSION}
|
||||
- bash travis/scripts/zip-artifacts-staging.sh "enterprise"
|
||||
- bash travis/scripts/pushDockerDigestTag.sh -i quay.io/alfresco/alfresco-governance-repository-enterprise -i quay.io/alfresco/alfresco-governance-share-enterprise -r quay.io -t ${RELEASE_VERSION}
|
||||
deploy:
|
||||
- provider: s3
|
||||
access_key_id: ${STAGING_AWS_ACCESS_KEY}
|
||||
|
@@ -1,5 +1,15 @@
|
||||
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 -Dskip.integrationtests=false ${LOG_WARN}
|
||||
|
||||
- name: "Community Rest API Tests"
|
||||
stage: Tests
|
||||
addons:
|
||||
@@ -8,28 +18,29 @@ jobs:
|
||||
- ./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: ${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NUMBER}
|
||||
install:
|
||||
- |
|
||||
if [[ ${TRAVIS_BRANCH} == *community* ]]; then
|
||||
travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-community-repo -am
|
||||
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
|
||||
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_BRANCH} == *community* ]]; then
|
||||
bash scripts/startAlfresco.sh $COMMUNITY_REPO_PATH false
|
||||
if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then
|
||||
bash travis/scripts/startAlfresco.sh rm-community/rm-community-repo false
|
||||
else
|
||||
bash scripts/startAlfresco.sh $ENTERPRISE_REPO_PATH false
|
||||
bash travis/scripts/startAlfresco.sh rm-enterprise/rm-enterprise-repo false
|
||||
fi
|
||||
- bash scripts/waitForAlfrescoToStart.sh
|
||||
- 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 scripts/getLogs.sh
|
||||
after_script: bash travis/scripts/getLogs.sh
|
||||
|
||||
- name: "Enterprise Rest API Tests"
|
||||
stage: Tests
|
||||
if: commit_message !~ /\[tests on community\]/
|
||||
addons:
|
||||
artifacts:
|
||||
paths:
|
||||
@@ -38,19 +49,20 @@ jobs:
|
||||
- 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 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 $ENTERPRISE_REPO_PATH false
|
||||
- bash scripts/waitForAlfrescoToStart.sh
|
||||
- bash scripts/dockerLimitMemory.sh
|
||||
- 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 scripts/getLogs.sh
|
||||
after_script: bash travis/scripts/getLogs.sh
|
||||
|
||||
- name: "Enterprise Rest API WORM Tests"
|
||||
stage: Tests
|
||||
if: commit_message !~ /\[tests on community\]/
|
||||
addons:
|
||||
artifacts:
|
||||
paths:
|
||||
@@ -62,16 +74,17 @@ jobs:
|
||||
- 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 "${ENTERPRISE_SHARE_PATH}/docker-compose-worm-support-rest.yml"
|
||||
- bash scripts/waitForAlfrescoToStart.sh
|
||||
- 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 scripts/getLogs.sh
|
||||
- bash scripts/cleanup.sh
|
||||
- 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:
|
||||
@@ -82,8 +95,8 @@ jobs:
|
||||
- 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 "${ENTERPRISE_REPO_PATH}/docker-compose-cluster.yml"
|
||||
- bash scripts/waitForAlfrescoToStart.sh
|
||||
- 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
|
||||
@@ -106,20 +119,20 @@ jobs:
|
||||
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 $COMMUNITY_SHARE_PATH false
|
||||
bash scripts/waitForAlfrescoToStart.sh
|
||||
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 scripts/startAlfresco.sh $ENTERPRISE_SHARE_PATH true
|
||||
bash scripts/waitForAlfrescoToStart.sh
|
||||
bash scripts/dockerLimitMemory.sh
|
||||
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 scripts/getLogs.sh
|
||||
after_script: bash travis/scripts/getLogs.sh
|
||||
|
||||
- <<: *community_shared_UI_configuration
|
||||
name: "Community Smoke UI Tests for actions in RM site"
|
||||
@@ -152,15 +165,15 @@ jobs:
|
||||
- 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 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 $ENTERPRISE_SHARE_PATH true
|
||||
- bash scripts/waitForAlfrescoToStart.sh
|
||||
- bash scripts/dockerLimitMemory.sh
|
||||
- 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 scripts/getLogs.sh
|
||||
after_script: bash travis/scripts/getLogs.sh
|
||||
|
||||
- <<: *enterprise_shared_UI_configuration
|
||||
name: "Enterprise Classification Level 2 UI Tests"
|
||||
@@ -198,11 +211,11 @@ jobs:
|
||||
- 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 "${ENTERPRISE_SHARE_PATH}/docker-compose-worm-support-ui.yml"
|
||||
- bash scripts/waitForAlfrescoToStart.sh
|
||||
- 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 scripts/getLogs.sh
|
||||
- bash scripts/cleanup.sh
|
||||
- bash travis/scripts/getLogs.sh
|
||||
- bash travis/scripts/cleanup.sh
|
||||
|
0
scripts/cleanImages.sh → travis/scripts/cleanImages.sh
Executable file → Normal file
0
scripts/cleanImages.sh → travis/scripts/cleanImages.sh
Executable file → Normal file
22
travis/scripts/community_release.sh
Normal file
22
travis/scripts/community_release.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Use full history for release
|
||||
git checkout -B "${TRAVIS_BRANCH}"
|
||||
|
||||
git config user.email "${GIT_EMAIL}"
|
||||
|
||||
if [ -z ${RELEASE_VERSION} ] || [ -z ${DEVELOPMENT_VERSION} ]; then
|
||||
echo "Please provide a Release and Development version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mvn -B \
|
||||
-Dusername="${GIT_USERNAME}" \
|
||||
-Dpassword="${GIT_PASSWORD}" \
|
||||
-DreleaseVersion=${RELEASE_VERSION} \
|
||||
-DdevelopmentVersion=${DEVELOPMENT_VERSION} \
|
||||
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
|
||||
-DuseReleaseProfile=false \
|
||||
"-Darguments=-DskipTests -P\!enterprise -Prelease-community,community-release" \
|
||||
release:clean release:prepare release:perform
|
0
scripts/pushDockerDigestTag.sh → travis/scripts/pushDockerDigestTag.sh
Executable file → Normal file
0
scripts/pushDockerDigestTag.sh → travis/scripts/pushDockerDigestTag.sh
Executable file → Normal file
0
scripts/set-release-variables.sh → travis/scripts/set-release-variables.sh
Executable file → Normal file
0
scripts/set-release-variables.sh → travis/scripts/set-release-variables.sh
Executable file → Normal file
0
scripts/start-compose.sh → travis/scripts/start-compose.sh
Executable file → Normal file
0
scripts/start-compose.sh → travis/scripts/start-compose.sh
Executable file → Normal file
0
scripts/waitForAlfrescoToStart.sh → travis/scripts/waitForAlfrescoToStart.sh
Executable file → Normal file
0
scripts/waitForAlfrescoToStart.sh → travis/scripts/waitForAlfrescoToStart.sh
Executable file → Normal file
0
scripts/zip-artifacts-staging.sh → travis/scripts/zip-artifacts-staging.sh
Executable file → Normal file
0
scripts/zip-artifacts-staging.sh → travis/scripts/zip-artifacts-staging.sh
Executable file → Normal file
Reference in New Issue
Block a user