ACS-457: Build linkage, tagging and release (#4)

* ACS-457: Build linkage, tagging and release

- update .travis.settings.xml

* ACS-457: Build linkage, tagging and release

- add cleanup_cache.sh script

* ACS-457: Build linkage, tagging and release

- add init.sh script for before_install job phases

* ACS-457: Build linkage, tagging and release

- add build.sh script for install job phases

* ACS-457: Build linkage, tagging and release

- minor updates on the older travis and veracode scripts

* ACS-457: Build linkage, tagging and release

- reorganized and updated .travis.yml

* ACS-457: Build linkage, tagging and release

- add remote branch validation in the trigger_travis.sh script

* ACS-457: Build linkage, tagging and release

- update and propagate branch version numbers during the build

* ACS-457: Build linkage, tagging and release

- enable docker image squash for all image builds

* ACS-457: Build linkage, tagging and release

- shellcheck CI scripts

* ACS-457: Build linkage, tagging and release

- switch to TEST pom versions

* ACS-457: Build linkage, tagging and release

- post-merge fixes

* ACS-457: Build linkage, tagging and release

- update trigger_travis.sh scrips so they offer more debug info

* ACS-457: Build linkage, tagging and release

- clone upstream repositories with "--depth=1" (no history needed)
- add "-Dmaven.javadoc.skip=true" options in the build scripts

* ACS-457: Build linkage, tagging and release

- remove <scm> configuration from sub-modules
- remove <distributionManagement> configurations from submodules
- remove <repository> configuration from poms
- remove unnecessary and unused POM profiles

* ACS-457: Build linkage, tagging and release

- add pom <pluginManagement> section
- removed some plugin versions from downstream modules
- add a single common configuration for the *maven-relese-plugin*

* ACS-457: Build linkage, tagging and release

- post-merge fixes

* ACS-457: Build linkage, tagging and release

- update and reorganize the fabric8-maven-plugin configuration

* ACS-457: Build linkage, tagging and release

- extra debug info on the trigger_travis.sh scripts

* ACS-457: Build linkage, tagging and release

- modify the build.sh scripts so they checkout the upstream project tag

* ACS-457: Build linkage, tagging and release

- test different token variable for propagating builds

* ACS-457: Build linkage, tagging and release

- re-implement build.sh script logic to support PRs & branch builds
- restricted the build.sh script capabilities
- moved build functions to a separate .sh file

* ACS-457: Build linkage, tagging and release

- update release scripts

* ACS-457: Build linkage, tagging and release

- debug build scripts

* ACS-457: Build linkage, tagging and release

- fix build scripts

* ACS-457: Build linkage, tagging and release

- setup/update the S3 publishing jobs

* ACS-457: Build linkage, tagging and release

- update build scripts
- remove a few unnecessary TODOs

* ACS-457: Build linkage, tagging and release

- disable release jobs for now
This commit is contained in:
CezarLeahu
2020-08-12 00:24:51 +03:00
committed by GitHub
parent a660ce23ee
commit 3a0725ee77
27 changed files with 3818 additions and 3810 deletions

View File

@@ -25,10 +25,13 @@
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
<properties>
<!-- WhiteSource token -->
<org.whitesource.orgToken>${env.WHITESOURCE_API_KEY}</org.whitesource.orgToken>
</properties>
</profile>
</profiles>
<servers>
<server>
<id>alfresco-public</id>

View File

@@ -1,30 +1,27 @@
---
dist: xenial
os: linux
language: java
jdk:
- openjdk11
jdk: openjdk11
services:
- docker
git:
depth: false
quiet: true
cache:
directories:
- $HOME/.m2
- ${HOME}/.m2/repository
before_cache:
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-community-repo
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-core
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-data-model
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-repository
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-remote-api
- rm -rf $HOME/.m2/repository/org/alfresco/content-services-community
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-community-repo-*
- rm -rf $HOME/.m2/repository/org/alfresco/tas/alfresco-community-repo-*-test
# the cache can grow constantly
before_cache: bash scripts/travis/cleanup_cache.sh
branches:
only:
- master
- /release\/.*/
- feature/ACS-457_travis-release-config
env:
global:
@@ -34,235 +31,227 @@ env:
stages:
- name: test
if: commit_message !~ /\[skip tests\]/
- release
- publish
- trigger_downstream
- name: release
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no-release\]/
- name: trigger_downstream
if: fork = false AND type != pull_request AND commit_message !~ /\[no-downstream\]/
before_install:
- "cp .travis.settings.xml $HOME/.m2/settings.xml"
- travis_retry mvn install -DskipTests=true -Dversion.edition=Community -PcommunityDocker -B -V
before_install: travis_retry bash scripts/travis/init.sh
install: travis_retry bash scripts/travis/build.sh
jobs:
include:
- stage: test
name: "WhiteSource scan"
- name: "WhiteSource scan"
stage: test
# only on release branches or master and if it is not a PR
if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request
script:
# Download the latest version of WhiteSource Unified Agent
- curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
# Run WhiteSource Unified Agent
- java -jar wss-unified-agent.jar -apiKey ${WHITESOURCE_API_KEY} -c .wss-unified-agent.config
- java -jar wss-unified-agent.jar -apiKey ${WHITESOURCE_API_KEY} -c .wss-unified-agent.config -d ./packaging/war
# - name: "Source Clear Scan"
# # only on SP branches or master and if it is not a PR
# if: fork = false AND (branch = master OR branch =~ /release\/SP\/.*/) AND type != pull_request
# # only on release branches or master and if it is not a PR
# if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request
# script: skip
# addons:
# srcclr: true
- name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
script:
- travis_retry mvn test -pl core,data-model
- mvn test -B -pl repository -Dtest=AllUnitTestsSuite
- travis_retry mvn -B test -pl core,data-model
- travis_retry mvn -B test -pl repository -Dtest=AllUnitTestsSuite
- name: "Repository - AppContext01TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl repository -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext02TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl repository -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext03TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.4
script: travis_wait 20 mvn test -B -pl repository -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
- name: "Repository - AppContext04TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.4
script: travis_wait 20 mvn test -B -pl repository -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - AppContext05TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
- "mkdir -p $HOME/tmp"
- "cp repository/src/test/resources/realms/alfresco-realm.json $HOME/tmp"
- docker login quay.io -u ${QUAY_USERNAME} -p ${QUAY_PASSWORD}
- "export HOST_IP=$(ip address show | grep -E \"([0-9]{1,3}\\.){3}[0-9]{1,3}\" | grep -v 127.0.0.1 | awk '{ print $2 }' | head -n 1 )"
- "export HOST_IP=$(echo ${HOST_IP%/*})"
- mkdir -p "${HOME}/tmp"
- cp repository/src/test/resources/realms/alfresco-realm.json "${HOME}/tmp"
- export HOST_IP=$(hostname -I | cut -f1 -d' ')
- docker run -d -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e DB_VENDOR=h2 -p 8999:8080 -e KEYCLOAK_IMPORT=/tmp/alfresco-realm.json -v $HOME/tmp/alfresco-realm.json:/tmp/alfresco-realm.json quay.io/alfresco/alfresco-identity-service:1.2
script: travis_wait 20 mvn test -B -pl repository -Dtest=AppContext05TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth"
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext05TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco "-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth"
- name: "Repository - AppContext06TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.4
script: travis_wait 20 mvn test -B -pl repository -Dtest=AppContext06TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext06TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
- name: "Repository - AppContextExtraTestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl repository -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - MiscContextTestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.3.4
script: travis_wait 20 mvn test -B -pl repository -Dtest=MiscContextTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
script: travis_wait 20 mvn -B test -pl repository -Dtest=MiscContextTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
- name: "Repository - MySQL tests"
if: commit_message !~ /\[skip db\]/
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 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 10 tests"
if: commit_message !~ /\[skip db\]/
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:10.9 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - PostgreSQL 11 tests"
if: commit_message !~ /\[skip db\]/
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Repository - MariaDB tests"
if: commit_message !~ /\[skip db\]/
install:
before_script:
- docker run -d -p 3307:3306 --name mariadb -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mariadb:10.2.18 --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
script: travis_wait 20 mvn -B test -pl repository -Dtest=AllDBTestsTestSuite -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Remote-api - AppContext01TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl remote-api -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext02TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl remote-api -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext03TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl remote-api -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContext04TestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl remote-api -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Remote-api - AppContextExtraTestSuite"
install:
before_script:
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.7 postgres -c 'max_connections=300'
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
script: travis_wait 20 mvn test -B -pl remote-api -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "REST API TAS tests part1"
jdk: openjdk11
if: commit_message =~ /\[tas\]/
install:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 60 mvn install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
- travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
- name: "REST API TAS tests part2"
jdk: openjdk11
if: commit_message =~ /\[tas\]/
install:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 60 mvn install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part2 -Denvironment=default -DrunBugs=false
- travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part2 -Denvironment=default -DrunBugs=false
- name: "REST API TAS tests part3"
jdk: openjdk11
if: commit_message =~ /\[tas\]/
install:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 60 mvn install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
- travis_wait 60 mvn -B install -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
- name: "CMIS TAS tests"
jdk: openjdk11
if: commit_message =~ /\[tas\]/
install:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal+transforms.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 40 mvn install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- travis_wait 40 mvn -B install -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "Email TAS tests"
jdk: openjdk11
if: commit_message =~ /\[tas\]/
install:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 30 mvn install -f packaging/tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- travis_wait 30 mvn -B install -f packaging/tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "WebDAV TAS tests"
jdk: openjdk11
if: commit_message =~ /\[tas\]/
install:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 30 mvn install -f packaging/tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- travis_wait 30 mvn -B install -f packaging/tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- name: "Integration TAS tests"
jdk: openjdk11
if: commit_message =~ /\[tas\]/
install:
before_script:
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- travis_wait 30 mvn install -f packaging/tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- travis_wait 30 mvn -B install -f packaging/tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
# Comment out for now to avoid pushing 8.300 to nuxus until we are ready
# - stage: release
# name: "Push to Nexus"
# if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message !~ /\[no-release\]/
# before_install:
# - "cp .travis.settings.xml $HOME/.m2/settings.xml"
# script:
# # Use full history for release
# - git checkout -B "${TRAVIS_BRANCH}"
# # Add email to link commits to user
# - git config user.email "${GIT_EMAIL}"
# # Skip building of release commits
# - mvn --batch-mode -q -DscmCommentPrefix="[maven-release-plugin][skip ci] " -Dusername="${GIT_USERNAME}" -Dpassword="${GIT_PASSWORD}" -DskipTests -Darguments=-DskipTests release:clean release:prepare release:perform
# TODO enable job
- name: "Push to Nexus"
stage: release
if: false
install: travis_retry travis_wait 30 mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true -Pinternal
before_script: bash scripts/travis/verify_release_tag.sh
script: travis_wait 40 bash scripts/travis/maven_release.sh
# - name: "Trigger alfresco-enterprise-repo build"
# stage: trigger_downstream
# # for all active branches and if it is not a PR
# if: fork = false AND type != pull_request AND commit_message !~ /\[no-downstream\]/
# install: skip
# script: bash trigger-travis.sh "Alfresco" "alfresco-enterprise-repo-play1" "${TRAVIS_BRANCH}"
- name: "Trigger alfresco-enterprise-repo build"
stage: trigger_downstream
before_install: skip
install: skip
script: bash scripts/travis/trigger_travis.sh "Alfresco" "alfresco-enterprise-repo" "${TRAVIS_BRANCH}"
# TODO enable or delete job
- name: "Trigger acs-community-packaging build"
stage: trigger_downstream
if: false
before_install: skip
install: skip
script: bash scripts/travis/trigger_travis.sh "Alfresco" "acs-community-packaging" "${TRAVIS_BRANCH}"

View File

@@ -7,23 +7,9 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<scm>
<connection>scm:git:https://github.com/Alfresco/alfresco-core.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-core.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-core</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>commons-codec</groupId>
@@ -147,22 +133,9 @@
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${dependency.maven-jar-plugin.version}</version>
<executions>
<execution>
<goals>

View File

@@ -7,23 +7,9 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<scm>
<connection>scm:git:https://github.com/Alfresco/alfresco-data-model.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-data-model.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-data-model</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
</repository>
</distributionManagement>
<properties>
<dependency.tika.version>1.24.1</dependency.tika.version>
<!-- Files to exclude from SonarQube analysis -->
@@ -79,7 +65,6 @@
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${dependency.maven-jar-plugin.version}</version>
<executions>
<execution>
<goals>
@@ -124,13 +109,6 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

View File

@@ -7,12 +7,11 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<properties>
<image.name>alfresco/alfresco-community-repo-base</image.name>
<image.registry>quay.io</image.registry>
</properties>
<build>
@@ -20,7 +19,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-licenses</id>
@@ -44,7 +42,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>unpack-war-files</id>
@@ -131,34 +128,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<images>
<image>
<name>${image.name}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>communityDocker</id>
<!-- builds "image:latest" locally -->
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<images>
<image>
<name>${image.name}:${image.tag}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
<buildOptions>
<squash>true</squash>
</buildOptions>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-image</id>
@@ -175,59 +169,33 @@
<profile>
<id>internal</id>
<!-- publishes "image:latest" on Quay & DockerHub -->
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<images>
<!-- Quay image -->
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
<buildOptions>
<squash>true</squash>
</buildOptions>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>master</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<images>
<!-- DockerHub image -->
<image>
<name>${image.name}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<image>
<name>${image.name}</name>
<name>${image.name}:${image.tag}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
<buildOptions>
<squash>true</squash>
</buildOptions>
</build>
</image>
</images>
@@ -249,27 +217,33 @@
<profile>
<id>release</id>
<!-- publishes "image:release_version" on Quay & DockerHub -->
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<configuration combine.self="override">
<images>
<!-- Quay image -->
<image>
<alias>quay.io</alias>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
<buildOptions>
<squash>true</squash>
</buildOptions>
</build>
</image>
<!-- DockerHub image -->
<image>
<alias>dockerhub</alias>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
<buildOptions>
<squash>true</squash>
</buildOptions>
</build>
</image>
</images>

View File

@@ -7,31 +7,12 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<scm>
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo-packaging.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo-packaging.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-community-repo-packaging</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>alfresco-internal</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>alfresco-internal-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<properties>
<!-- Set to "Community Early Access" to add to the version.edition property in version.properties -->
<version.edition>Community</version.edition>
<image.tag>latest</image.tag>
<image.registry>quay.io</image.registry>
<installer.version.name>${project.version}</installer.version.name>
<alfresco.package.name>alfresco-community</alfresco.package.name>
@@ -39,6 +20,16 @@
</properties>
<profiles>
<profile>
<id>fullBuild</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>war</module>
<module>docker-alfresco</module>
</modules>
</profile>
<profile>
<id>community</id>
<modules>
@@ -52,16 +43,6 @@
<module>docker-alfresco</module>
</modules>
</profile>
<profile>
<id>fullBuild</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>war</module>
<module>docker-alfresco</module>
</modules>
</profile>
<profile>
<id>all-tas-tests</id>
<modules>

View File

@@ -1,17 +0,0 @@
#!/usr/bin/env bash
set -ev
if [ -z ${COMM_RELEASE_VERSION} ] || [ -z ${RELEASE_VERSION} ];
then
echo "Please provide a COMM_RELEASE_VERSION and RELEASE_VERSION in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
exit -1
fi
build_number=$1
branch_name=$2
build_stage=release
SOURCE=s3://alfresco-artefacts-staging/alfresco-content-services-community/$build_stage/$branch_name/$build_number
DESTINATION=s3://eu.dl.alfresco.com/release/community/$COMM_RELEASE_VERSION-build-$build_number
aws s3 cp --acl private $SOURCE/alfresco.war $DESTINATION/alfresco.war
aws s3 cp --acl private $SOURCE/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip $DESTINATION/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
set -e
releaseVersion=$1
developmentVersion=$2
scm_path=$(mvn help:evaluate -Dexpression=project.scm.url -q -DforceStdout)
# Use full history for release
git checkout -B "${TRAVIS_BRANCH}"
# Add email to link commits to user
git config user.email "${GIT_EMAIL}"
if [ -z ${releaseVersion} ] || [ -z ${developmentVersion} ];
then echo "Please provide a Release and Development verison in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
exit -1
else
mvn --batch-mode \
-PfullBuild,all-tas-tests \
-Dusername="${GIT_USERNAME}" \
-Dpassword="${GIT_PASSWORD}" \
-DreleaseVersion=${releaseVersion} \
-DdevelopmentVersion=${developmentVersion} \
-Dbuild-number=${TRAVIS_BUILD_NUMBER} \
-Dbuild-name="${TRAVIS_BUILD_STAGE_NAME}" \
-Dscm-path=${scm_path} \
-DscmCommentPrefix="[maven-release-plugin][skip ci]" \
-DskipTests \
"-Darguments=-DskipTests -Dbuild-number=${TRAVIS_BUILD_NUMBER} '-Dbuild-name=${TRAVIS_BUILD_STAGE_NAME}' -Dscm-path=${scm_path} -PfullBuild,all-tas-tests" \
release:clean release:prepare release:perform \
-Prelease
fi

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
set -e
if [ -v ${RELEASE_VERSION} ]||[ -z ${RELEASE_VERSION} ]; then
echo "Please provide a RELEASE_VERSION in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
exit -1
fi
# get the image name from the pom file
alfresco_docker_image=$(mvn help:evaluate -f ./docker-alfresco/pom.xml -Dexpression=image.name -q -DforceStdout)
docker_image_full_name="$alfresco_docker_image:$RELEASE_VERSION"
function docker_image_exists() {
local image_full_name="$1"; shift
local wait_time="${1:-5}"
local search_term='Pulling|is up to date|not found'
echo "Looking to see if $image_full_name already exists..."
local result="$((timeout --preserve-status "$wait_time" docker 2>&1 pull "$image_full_name" &) | grep -v 'Pulling repository' | egrep -o "$search_term")"
test "$result" || { echo "Timed out too soon. Try using a wait_time greater than $wait_time..."; return 1 ;}
if echo $result | grep -vq 'not found'; then
true
else
false
fi
}
if docker_image_exists $docker_image_full_name; then
echo "Tag $RELEASE_VERSION already pushed, release process will interrupt."
exit -1
else
echo "The $RELEASE_VERSION tag was not found"
fi

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<modules>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<developers>

View File

@@ -7,12 +7,12 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<properties>
<scm-path>local/development/workspace</scm-path>
<scm-revision>${buildNumber}</scm-revision>
<scm-path>${project.parent.parent.scm.url}</scm-path>
<scm-revision>${build-number}</scm-revision>
<licenseName>community</licenseName>
</properties>
@@ -144,23 +144,6 @@
</resource>
</resources>
<plugins>
<!-- Creates a scm revision and stores in ${buildNumber} variable -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<shortRevisionLength>8</shortRevisionLength>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
@@ -242,16 +225,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${dependency.maven-jar-plugin.version}</version>
<configuration>
<source>${maven.build.sourceVersion}</source>
</configuration>
</plugin>
<!-- Ensure consistent maven-release-plugin version-->
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>

113
pom.xml
View File

@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -24,6 +23,9 @@
<properties>
<dependency.alfresco-community-repo.version>${project.version}</dependency.alfresco-community-repo.version>
<!-- Set to "Community Early Access" to add to the version.edition property in version.properties -->
<version.edition>Community</version.edition>
<acs.version.major>7</acs.version.major>
<acs.version.minor>0</acs.version.minor>
<acs.version.revision>0</acs.version.revision>
@@ -48,7 +50,6 @@
<dependency.spring.version>5.2.8.RELEASE</dependency.spring.version>
<dependency.antlr.version>3.5.2</dependency.antlr.version>
<dependency.fabric8.version>4.4.0</dependency.fabric8.version>
<dependency.jackson.version>2.11.2</dependency.jackson.version>
<dependency.jackson-databind.version>2.10.1</dependency.jackson-databind.version>
<dependency.cxf.version>3.3.7</dependency.cxf.version>
@@ -66,7 +67,6 @@
<dependency.httpcore.version>4.4.13</dependency.httpcore.version>
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
<dependency.xercesImpl.version>2.12.0-alfresco-patched-20191004</dependency.xercesImpl.version>
<dependency.maven-jar-plugin.version>3.2.0</dependency.maven-jar-plugin.version>
<dependency.slf4j.version>1.7.30</dependency.slf4j.version>
<dependency.gytheio.version>0.11.6</dependency.gytheio.version>
<dependency.jaxb.version>2.3.3</dependency.jaxb.version>
@@ -89,22 +89,6 @@
<dependency.tas-dataprep.version>2.3</dependency.tas-dataprep.version>
</properties>
<profiles>
<profile>
<id>full-build</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<modules>
<module>core</module>
<module>data-model</module>
<module>repository</module>
<module>remote-api</module>
<module>packaging</module>
</modules>
</profile>
</profiles>
<scm>
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
@@ -141,6 +125,7 @@
<artifactId>alfresco-core</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
@@ -152,34 +137,37 @@
<artifactId>alfresco-data-model</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-remote-api</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-remote-api</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-jlan-embed</artifactId>
<version>${dependency.alfresco-jlan.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-remote-api</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-remote-api</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${dependency.alfresco-community-repo.version}</version>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-trashcan-cleaner</artifactId>
@@ -742,4 +730,45 @@
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<!-- Ensure consistent maven-release-plugin version-->
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<!-- TODO this will change the tag format for some of the ACS modules -->
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>4.4.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@@ -7,27 +7,9 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<scm>
<connection>scm:git:https://github.com/Alfresco/alfresco-remote-api.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-remote-api.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-remote-api</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<properties>
<licenseName>community</licenseName>

View File

@@ -7,27 +7,9 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>8.300-SNAPSHOT</version>
<version>8.300-TEST1-SNAPSHOT</version>
</parent>
<scm>
<connection>scm:git:https://github.com/Alfresco/alfresco-repository.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-repository.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-repository</url>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<properties>
<licenseName>community</licenseName>

9
scripts/travis/build.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -ev
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
PROFILES="$([ "${TRAVIS_BUILD_STAGE_NAME,,}" = "release" ] && echo "-Pinternal" || echo "-PcommunityDocker" )"
mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true "${PROFILES}"

View File

@@ -0,0 +1,96 @@
#!/usr/bin/env bash
function isPullRequestBuild() {
test "${TRAVIS_PULL_REQUEST}" != "false"
}
function isBranchBuild() {
test "${TRAVIS_PULL_REQUEST}" = "false"
}
function cloneRepo() {
local REPO="${1}"
local TAG_OR_BRANCH="${2}"
# clone the repository branch/tag
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" >/dev/null
rm -rf "$(basename "${REPO%.git}")"
git clone -b "${TAG_OR_BRANCH}" --depth=1 "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}"
popd >/dev/null
}
function retrievePomParentVersion() {
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" >/dev/null
sed -n '/<parent>/,/<\/parent>/p' pom.xml \
| sed -n '/<version>/,/<\/version>/p' \
| tr -d '\n' \
| grep -oP '(?<=<version>).*(?=</version>)' \
| xargs
popd >/dev/null
}
function retrievePomProperty() {
local KEY="${1}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" >/dev/null
sed -n '/<properties>/,/<\/properties>/p' pom.xml \
| sed -n "/<${KEY}>/,/<\/${KEY}>/p" \
| tr -d '\n' \
| grep -oP "(?<=<${KEY}>).*(?=</${KEY}>)" \
| xargs
popd >/dev/null
}
function evaluatePomProperty() {
local KEY="${1}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" >/dev/null
mvn -B -q help:evaluate -Dexpression="${KEY}" -DforceStdout
popd >/dev/null
}
function remoteBranchExists() {
local REMOTE_REPO="${1}"
local BRANCH="${2}"
git ls-remote --exit-code --heads "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REMOTE_REPO}" "${BRANCH}"
}
function pullUpstreamTag() {
local UPSTREAM_REPO="${1}"
local TAG="${2}"
cloneRepo "${UPSTREAM_REPO}" "${TAG}"
}
function pullAndBuildSameBranchOnUpstream() {
local UPSTREAM_REPO="${1}"
local EXTRA_BUILD_ARGUMENTS="${2}"
local SOURCE_BRANCH="$(isBranchBuild && echo "${TRAVIS_BRANCH}" || echo "${TRAVIS_PULL_REQUEST_BRANCH}")"
if ! remoteBranchExists "${UPSTREAM_REPO}" "${SOURCE_BRANCH}" ; then
printf "Branch \"%s\" not found on the %s repository\n" "${SOURCE_BRANCH}" "${UPSTREAM_REPO}"
exit 1
fi
cloneRepo "${UPSTREAM_REPO}" "${SOURCE_BRANCH}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../"
cd "$(basename "${UPSTREAM_REPO%.git}")"
mvn -B -V -q clean install -DskipTests -Dmaven.javadoc.skip=true ${EXTRA_BUILD_ARGUMENTS}
mvn -B -V install -DskipTests -f packaging/tests/pom.xml
popd
}

View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -ev
rm -rf "${HOME}/.m2/repository/org/alfresco/acs-community-packaging"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-community-repo"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-community-repo-*"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-core"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-data-model"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-enterprise-remote-api"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-enterprise-repo-*"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-enterprise-repository"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-remote-api"
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-repository"
rm -rf "${HOME}/.m2/repository/org/alfresco/content-services"
rm -rf "${HOME}/.m2/repository/org/alfresco/content-services*"
rm -rf "${HOME}/.m2/repository/org/alfresco/content-services-community"
rm -rf "${HOME}/.m2/repository/org/alfresco/tas/alfresco-community-repo-*-test"
rm -rf "${HOME}/.m2/repository/org/alfresco/tas/alfresco-enterprise-repo-*-test"

18
scripts/travis/init.sh Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -ev
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
# Maven Setup
mkdir -p "${HOME}/.m2" && cp -f .travis.settings.xml "${HOME}/.m2/settings.xml"
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
# Docker Logins
echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io
# Enable experimental docker features (for the image squash option)
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
# not helpful in this script
# export HOST_IP=$(hostname -I | cut -f1 -d' ')

17
scripts/travis/maven_release.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -ev
# Use full history for release
git checkout -B "${TRAVIS_BRANCH}"
# Add email to link commits to user
git config user.email "${GIT_EMAIL}"
# Run the release plugin - with "[skip ci]" in the release commit message
mvn -B \
-Prelease,fullBuild,all-tas-tests \
"-Darguments=-Prelease,fullBuild,all-tas-tests -DskipTests -Dbuild-number=${TRAVIS_BUILD_NUMBER}" \
release:clean release:prepare release:perform \
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
-Dusername="${GIT_USERNAME}" \
-Dpassword="${GIT_PASSWORD}"

View File

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
set -ev
USER=${1}
REPO=${2}
BRANCH=${3}
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
echo "Downstream projects shouldn't be triggered from PR builds"
exit 1
fi
if ! git ls-remote --exit-code --heads "https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/${USER}/${REPO}.git" "${BRANCH}" ; then
echo "Branch \"${BRANCH}\" not found on the downstream repository ${USER}/${REPO}. Exiting..."
exit 0
fi
URL="https://api.travis-ci.com/repo/${USER}%2F${REPO}/requests"
BODY="{
\"request\": {
\"branch\":\"${BRANCH}\"
}}"
printf "Travis API call:\n URL: %s\n Body: %s\n\n" "${URL}" "${BODY}"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${TRAVIS_ACCESS_TOKEN_TEMP}" \
-d "${BODY}" \
"${URL}" \
| tee /tmp/travis-request-output.txt
cat /tmp/travis-request-output.txt
if grep -q '"@type": "error"' /tmp/travis-request-output.txt; then
echo "Error when triggering build..."
exit 2
fi
if grep -q 'access denied' /tmp/travis-request-output.txt; then
echo "Access denied when triggering build..."
exit 3
fi
exit 0

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -ev
#
# Check that the version to be released does not already have a docker tag.
#
POM_VERSION=$(mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout)
printf "POM version: %s\n" "${POM_VERSION}"
IMAGE_TAG="${POM_VERSION%-SNAPSHOT}"
# get the image name from the pom file
ALFRESCO_DOCKER_IMAGE="$(mvn -B -q help:evaluate -f ./packaging/docker-alfresco/pom.xml -Dexpression=image.name -DforceStdout)"
DOCKER_IMAGE_FULL_NAME="${ALFRESCO_DOCKER_IMAGE}:${IMAGE_TAG}"
function docker_image_exists() {
local IMAGE_FULL_NAME="${1}"; shift
local WAIT_TIME="${1:-5}"
local SEARCH_TERM='Pulling|is up to date|not found'
echo "Looking to see if ${IMAGE_FULL_NAME} already exists..."
local RESULT=$( (timeout --preserve-status "${WAIT_TIME}" docker 2>&1 pull "${IMAGE_FULL_NAME}" &) | grep -v 'Pulling repository' | grep -E -o "${SEARCH_TERM}")
test "${RESULT}" || { echo "Timed out too soon. Try using a wait_time greater than ${WAIT_TIME}..."; return 1 ;}
if echo "${RESULT}" | grep -vq 'not found'; then
true
else
false
fi
}
if docker_image_exists "${DOCKER_IMAGE_FULL_NAME}" ; then
echo "Tag ${RELEASE_VERSION} already pushed, release process will interrupt."
exit 1
else
echo "The ${RELEASE_VERSION} tag was not found"
fi

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
USER=${1}
REPO=${2}
BRANCH=${3}
body="{
\"request\": {
\"branch\":\"${BRANCH}\"
}}"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token ${TRAVIS_ACCESS_TOKEN}" \
-d "${body}" \
https://api.travis-ci.com/repo/${USER}%2F${REPO}/requests \
| tee /tmp/travis-request-output.txt
if grep -q '"@type": "error"' /tmp/travis-request-output.txt; then
exit 1
fi
if grep -q 'access denied' /tmp/travis-request-output.txt; then
exit 1
fi