mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
Migrate to GitHub Actions (#1863)
* Remove travis configuration * Add github actions configuration * ACS-4776 Finalize deprecation of BitlyUrlShortenerImpl (#1787) (cherry picked from commit7b87ee628d
) * Trigger tests [db][ags][tas][ags on MySQL] * Add packaging scripts for TAS tests [db][ags][tas][ags on MySQL] * ACS-3841 Add missing logs for WebDAV TAS tests (#1629) * ACS-3841 Add missing logs * ACS-3841 Reformat code + fix grep (cherry picked from commitcdbe3292e0
) * Trigger tests [db][ags][tas][ags on MySQL] * Enforce order the tests run on DispositionScheduleLinkedRecordsTest * Added AlphabeticalPriorityInterceptor for AGS Rest tests --------- Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com> Co-authored-by: Damian Ujma <92095156+damianujma@users.noreply.github.com>
This commit is contained in:
537
.github/workflows/ci.yml
vendored
Normal file
537
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,537 @@
|
|||||||
|
name: Alfresco Community Repo CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- feature/**
|
||||||
|
- fix/**
|
||||||
|
- master
|
||||||
|
- release/**
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- feature/**
|
||||||
|
- fix/**
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60
|
||||||
|
LOG_WARN: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
|
||||||
|
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||||
|
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
|
||||||
|
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
TAS_ENVIRONMENT: ./packaging/tests/environment
|
||||||
|
TAS_SCRIPTS: ../alfresco-community-repo/packaging/tests/scripts
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prepare:
|
||||||
|
name: "Prepare"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: >
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Prepare maven cache and check compilation"
|
||||||
|
run: bash ./scripts/ci/prepare.sh
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
veracode:
|
||||||
|
name: "Source Clear Scan (SCA)"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
all_unit_tests_suite:
|
||||||
|
name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run tests"
|
||||||
|
run: |
|
||||||
|
mvn -B test -pl core,data-model -am -DfailIfNoTests=false
|
||||||
|
mvn -B test -pl "repository,mmt" -am "-Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite" -DfailIfNoTests=false
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
remote_api_app_context_test_suites:
|
||||||
|
name: Remote-api - ${{ matrix.testSuite }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- testSuite: AppContext01TestSuite
|
||||||
|
compose-profile: default
|
||||||
|
- testSuite: AppContext02TestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: AppContext03TestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: AppContext04TestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: AppContextExtraTestSuite
|
||||||
|
compose-profile: default
|
||||||
|
env:
|
||||||
|
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Build"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: |
|
||||||
|
bash ./scripts/ci/init.sh
|
||||||
|
bash ./scripts/ci/build.sh
|
||||||
|
- name: "Set transformers tag"
|
||||||
|
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||||
|
- name: "Set up the environment"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
repository_mariadb_tests:
|
||||||
|
name: Repository - MariaDB ${{ matrix.version }} tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
|
||||||
|
github.event_name != 'pull_request' &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||||
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
version: ['10.2.18', '10.4', '10.5']
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: Run MariaDB ${{ matrix.version }} database
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||||
|
env:
|
||||||
|
MARIADB_VERSION: ${{ matrix.version }}
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -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: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
repository_mariadb_10_6_tests:
|
||||||
|
name: "Repository - MariaDB 10.6 tests"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||||
|
contains(github.event.head_commit.message, '[latest db]') ||
|
||||||
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run MariaDB 10.6 database"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||||
|
env:
|
||||||
|
MARIADB_VERSION: 10.6
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -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: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
repository_mysql_tests:
|
||||||
|
name: Repository - MySQL 8 tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||||
|
contains(github.event.head_commit.message, '[latest db]') ||
|
||||||
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run MySQL 8 database"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
||||||
|
env:
|
||||||
|
MYSQL_VERSION: 8
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
repository_postgresql_13_7_tests:
|
||||||
|
name: "Repository - PostgreSQL 13.7 tests"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request' &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip db]')) ||
|
||||||
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run PostgreSQL 13.7 database"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
|
env:
|
||||||
|
POSTGRES_VERSION: 13.7
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
repository_postgresql_14_4_tests:
|
||||||
|
name: "Repository - PostgreSQL 14.4 tests"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(!contains(github.event.head_commit.message, '[skip db]') ||
|
||||||
|
contains(github.event.head_commit.message, '[latest db]') ||
|
||||||
|
contains(github.event.head_commit.message, '[db]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run PostgreSQL 14.4 database"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
|
env:
|
||||||
|
POSTGRES_VERSION: 14.4
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
repository_messaging_tests:
|
||||||
|
name: Repository - Messaging tests
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run ActiveMQ"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
repository_app_context_test_suites:
|
||||||
|
name: Repository - ${{ matrix.testSuite }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- testSuite: AppContext01TestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: AppContext02TestSuite
|
||||||
|
compose-profile: default
|
||||||
|
- testSuite: AppContext03TestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: AppContext04TestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: AppContext05TestSuite
|
||||||
|
compose-profile: default
|
||||||
|
mvn-options: '"-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth"'
|
||||||
|
- testSuite: AppContext06TestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: AppContextExtraTestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: MiscContextTestSuite
|
||||||
|
compose-profile: with-transform-core-aio
|
||||||
|
- testSuite: SearchTestSuite
|
||||||
|
compose-profile: default
|
||||||
|
mvn-options: '-Dindex.subsystem.name=solr6'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Set transformers tag"
|
||||||
|
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||||
|
- name: "Generate Keystores and Truststores for Mutual TLS configuration"
|
||||||
|
if: ${{ matrix.mtls }}
|
||||||
|
run: |
|
||||||
|
git clone -b "master" --depth=1 "https://${{ secrets.BOT_GITHUB_USERNAME }}:${{ secrets.BOT_GITHUB_TOKEN }}@github.com/Alfresco/alfresco-ssl-generator.git"
|
||||||
|
bash ./scripts/ci/generate_keystores.sh
|
||||||
|
- name: "Set up the environment"
|
||||||
|
run: |
|
||||||
|
if [ -e ./scripts/ci/tests/${{ matrix.testSuite }}-setup.sh ]; then
|
||||||
|
bash ./scripts/ci/tests/${{ matrix.testSuite }}-setup.sh
|
||||||
|
fi
|
||||||
|
docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco ${{ matrix.mvn-options }}
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
tas_tests:
|
||||||
|
name: ${{ matrix.test-name }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tas]')) ||
|
||||||
|
contains(github.event.head_commit.message, '[tas]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- test-name: "REST API TAS tests part1"
|
||||||
|
pom-dir: tas-restapi
|
||||||
|
test-profile: run-restapi-part1
|
||||||
|
- test-name: "REST API TAS tests part2"
|
||||||
|
pom-dir: tas-restapi
|
||||||
|
test-profile: run-restapi-part2
|
||||||
|
- test-name: "REST API TAS tests part3"
|
||||||
|
pom-dir: tas-restapi
|
||||||
|
test-profile: run-restapi-part3
|
||||||
|
- test-name: "CMIS TAS tests - BROWSER binding"
|
||||||
|
pom-dir: tas-cmis
|
||||||
|
test-profile: run-cmis-browser
|
||||||
|
- test-name: "CMIS TAS tests - ATOM binding"
|
||||||
|
pom-dir: tas-cmis
|
||||||
|
test-profile: run-cmis-atom
|
||||||
|
- test-name: "CMIS TAS tests - WEBSERVICES binding"
|
||||||
|
pom-dir: tas-cmis
|
||||||
|
test-profile: run-cmis-webservices
|
||||||
|
- test-name: "Email TAS tests"
|
||||||
|
pom-dir: tas-email
|
||||||
|
- test-name: "WebDAV TAS tests"
|
||||||
|
pom-dir: tas-webdav
|
||||||
|
- test-name: "Integration TAS tests"
|
||||||
|
pom-dir: tas-integration
|
||||||
|
env:
|
||||||
|
REQUIRES_LOCAL_IMAGES: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Build"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: |
|
||||||
|
bash ./scripts/ci/init.sh
|
||||||
|
bash ./scripts/ci/build.sh
|
||||||
|
- name: "Set up the environment"
|
||||||
|
run: |
|
||||||
|
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
|
||||||
|
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
||||||
|
- name: "Build TAS integration tests"
|
||||||
|
if: ${{ matrix.test-name }} == 'Integration TAS tests'
|
||||||
|
run: mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
|
||||||
|
- name: "Run tests"
|
||||||
|
id: tests
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: mvn -B verify -f packaging/tests/${{ matrix.pom-dir }}/pom.xml -Pall-tas-tests,${{ matrix.test-profile }} -Denvironment=default -DrunBugs=false
|
||||||
|
- name: "Print output after success"
|
||||||
|
if: ${{ always() && steps.tests.outcome == 'success' }}
|
||||||
|
run: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/${{ matrix.pom-dir }}"
|
||||||
|
- name: "Print output after failure"
|
||||||
|
if: ${{ always() && steps.tests.outcome == 'failure' }}
|
||||||
|
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/${{ matrix.pom-dir }}"
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
share_services_test_suite:
|
||||||
|
name: Share Services - ShareServicesTestSuite
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run Postgres 14.4 database"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
|
||||||
|
- name: "Run tests"
|
||||||
|
run: mvn -B test -pl :alfresco-share-services -am -Dtest=ShareServicesTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
ags_postgresql_tests:
|
||||||
|
name: AGS Integration Tests 0${{ matrix.part }} (PostgreSQL) ${{ matrix.test-name }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip ags]')) ||
|
||||||
|
contains(github.event.head_commit.message, '[ags]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
part: [1, 2, 3, 4]
|
||||||
|
env:
|
||||||
|
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Build"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: |
|
||||||
|
bash ./scripts/ci/init.sh
|
||||||
|
bash ./scripts/ci/build.sh
|
||||||
|
- name: "Verify"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }}
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
ags_mysql_tests:
|
||||||
|
name: AGS Integration Tests 0${{ matrix.part }} (MySQL) ${{ matrix.test-name }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip ags]')) ||
|
||||||
|
contains(github.event.head_commit.message, '[ags on MySQL]')) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
part: [1, 2, 3, 4]
|
||||||
|
env:
|
||||||
|
REQUIRES_INSTALLED_ARTIFACTS: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Build"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: |
|
||||||
|
bash ./scripts/ci/init.sh
|
||||||
|
bash ./scripts/ci/build.sh
|
||||||
|
- name: "Verify"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }}
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
|
ags_community_rest_api_tests:
|
||||||
|
name: "AGS Community Rest API Tests"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [prepare]
|
||||||
|
if: >
|
||||||
|
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip ags]') && !contains(github.event.head_commit.message, '[skip tas]')) ||
|
||||||
|
(contains(github.event.head_commit.message, '[ags]') && contains(github.event.head_commit.message, '[tas]'))) &&
|
||||||
|
!contains(github.event.head_commit.message, '[skip tests]') &&
|
||||||
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
|
env:
|
||||||
|
REQUIRES_LOCAL_IMAGES: true
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Build"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: |
|
||||||
|
bash ./scripts/ci/init.sh
|
||||||
|
bash ./scripts/ci/build.sh
|
||||||
|
- name: "Set up the environment"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: |
|
||||||
|
${{ env.TAS_SCRIPTS }}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
|
||||||
|
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
|
||||||
|
mvn -B install -pl :alfresco-governance-services-automation-community-rest-api -am -Pags -Pall-tas-tests -DskipTests
|
||||||
|
- name: "Test"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests
|
||||||
|
- name: "Configure AWS credentials"
|
||||||
|
if: ${{ always() }}
|
||||||
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AGS_AWS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AGS_AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws-region: us-east-1
|
||||||
|
- name: "Upload artifacts to Amazon S3 bucket"
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: |
|
||||||
|
bash amps/ags/ci/scripts/getLogs.sh
|
||||||
|
aws s3 cp --acl private alfresco.log s3://ags-travis-artifacts/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests/alfresco.log
|
||||||
|
aws s3 cp --acl private solr.log s3://ags-travis-artifacts/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests/solr.log
|
||||||
|
aws s3 cp --acl private ./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log s3://ags-travis-artifacts/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests/rm-automation-community-rest-api.log
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
79
.github/workflows/master_release.yml
vendored
Normal file
79
.github/workflows/master_release.yml
vendored
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
name: Master/Release branch workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- release/**
|
||||||
|
|
||||||
|
env:
|
||||||
|
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
|
||||||
|
GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }}
|
||||||
|
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }}
|
||||||
|
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
|
||||||
|
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
|
||||||
|
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run_ci:
|
||||||
|
uses: ./.github/workflows/ci.yml
|
||||||
|
secrets: inherit
|
||||||
|
push_to_nexus:
|
||||||
|
name: "Push to Nexus"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [run_ci]
|
||||||
|
if: >
|
||||||
|
!(failure() || cancelled()) &&
|
||||||
|
!contains(github.event.head_commit.message, '[no release]') &&
|
||||||
|
github.event_name != 'pull_request'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0
|
||||||
|
with:
|
||||||
|
username: ${{ env.GIT_USERNAME }}
|
||||||
|
email: ${{ env.GIT_EMAIL }}
|
||||||
|
global: true
|
||||||
|
- name: "Release"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: |
|
||||||
|
bash scripts/ci/verify_release_tag.sh
|
||||||
|
bash scripts/ci/maven_release.sh
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
update_downstream:
|
||||||
|
name: "Update alfresco-enterprise-repo"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [push_to_nexus]
|
||||||
|
if: >
|
||||||
|
!(failure() || cancelled()) &&
|
||||||
|
!contains(github.event.head_commit.message, '[no downstream]') &&
|
||||||
|
github.event_name != 'pull_request'
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.33.0
|
||||||
|
with:
|
||||||
|
username: ${{ env.GIT_USERNAME }}
|
||||||
|
email: ${{ env.GIT_EMAIL }}
|
||||||
|
global: true
|
||||||
|
- name: "Update downstream"
|
||||||
|
run: bash ./scripts/ci/update_downstream.sh
|
||||||
|
env:
|
||||||
|
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
||||||
|
- name: "Clean Maven cache"
|
||||||
|
run: bash ./scripts/ci/cleanup_cache.sh
|
415
.travis.yml
415
.travis.yml
@@ -1,415 +0,0 @@
|
|||||||
---
|
|
||||||
dist: focal
|
|
||||||
language: java
|
|
||||||
jdk: openjdk17
|
|
||||||
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
git:
|
|
||||||
depth: false
|
|
||||||
quiet: true
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- ${HOME}/.m2/repository
|
|
||||||
|
|
||||||
# the cache can grow constantly
|
|
||||||
before_cache: bash scripts/travis/cleanup_cache.sh
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
- /release\/.*/
|
|
||||||
- /feature\/.*/
|
|
||||||
- /fix\/.*/
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)
|
|
||||||
- TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts
|
|
||||||
- TAS_ENVIRONMENT=./packaging/tests/environment
|
|
||||||
- LOG_WARN="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- name: prepare
|
|
||||||
if: commit_message !~ /\[skip tests\]/ AND commit_message !~ /\[force[^\]]*\]/
|
|
||||||
- name: test
|
|
||||||
if: commit_message !~ /\[skip tests\]/ AND commit_message !~ /\[force[^\]]*\]/
|
|
||||||
- name: release
|
|
||||||
if: commit_message !~ /\[no release\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false
|
|
||||||
- name: update_downstream
|
|
||||||
if: commit_message !~ /\[no downstream\]/ AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND fork = false
|
|
||||||
|
|
||||||
before_install: travis_retry bash scripts/travis/init.sh
|
|
||||||
install: travis_retry travis_wait 40 bash scripts/travis/build.sh
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- name: "Prepare"
|
|
||||||
stage: prepare
|
|
||||||
install: skip
|
|
||||||
script: travis_retry travis_wait 80 bash scripts/travis/prepare.sh
|
|
||||||
|
|
||||||
- name: "Source Clear Scan (SCA)"
|
|
||||||
stage: test
|
|
||||||
if: (branch = master OR branch =~ /release\/.*/) AND type != pull_request
|
|
||||||
# Run Veracode
|
|
||||||
install: skip
|
|
||||||
script: travis_wait 30 bash scripts/travis/source_clear.sh
|
|
||||||
|
|
||||||
- name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
script:
|
|
||||||
- travis_retry mvn -B test -pl core,data-model -am -DfailIfNoTests=false
|
|
||||||
- travis_retry mvn -B test -pl "repository,mmt" -am "-Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite" -DfailIfNoTests=false
|
|
||||||
|
|
||||||
- name: "Repository - AppContext01TestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AppContext01TestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - AppContext02TestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AppContext02TestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - AppContext03TestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AppContext03TestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - AppContext04TestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AppContext04TestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - AppContext05TestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- 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 alfresco/alfresco-identity-service:1.2
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AppContext05TestSuite -DfailIfNoTests=false -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"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AppContext06TestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - AppContextExtraTestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AppContextExtraTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - MiscContextTestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=MiscContextTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - SearchTestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=SearchTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dindex.subsystem.name=solr6
|
|
||||||
|
|
||||||
- name: "Repository - MariaDB 10.2.18 tests"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
|
|
||||||
install: skip
|
|
||||||
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.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -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: "Repository - MariaDB 10.4 tests"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
|
|
||||||
install: skip
|
|
||||||
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.4 --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.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -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: "Repository - MariaDB 10.5 tests"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
|
|
||||||
install: skip
|
|
||||||
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.5 --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.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -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: "Repository - MariaDB 10.6 tests"
|
|
||||||
# We run tests on the latest version of MariaDB on pull requests plus the normal master and release branches - ignored on feature branches
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ ) OR commit_message =~ /\[db\]/ OR commit_message =~ /\[latest db\]/
|
|
||||||
install: skip
|
|
||||||
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.6 --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.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -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: "Repository - MySQL 8 tests"
|
|
||||||
# We run tests on the latest version of MySQL on pull requests plus the normal master and release branches - ignored on feature branches
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ ) OR commit_message =~ /\[db\]/ OR commit_message =~ /\[latest db\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mysql:8 --transaction-isolation='READ-COMMITTED'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -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 13.7 tests"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip db\]/ AND type != pull_request) OR commit_message =~ /\[db\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.7 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - PostgreSQL 14.4 tests"
|
|
||||||
# We only run DB tests on the latest version of PostgreSQL on feature branches
|
|
||||||
if: commit_message !~ /\[skip db\]/ OR commit_message =~ /\[db\]/ OR commit_message =~ /\[latest db\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "Repository - Messaging tests"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
script: travis_wait 20 mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false
|
|
||||||
|
|
||||||
- name: "Remote-api - AppContext01TestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
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"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
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"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
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"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
|
||||||
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"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
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"
|
|
||||||
# TAS tests are generally skipped on feature branches as they will be repeated on the enterprise repo or community packaging builds
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
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 -B verify -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-restapi"
|
|
||||||
|
|
||||||
- name: "REST API TAS tests part2"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
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 -B verify -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part2 -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-restapi"
|
|
||||||
|
|
||||||
- name: "REST API TAS tests part3"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
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 -B verify -f packaging/tests/tas-restapi/pom.xml -Pall-tas-tests,run-restapi-part3 -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-restapi"
|
|
||||||
|
|
||||||
- name: "CMIS TAS tests - BROWSER binding"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
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 -B verify -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-browser -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-cmis"
|
|
||||||
|
|
||||||
- name: "CMIS TAS tests - ATOM binding"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
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 -B verify -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-atom -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-cmis"
|
|
||||||
|
|
||||||
- name: "CMIS TAS tests - WEBSERVICES binding"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
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 -B verify -f packaging/tests/tas-cmis/pom.xml -Pall-tas-tests,run-cmis-webservices -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-cmis"
|
|
||||||
|
|
||||||
- name: "Email TAS tests"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
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 -B verify -f packaging/tests/tas-email/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-email"
|
|
||||||
|
|
||||||
- name: "WebDAV TAS tests"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
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 -B verify -f packaging/tests/tas-webdav/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-webdav"
|
|
||||||
|
|
||||||
- name: "Integration TAS tests"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip tas\]/) OR commit_message =~ /\[tas\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
before_script:
|
|
||||||
- ${TAS_SCRIPTS}/start-compose.sh ${TAS_ENVIRONMENT}/docker-compose-minimal.yml
|
|
||||||
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
||||||
- travis_retry travis_wait 40 mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
|
|
||||||
script: travis_wait 30 mvn -B verify -f packaging/tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
|
|
||||||
after_failure: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/tas-integration"
|
|
||||||
|
|
||||||
- name: "Share Services - ShareServicesTestSuite"
|
|
||||||
if: commit_message !~ /\[skip repo\]/
|
|
||||||
install: skip
|
|
||||||
before_script:
|
|
||||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:14.4 postgres -c 'max_connections=300'
|
|
||||||
script: travis_wait 20 mvn -B test -pl :alfresco-share-services -am -Dtest=ShareServicesTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
|
||||||
|
|
||||||
- name: "AGS Unit & Integration Tests 01 (PostgreSQL)"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt1 -f amps/ags/pom.xml ${LOG_WARN}
|
|
||||||
|
|
||||||
- name: "AGS Integration Tests 02 (PostgreSQL)"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt2 -f amps/ags/pom.xml ${LOG_WARN}
|
|
||||||
|
|
||||||
- name: "AGS Integration Tests 03 (PostgreSQL)"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt3 -f amps/ags/pom.xml ${LOG_WARN}
|
|
||||||
|
|
||||||
- name: "AGS Unit & Integration Tests 04 (PostgreSQL)"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt4 -f amps/ags/pom.xml ${LOG_WARN}
|
|
||||||
|
|
||||||
- name: "AGS Unit & Integration Tests 01 (MySQL) "
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags on MySQL\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt1 -f amps/ags/pom.xml ${LOG_WARN}
|
|
||||||
|
|
||||||
- name: "AGS Integration Tests 02 (MySQL) "
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags on MySQL\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt2 -f amps/ags/pom.xml ${LOG_WARN}
|
|
||||||
|
|
||||||
- name: "AGS Integration Tests 03 (MySQL) "
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt3 -f amps/ags/pom.xml ${LOG_WARN}
|
|
||||||
|
|
||||||
- name: "AGS Unit & Integration Tests 04 (MySQL) "
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags on MySQL\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_INSTALLED_ARTIFACTS=true bash scripts/travis/build.sh
|
|
||||||
script: travis_retry travis_wait 80 mvn -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt4 -f amps/ags/pom.xml ${LOG_WARN}
|
|
||||||
|
|
||||||
- name: "AGS Community Rest API Tests"
|
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
|
||||||
addons:
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- ./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports/rm-automation-community-rest-api.log
|
|
||||||
- alfresco.log
|
|
||||||
- solr.log
|
|
||||||
target_paths: community/${TRAVIS_BUILD_NUMBER}/${TRAVIS_JOB_NAME}
|
|
||||||
before_script:
|
|
||||||
- ${TAS_SCRIPTS}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
|
|
||||||
- ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
|
|
||||||
script: travis_wait 40 mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -am -DfailIfNoTests=false -Dskip.automationtests=false -Pags
|
|
||||||
after_script: bash amps/ags/travis/scripts/getLogs.sh
|
|
||||||
|
|
||||||
- name: "Push to Nexus"
|
|
||||||
stage: release
|
|
||||||
install: skip
|
|
||||||
before_script: bash scripts/travis/verify_release_tag.sh
|
|
||||||
script: travis_wait 40 bash scripts/travis/maven_release.sh
|
|
||||||
|
|
||||||
- name: "Update alfresco-enterprise-repo"
|
|
||||||
stage: update_downstream
|
|
||||||
install: skip
|
|
||||||
script: bash scripts/travis/update_downstream.sh
|
|
||||||
|
|
@@ -1,6 +1,6 @@
|
|||||||
# alfresco-community-repo
|
# alfresco-community-repo
|
||||||
|
|
||||||
[](https://travis-ci.com/Alfresco/alfresco-community-repo)
|
[](https://github.com/Alfresco/alfresco-community-repo/actions/workflows/master_release.yml)
|
||||||
|
|
||||||
#### Alfresco Core
|
#### Alfresco Core
|
||||||
|
|
||||||
|
@@ -199,7 +199,7 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
|
|||||||
* Check the disposition steps for a record can be executed
|
* Check the disposition steps for a record can be executed
|
||||||
* When the record is linked to a folder with the same disposition schedule
|
* When the record is linked to a folder with the same disposition schedule
|
||||||
* */
|
* */
|
||||||
@Test
|
@Test (dependsOnMethods = {"dispositionScheduleLinkedRecords" })
|
||||||
@AlfrescoTest (jira = "RM-3060")
|
@AlfrescoTest (jira = "RM-3060")
|
||||||
public void sameDispositionScheduleLinkedRecords() throws UnsupportedEncodingException {
|
public void sameDispositionScheduleLinkedRecords() throws UnsupportedEncodingException {
|
||||||
|
|
||||||
@@ -362,7 +362,7 @@ public class DispositionScheduleLinkedRecordsTest extends BaseRMRestTest {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test (dependsOnMethods = {"dispositionScheduleLinkedRecords" })
|
||||||
@AlfrescoTest(jira = "RM-1622")
|
@AlfrescoTest(jira = "RM-1622")
|
||||||
public void sameLevelDispositionScheduleStepsPeriodsCalculation() throws Exception {
|
public void sameLevelDispositionScheduleStepsPeriodsCalculation() throws Exception {
|
||||||
|
|
||||||
|
@@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* #%L
|
||||||
|
* Alfresco Records Management Module
|
||||||
|
* %%
|
||||||
|
* Copyright (C) 2005 - 2023 Alfresco Software Limited
|
||||||
|
* %%
|
||||||
|
* This file is part of the Alfresco software.
|
||||||
|
* -
|
||||||
|
* If the software was purchased under a paid Alfresco license, the terms of
|
||||||
|
* the paid license agreement will prevail. Otherwise, the software is
|
||||||
|
* provided under the following open source license terms:
|
||||||
|
* -
|
||||||
|
* Alfresco is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
* -
|
||||||
|
* Alfresco is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
* -
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
* #L%
|
||||||
|
*/
|
||||||
|
package org.alfresco.rest.rm.community.utils;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.testng.IMethodInstance;
|
||||||
|
import org.testng.IMethodInterceptor;
|
||||||
|
import org.testng.ITestContext;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A method interceptor that sorts test classes alphabetically.
|
||||||
|
*
|
||||||
|
* @author Damian Ujma
|
||||||
|
*/
|
||||||
|
public class AlphabeticalPriorityInterceptor implements IMethodInterceptor
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public List<IMethodInstance> intercept(List<IMethodInstance> methods,
|
||||||
|
ITestContext context)
|
||||||
|
{
|
||||||
|
return methods.stream()
|
||||||
|
.sorted(Comparator.comparing(methodInstance -> methodInstance.getMethod().getTestClass().getName()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
@@ -1,7 +1,10 @@
|
|||||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
||||||
|
|
||||||
<suite name="TestNG AllTestSuite" configfailurepolicy="continue" verbose="1" time-out="300000">
|
<suite name="TestNG AllTestSuite" configfailurepolicy="continue" verbose="1" time-out="300000">
|
||||||
<test name="restapi">
|
<listeners>
|
||||||
|
<listener class-name="org.alfresco.rest.rm.community.utils.AlphabeticalPriorityInterceptor" />
|
||||||
|
</listeners>
|
||||||
|
<test name="restapi" preserve-order="false">
|
||||||
<packages>
|
<packages>
|
||||||
<package name="org.alfresco.rest.rm.community.*"/>
|
<package name="org.alfresco.rest.rm.community.*"/>
|
||||||
</packages>
|
</packages>
|
||||||
|
7
packaging/tests/scripts/output_tests_run.sh
Executable file
7
packaging/tests/scripts/output_tests_run.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
TAS_DIRECTORY=$1
|
||||||
|
|
||||||
|
cd ${TAS_DIRECTORY}
|
||||||
|
|
||||||
|
cat target/reports/alfresco-tas.log | grep -a "*** STARTING"
|
@@ -1,9 +1,21 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -x
|
||||||
|
|
||||||
export DOCKER_COMPOSE_PATH=$1
|
export DOCKER_COMPOSE_PATH=$1
|
||||||
export CLEAN_UP="$2"
|
export DOCKER_COMPOSES=""
|
||||||
|
export CLEAN_UP=""
|
||||||
|
|
||||||
if [ -z "$DOCKER_COMPOSE_PATH" ]
|
for var in "$@"
|
||||||
|
do
|
||||||
|
if [ "$var" == "no-clean-up" ]
|
||||||
|
then
|
||||||
|
export CLEAN_UP="$var"
|
||||||
|
else
|
||||||
|
export DOCKER_COMPOSES+="--file $var "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z "$DOCKER_COMPOSES" ]
|
||||||
then
|
then
|
||||||
echo "Please provide path to docker-compose.yml: \"${0##*/} /path/to/docker-compose.yml\""
|
echo "Please provide path to docker-compose.yml: \"${0##*/} /path/to/docker-compose.yml\""
|
||||||
exit 1
|
exit 1
|
||||||
@@ -15,8 +27,8 @@ fi
|
|||||||
# The second parameter can be used to avoid doing a clean up if we are doing a restart test.
|
# The second parameter can be used to avoid doing a clean up if we are doing a restart test.
|
||||||
if [ "$CLEAN_UP" != "no-clean-up" ]
|
if [ "$CLEAN_UP" != "no-clean-up" ]
|
||||||
then
|
then
|
||||||
docker-compose --file "${DOCKER_COMPOSE_PATH}" kill
|
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") kill
|
||||||
docker-compose --file "${DOCKER_COMPOSE_PATH}" rm -f
|
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") rm -f
|
||||||
|
|
||||||
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
|
export GENERATED_IMAGES=$(docker images | grep '^environment_' | awk '{ print $3 }')
|
||||||
if [ -n "$GENERATED_IMAGES" ]
|
if [ -n "$GENERATED_IMAGES" ]
|
||||||
@@ -31,7 +43,7 @@ export TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-tra
|
|||||||
export TRANSFORM_ROUTER_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-service.version -q -DforceStdout)
|
export TRANSFORM_ROUTER_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-service.version -q -DforceStdout)
|
||||||
|
|
||||||
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
|
# .env files are picked up from project directory correctly on docker-compose 1.23.0+
|
||||||
docker-compose --file "${DOCKER_COMPOSE_PATH}" --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
|
docker-compose ${DOCKER_COMPOSES} --project-directory $(dirname "${DOCKER_COMPOSE_PATH}") up -d
|
||||||
|
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
|
@@ -1,17 +1,25 @@
|
|||||||
package org.alfresco.webdav;
|
package org.alfresco.webdav;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import org.alfresco.utility.data.DataContent;
|
import org.alfresco.utility.data.DataContent;
|
||||||
import org.alfresco.utility.data.DataSite;
|
import org.alfresco.utility.data.DataSite;
|
||||||
import org.alfresco.utility.data.DataUser;
|
import org.alfresco.utility.data.DataUser;
|
||||||
|
import org.alfresco.utility.LogFactory;
|
||||||
import org.alfresco.utility.network.ServerHealth;
|
import org.alfresco.utility.network.ServerHealth;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
|
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.testng.annotations.AfterMethod;
|
||||||
|
import org.testng.annotations.BeforeMethod;
|
||||||
import org.testng.annotations.BeforeSuite;
|
import org.testng.annotations.BeforeSuite;
|
||||||
|
|
||||||
@ContextConfiguration("classpath:alfresco-webdav-context.xml")
|
@ContextConfiguration("classpath:alfresco-webdav-context.xml")
|
||||||
public abstract class WebDavTest extends AbstractTestNGSpringContextTests
|
public abstract class WebDavTest extends AbstractTestNGSpringContextTests
|
||||||
{
|
{
|
||||||
|
private static final Logger LOG = LogFactory.getLogger();
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected DataSite dataSite;
|
protected DataSite dataSite;
|
||||||
|
|
||||||
@@ -36,4 +44,16 @@ public abstract class WebDavTest extends AbstractTestNGSpringContextTests
|
|||||||
// The webdav protocol is enabled by default.
|
// The webdav protocol is enabled by default.
|
||||||
//webDavProtocol.assertThat().protocolIsEnabled();
|
//webDavProtocol.assertThat().protocolIsEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BeforeMethod(alwaysRun=true)
|
||||||
|
public void showStartTestInfo(Method method)
|
||||||
|
{
|
||||||
|
LOG.info(String.format("*** STARTING Test: [%s] ***", method.getName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterMethod(alwaysRun=true)
|
||||||
|
public void showEndTestInfo(Method method)
|
||||||
|
{
|
||||||
|
LOG.info(String.format("*** ENDING Test: [%s] ***", method.getName()));
|
||||||
|
}
|
||||||
}
|
}
|
@@ -1,140 +0,0 @@
|
|||||||
/*
|
|
||||||
* #%L
|
|
||||||
* Alfresco Repository
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
|
||||||
* %%
|
|
||||||
* This file is part of the Alfresco software.
|
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
|
||||||
* the paid license agreement will prevail. Otherwise, the software is
|
|
||||||
* provided under the following open source license terms:
|
|
||||||
*
|
|
||||||
* Alfresco is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Alfresco is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.urlshortening;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.alfresco.service.cmr.urlshortening.UrlShortener;
|
|
||||||
import org.apache.commons.httpclient.HostConfiguration;
|
|
||||||
import org.apache.commons.httpclient.HttpClient;
|
|
||||||
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
|
|
||||||
import org.apache.commons.httpclient.NameValuePair;
|
|
||||||
import org.apache.commons.httpclient.methods.GetMethod;
|
|
||||||
import org.apache.commons.httpclient.protocol.Protocol;
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated as it is no longer used in the core repository code.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class BitlyUrlShortenerImpl implements UrlShortener
|
|
||||||
{
|
|
||||||
private static final Log log = LogFactory.getLog(BitlyUrlShortenerImpl.class);
|
|
||||||
|
|
||||||
private int urlLength = 20;
|
|
||||||
private String username;
|
|
||||||
private String apiKey = "R_ca15c6c89e9b25ccd170bafd209a0d4f";
|
|
||||||
private HttpClient httpClient;
|
|
||||||
|
|
||||||
public BitlyUrlShortenerImpl()
|
|
||||||
{
|
|
||||||
httpClient = new HttpClient();
|
|
||||||
httpClient.setHttpConnectionManager(new MultiThreadedHttpConnectionManager());
|
|
||||||
HostConfiguration hostConfiguration = new HostConfiguration();
|
|
||||||
hostConfiguration.setHost("api-ssl.bitly.com", 443, Protocol.getProtocol("https"));
|
|
||||||
httpClient.setHostConfiguration(hostConfiguration);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String shortenUrl(String longUrl)
|
|
||||||
{
|
|
||||||
if (log.isDebugEnabled())
|
|
||||||
{
|
|
||||||
log.debug("Shortening URL: " + longUrl);
|
|
||||||
}
|
|
||||||
String shortUrl = longUrl;
|
|
||||||
if (longUrl.length() > urlLength)
|
|
||||||
{
|
|
||||||
GetMethod getMethod = new GetMethod();
|
|
||||||
getMethod.setPath("/v3/shorten");
|
|
||||||
|
|
||||||
List<NameValuePair> args = new ArrayList<NameValuePair>();
|
|
||||||
args.add(new NameValuePair("login", username));
|
|
||||||
args.add(new NameValuePair("apiKey", apiKey));
|
|
||||||
args.add(new NameValuePair("longUrl", longUrl));
|
|
||||||
args.add(new NameValuePair("format", "txt"));
|
|
||||||
getMethod.setQueryString(args.toArray(new NameValuePair[args.size()]));
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
int resultCode = httpClient.executeMethod(getMethod);
|
|
||||||
if (resultCode == 200)
|
|
||||||
{
|
|
||||||
shortUrl = getMethod.getResponseBodyAsString();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
log.warn("Failed to shorten URL " + longUrl + " - response code == " + resultCode);
|
|
||||||
log.warn(getMethod.getResponseBodyAsString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
log.error("Failed to shorten URL " + longUrl, ex);
|
|
||||||
}
|
|
||||||
if (log.isDebugEnabled())
|
|
||||||
{
|
|
||||||
log.debug("URL " + longUrl + " has been shortened to " + shortUrl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return shortUrl.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int getUrlLength()
|
|
||||||
{
|
|
||||||
return urlLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param urlLength the urlLength to set
|
|
||||||
*/
|
|
||||||
public void setUrlLength(int urlLength)
|
|
||||||
{
|
|
||||||
this.urlLength = urlLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param username the username to set
|
|
||||||
*/
|
|
||||||
public void setUsername(String username)
|
|
||||||
{
|
|
||||||
this.username = username;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param apiKey the apiKey to set
|
|
||||||
*/
|
|
||||||
public void setApiKey(String apiKey)
|
|
||||||
{
|
|
||||||
this.apiKey = apiKey;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -813,13 +813,6 @@ solr6.store.mappings.value.solrMappingHistory.baseUrl=/solr/history
|
|||||||
solr6.store.mappings.value.solrMappingHistory.protocol=workspace
|
solr6.store.mappings.value.solrMappingHistory.protocol=workspace
|
||||||
solr6.store.mappings.value.solrMappingHistory.identifier=history
|
solr6.store.mappings.value.solrMappingHistory.identifier=history
|
||||||
|
|
||||||
#
|
|
||||||
# URL Shortening Properties
|
|
||||||
#
|
|
||||||
urlshortening.bitly.username=brianalfresco
|
|
||||||
urlshortening.bitly.api.key=R_ca15c6c89e9b25ccd170bafd209a0d4f
|
|
||||||
urlshortening.bitly.url.length=20
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bulk Filesystem Importer
|
# Bulk Filesystem Importer
|
||||||
#
|
#
|
||||||
|
@@ -83,7 +83,6 @@ import org.junit.runners.Suite;
|
|||||||
org.alfresco.repo.transfer.HttpClientTransmitterImplTest.class,
|
org.alfresco.repo.transfer.HttpClientTransmitterImplTest.class,
|
||||||
org.alfresco.repo.transfer.manifest.TransferManifestTest.class,
|
org.alfresco.repo.transfer.manifest.TransferManifestTest.class,
|
||||||
org.alfresco.repo.transfer.TransferVersionCheckerImplTest.class,
|
org.alfresco.repo.transfer.TransferVersionCheckerImplTest.class,
|
||||||
org.alfresco.repo.urlshortening.BitlyUrlShortenerTest.class,
|
|
||||||
org.alfresco.service.cmr.calendar.CalendarRecurrenceHelperTest.class,
|
org.alfresco.service.cmr.calendar.CalendarRecurrenceHelperTest.class,
|
||||||
org.alfresco.service.cmr.calendar.CalendarTimezoneHelperTest.class,
|
org.alfresco.service.cmr.calendar.CalendarTimezoneHelperTest.class,
|
||||||
org.alfresco.tools.RenameUserTest.class,
|
org.alfresco.tools.RenameUserTest.class,
|
||||||
|
@@ -1,59 +0,0 @@
|
|||||||
/*
|
|
||||||
* #%L
|
|
||||||
* Alfresco Repository
|
|
||||||
* %%
|
|
||||||
* Copyright (C) 2005 - 2016 Alfresco Software Limited
|
|
||||||
* %%
|
|
||||||
* This file is part of the Alfresco software.
|
|
||||||
* If the software was purchased under a paid Alfresco license, the terms of
|
|
||||||
* the paid license agreement will prevail. Otherwise, the software is
|
|
||||||
* provided under the following open source license terms:
|
|
||||||
*
|
|
||||||
* Alfresco is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Alfresco is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
* #L%
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.urlshortening;
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated as BitlyUrlShortenerImpl is no longer used in the core repository code.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public class BitlyUrlShortenerTest extends TestCase
|
|
||||||
{
|
|
||||||
private BitlyUrlShortenerImpl shortener;
|
|
||||||
|
|
||||||
public void testShorten()
|
|
||||||
{
|
|
||||||
String url = "http://www.alfresco.com/";
|
|
||||||
String shortUrl = shortener.shortenUrl(url);
|
|
||||||
assertNotNull(shortUrl);
|
|
||||||
assertFalse(shortUrl.isEmpty());
|
|
||||||
assertFalse(url.equals(shortUrl));
|
|
||||||
assertTrue(shortUrl.length() < url.length());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected void setUp() throws Exception
|
|
||||||
{
|
|
||||||
this.shortener = new BitlyUrlShortenerImpl();;
|
|
||||||
shortener.setApiKey("R_ca15c6c89e9b25ccd170bafd209a0d4f");
|
|
||||||
shortener.setUrlLength(20);
|
|
||||||
shortener.setUsername("brianalfresco");
|
|
||||||
}
|
|
||||||
}
|
|
28
scripts/ci/build.sh
Normal file
28
scripts/ci/build.sh
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "=========================== Starting Build Script ==========================="
|
||||||
|
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||||
|
set -vex
|
||||||
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||||
|
|
||||||
|
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
||||||
|
|
||||||
|
if [[ -n ${BUILD_PROFILES} ]]; then
|
||||||
|
PROFILES="${BUILD_PROFILES}"
|
||||||
|
elif [[ "${REQUIRES_LOCAL_IMAGES}" == "true" ]]; then
|
||||||
|
PROFILES="-Pbuild-docker-images -Pags"
|
||||||
|
else
|
||||||
|
PROFILES="-Pags"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${REQUIRES_INSTALLED_ARTIFACTS}" == "true" ]]; then
|
||||||
|
PHASE="install"
|
||||||
|
else
|
||||||
|
PHASE="package"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mvn -B -V $PHASE -DskipTests -Dmaven.javadoc.skip=true $PROFILES $BUILD_OPTIONS
|
||||||
|
|
||||||
|
popd
|
||||||
|
set +vex
|
||||||
|
echo "=========================== Finishing Build Script =========================="
|
||||||
|
|
@@ -2,18 +2,18 @@
|
|||||||
set +vx
|
set +vx
|
||||||
|
|
||||||
function isPullRequestBuild() {
|
function isPullRequestBuild() {
|
||||||
test "${TRAVIS_PULL_REQUEST}" != "false"
|
test "${PULL_REQUEST}" != "false"
|
||||||
}
|
}
|
||||||
|
|
||||||
function isBranchBuild() {
|
function isBranchBuild() {
|
||||||
test "${TRAVIS_PULL_REQUEST}" = "false"
|
test "${PULL_REQUEST}" = "false"
|
||||||
}
|
}
|
||||||
|
|
||||||
function cloneRepo() {
|
function cloneRepo() {
|
||||||
local REPO="${1}"
|
local REPO="${1}"
|
||||||
local TAG_OR_BRANCH="${2}"
|
local TAG_OR_BRANCH="${2}"
|
||||||
|
|
||||||
printf "Clonning \"%s\" on %s\n" "${TAG_OR_BRANCH}" "${REPO}"
|
printf "Cloning \"%s\" on %s\n" "${TAG_OR_BRANCH}" "${REPO}"
|
||||||
|
|
||||||
# clone the repository branch/tag
|
# clone the repository branch/tag
|
||||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" >/dev/null
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" >/dev/null
|
||||||
@@ -82,15 +82,9 @@ function remoteBranchExists() {
|
|||||||
function identifyUpstreamSourceBranch() {
|
function identifyUpstreamSourceBranch() {
|
||||||
local UPSTREAM_REPO="${1}"
|
local UPSTREAM_REPO="${1}"
|
||||||
|
|
||||||
# if it's a pull request, use the source branch name (if it exists)
|
|
||||||
if isPullRequestBuild && remoteBranchExists "${UPSTREAM_REPO}" "${TRAVIS_PULL_REQUEST_BRANCH}" ; then
|
|
||||||
echo "${TRAVIS_PULL_REQUEST_BRANCH}"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# otherwise use the current branch name (or in case of PRs, the target branch name)
|
# otherwise use the current branch name (or in case of PRs, the target branch name)
|
||||||
if remoteBranchExists "${UPSTREAM_REPO}" "${TRAVIS_BRANCH}" ; then
|
if remoteBranchExists "${UPSTREAM_REPO}" "${BRANCH_NAME}" ; then
|
||||||
echo "${TRAVIS_BRANCH}"
|
echo "${BRANCH_NAME}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
40
scripts/ci/docker-compose/docker-compose-db.yaml
Normal file
40
scripts/ci/docker-compose/docker-compose-db.yaml
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
profiles: ["postgres"]
|
||||||
|
image: postgres:${POSTGRES_VERSION}
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=alfresco
|
||||||
|
- POSTGRES_USER=alfresco
|
||||||
|
- POSTGRES_DB=alfresco
|
||||||
|
command: postgres -c max_connections=300
|
||||||
|
ports:
|
||||||
|
- "5433:5432"
|
||||||
|
mariadb:
|
||||||
|
profiles: ["mariadb"]
|
||||||
|
image: mariadb:${MARIADB_VERSION}
|
||||||
|
command: --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=alfresco
|
||||||
|
- MYSQL_USER=alfresco
|
||||||
|
- MYSQL_DATABASE=alfresco
|
||||||
|
- MYSQL_PASSWORD=alfresco
|
||||||
|
ports:
|
||||||
|
- "3307:3306"
|
||||||
|
mysql:
|
||||||
|
profiles: ["mysql"]
|
||||||
|
image: mysql:${MYSQL_VERSION}
|
||||||
|
command: --transaction-isolation='READ-COMMITTED'
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=alfresco
|
||||||
|
- MYSQL_USER=alfresco
|
||||||
|
- MYSQL_DATABASE=alfresco
|
||||||
|
- MYSQL_PASSWORD=alfresco
|
||||||
|
ports:
|
||||||
|
- "3307:3306"
|
||||||
|
activemq:
|
||||||
|
image: alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
||||||
|
ports:
|
||||||
|
- "5672:5672" # AMQP
|
||||||
|
- "61616:61616" # OpenWire
|
59
scripts/ci/docker-compose/docker-compose.yaml
Normal file
59
scripts/ci/docker-compose/docker-compose.yaml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
transform-core-aio:
|
||||||
|
profiles: ["with-transform-core-aio"]
|
||||||
|
image: alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
||||||
|
environment:
|
||||||
|
JAVA_OPTS: " -Xms256m -Xmx256m"
|
||||||
|
ports:
|
||||||
|
- "8090:8090"
|
||||||
|
postgres:
|
||||||
|
image: postgres:14.4
|
||||||
|
profiles: ["default", "with-transform-core-aio", "postgres", "with-mtls-transform-core-aio"]
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=alfresco
|
||||||
|
- POSTGRES_USER=alfresco
|
||||||
|
- POSTGRES_DB=alfresco
|
||||||
|
command: postgres -c max_connections=300
|
||||||
|
ports:
|
||||||
|
- "5433:5432"
|
||||||
|
activemq:
|
||||||
|
profiles: ["default", "with-transform-core-aio", "activemq", "with-mtls-transform-core-aio"]
|
||||||
|
image: alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
||||||
|
ports:
|
||||||
|
- "5672:5672" # AMQP
|
||||||
|
- "61616:61616" # OpenWire
|
||||||
|
mtls-transform-core-aio:
|
||||||
|
profiles: ["with-mtls-transform-core-aio"]
|
||||||
|
image: quay.io/alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
||||||
|
hostname: transform-core-aio
|
||||||
|
ports:
|
||||||
|
- 8090:8090
|
||||||
|
volumes:
|
||||||
|
- ${GITHUB_WORKSPACE}/keystores/tengineAIO/tengineAIO.truststore:/tengineAIO.truststore
|
||||||
|
- ${GITHUB_WORKSPACE}/keystores/tengineAIO/tengineAIO.keystore:/tengineAIO.keystore
|
||||||
|
environment:
|
||||||
|
ACTIVEMQ_URL: "nio://activemq:61616"
|
||||||
|
ACTIVEMQ_USER: "admin"
|
||||||
|
ACTIVEMQ_PASSWORD: "admin"
|
||||||
|
LOG_LEVEL: debug
|
||||||
|
|
||||||
|
SERVER_SSL_ENABLED: "true"
|
||||||
|
SERVER_SSL_KEY_PASSWORD: "password"
|
||||||
|
SERVER_SSL_KEY_STORE: "file:/tengineAIO.keystore"
|
||||||
|
SERVER_SSL_KEY_STORE_PASSWORD: "password"
|
||||||
|
SERVER_SSL_KEY_STORE_TYPE: "JCEKS"
|
||||||
|
|
||||||
|
SERVER_SSL_CLIENT_AUTH: "need"
|
||||||
|
SERVER_SSL_TRUST_STORE: "file:/tengineAIO.truststore"
|
||||||
|
SERVER_SSL_TRUST_STORE_PASSWORD: "password"
|
||||||
|
SERVER_SSL_TRUST_STORE_TYPE: "JCEKS"
|
||||||
|
|
||||||
|
CLIENT_SSL_KEY_STORE: "file:/tengineAIO.keystore"
|
||||||
|
CLIENT_SSL_KEY_STORE_PASSWORD: "password"
|
||||||
|
CLIENT_SSL_KEY_STORE_TYPE: "JCEKS"
|
||||||
|
|
||||||
|
CLIENT_SSL_TRUST_STORE: "file:/tengineAIO.truststore"
|
||||||
|
CLIENT_SSL_TRUST_STORE_PASSWORD: "password"
|
||||||
|
CLIENT_SSL_TRUST_STORE_TYPE: "JCEKS"
|
27
scripts/ci/generate_keystores.sh
Normal file
27
scripts/ci/generate_keystores.sh
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# SETTINGS
|
||||||
|
# Alfresco Format: "classic" / "current" is supported only from 7.0
|
||||||
|
ALFRESCO_FORMAT=current
|
||||||
|
|
||||||
|
#Contains directory settings
|
||||||
|
source ${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/utils.sh
|
||||||
|
|
||||||
|
# Cleanup previous output of script
|
||||||
|
rm -rd $CA_DIR
|
||||||
|
rm -rd $KEYSTORES_DIR
|
||||||
|
rm -rd $CERTIFICATES_DIR
|
||||||
|
|
||||||
|
# SETTINGS
|
||||||
|
# Alfresco Format: "classic" / "current" is supported only from 7.0
|
||||||
|
ALFRESCO_FORMAT=current
|
||||||
|
|
||||||
|
#CA
|
||||||
|
${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/run_ca.sh -keysize 2048 -keystorepass password -certdname "/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Custom Alfresco CA" -servername localhost -validityduration 1
|
||||||
|
#Alfresco
|
||||||
|
${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/run_additional.sh -servicename alfresco -rootcapass password -keysize 2048 -keystoretype JCEKS -keystorepass password -truststoretype JCEKS -truststorepass password -certdname "/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Custom Alfresco Repository" -servername localhost -alfrescoformat $ALFRESCO_FORMAT
|
||||||
|
#Alfresco Metadata encryption
|
||||||
|
${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/run_encryption.sh -subfoldername alfresco -servicename encryption -encstorepass mp6yc0UD9e -encmetadatapass oKIWzVdEdA -alfrescoformat $ALFRESCO_FORMAT
|
||||||
|
#T-Engine AIO
|
||||||
|
${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/run_additional.sh -servicename tengineAIO -rootcapass password -keysize 2048 -keystoretype JCEKS -keystorepass password -truststoretype JCEKS -truststorepass password -certdname "/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=T-Engine AIO" -servername localhost -alfrescoformat $ALFRESCO_FORMAT
|
@@ -5,7 +5,6 @@ set -vex
|
|||||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||||
|
|
||||||
# Maven Setup
|
# 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
|
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
|
||||||
|
|
||||||
# Docker Logins
|
# Docker Logins
|
@@ -4,23 +4,19 @@ PS4="\[\e[35m\]+ \[\e[m\]"
|
|||||||
set -vex
|
set -vex
|
||||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||||
|
|
||||||
|
|
||||||
# Use full history for release
|
# Use full history for release
|
||||||
git checkout -B "${TRAVIS_BRANCH}"
|
git checkout -B "${BRANCH_NAME}"
|
||||||
# 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
|
# Run the release plugin - with "[skip ci]" in the release commit message
|
||||||
mvn -B \
|
mvn -B \
|
||||||
-Pall-tas-tests \
|
-Pall-tas-tests \
|
||||||
-Pags \
|
-Pags \
|
||||||
"-Darguments=-Pall-tas-tests -Pags -DskipTests -Dbuild-number=${TRAVIS_BUILD_NUMBER}" \
|
"-Darguments=-Pall-tas-tests -Pags -DskipTests -Dbuild-number=${BUILD_NUMBER}" \
|
||||||
release:clean release:prepare release:perform \
|
release:clean release:prepare release:perform \
|
||||||
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
|
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
|
||||||
-Dusername="${GIT_USERNAME}" \
|
-Dusername="${GIT_USERNAME}" \
|
||||||
-Dpassword="${GIT_PASSWORD}"
|
-Dpassword="${GIT_PASSWORD}"
|
||||||
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
set +vex
|
set +vex
|
||||||
echo "=========================== Finishing Release Script =========================="
|
echo "=========================== Finishing Release Script =========================="
|
@@ -23,9 +23,7 @@ if [ $M2_REPO_EXPIRED -eq 1 ];then
|
|||||||
rm -rf "$M2_REPO_DIR"
|
rm -rf "$M2_REPO_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $M2_REPO_FILE_COUNT -lt 1000 ] || [ $ORG_ALFRESCO_M2_REPO_EXPIRED -eq 1 ] || [ $M2_REPO_EXPIRED -eq 1 ];then
|
echo "Verifying compilation and ensuring maven cache populated."
|
||||||
echo "Populating maven cache."
|
|
||||||
export BUILD_PROFILES="-Pall-tas-tests,ags"
|
export BUILD_PROFILES="-Pall-tas-tests,ags"
|
||||||
export BUILD_OPTIONS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dmaven.artifact.threads=8"
|
export BUILD_OPTIONS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dmaven.artifact.threads=8"
|
||||||
source "$(dirname "${BASH_SOURCE[0]}")/build.sh"
|
source "$(dirname "${BASH_SOURCE[0]}")/build.sh"
|
||||||
fi
|
|
15
scripts/ci/tests/AppContext05TestSuite-setup.sh
Normal file
15
scripts/ci/tests/AppContext05TestSuite-setup.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo "=========================== Starting AppContext05TestSuite setup ==========================="
|
||||||
|
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||||
|
set -vex
|
||||||
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../"
|
||||||
|
|
||||||
|
mkdir -p "${HOME}/tmp"
|
||||||
|
cp repository/src/test/resources/realms/alfresco-realm.json "${HOME}/tmp"
|
||||||
|
echo "HOST_IP=$(hostname -I | cut -f1 -d' ')" >> $GITHUB_ENV
|
||||||
|
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 alfresco/alfresco-identity-service:1.2
|
||||||
|
|
||||||
|
popd
|
||||||
|
set +vex
|
||||||
|
echo "=========================== Finishing AppContext05TestSuite setup =========================="
|
@@ -6,9 +6,9 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
|||||||
|
|
||||||
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
||||||
|
|
||||||
#Fetch the latest changes, as Travis will only checkout the PR commit
|
#Fetch the latest changes, as GHA will only checkout the PR commit
|
||||||
git fetch origin "${TRAVIS_BRANCH}"
|
git fetch origin "${BRANCH_NAME}"
|
||||||
git checkout "${TRAVIS_BRANCH}"
|
git checkout "${BRANCH_NAME}"
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
# Retrieve the current Community version - latest tag on the current branch
|
# Retrieve the current Community version - latest tag on the current branch
|
||||||
@@ -16,7 +16,7 @@ VERSION="$(git describe --abbrev=0 --tags)"
|
|||||||
|
|
||||||
DOWNSTREAM_REPO="github.com/Alfresco/alfresco-enterprise-repo.git"
|
DOWNSTREAM_REPO="github.com/Alfresco/alfresco-enterprise-repo.git"
|
||||||
|
|
||||||
cloneRepo "${DOWNSTREAM_REPO}" "${TRAVIS_BRANCH}"
|
cloneRepo "${DOWNSTREAM_REPO}" "${BRANCH_NAME}"
|
||||||
|
|
||||||
cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")"
|
cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")"
|
||||||
|
|
||||||
@@ -33,8 +33,8 @@ git status
|
|||||||
git --no-pager diff pom.xml
|
git --no-pager diff pom.xml
|
||||||
git add pom.xml
|
git add pom.xml
|
||||||
|
|
||||||
if [[ "${TRAVIS_COMMIT_MESSAGE}" =~ \[force[^\]]*\] ]]; then
|
if [[ "${COMMIT_MESSAGE}" =~ \[force[^\]]*\] ]]; then
|
||||||
FORCE_TOKEN=$(echo "${TRAVIS_COMMIT_MESSAGE}" | sed "s|^.*\(\[force[^]]*\]\).*$|\1|g")
|
FORCE_TOKEN=$(echo "${COMMIT_MESSAGE}" | sed "s|^.*\(\[force[^]]*\]\).*$|\1|g")
|
||||||
git commit --allow-empty -m "${FORCE_TOKEN} Update upstream version to ${VERSION}"
|
git commit --allow-empty -m "${FORCE_TOKEN} Update upstream version to ${VERSION}"
|
||||||
git push
|
git push
|
||||||
elif git status --untracked-files=no --porcelain | grep -q '^' ; then
|
elif git status --untracked-files=no --porcelain | grep -q '^' ; then
|
21
scripts/prepare_buildx.sh
Executable file
21
scripts/prepare_buildx.sh
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
BUILDER_NAME="${1}"
|
||||||
|
TARGET_REGISTRY="${2}"
|
||||||
|
TARGET_IMAGE="${3}"
|
||||||
|
IMAGE_TAG="${4}"
|
||||||
|
|
||||||
|
#Create a `docker-container` builder with host networking and required flags (quay.io)
|
||||||
|
docker --config target/docker/"${TARGET_REGISTRY}"/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
|
||||||
|
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
|
||||||
|
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
|
||||||
|
|
||||||
|
#Create a `docker-container` builder with host networking and required flags (docker.io)
|
||||||
|
docker --config target/docker/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
|
||||||
|
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
|
||||||
|
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
|
||||||
|
|
||||||
|
#Create a `docker-container` builder with host networking and required flags (local registry)
|
||||||
|
docker --config target/docker/127.0.0.1/5000/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
|
||||||
|
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
|
||||||
|
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
|
@@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
echo "=========================== Starting Build Script ==========================="
|
|
||||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
|
||||||
set -vex
|
|
||||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
|
||||||
|
|
||||||
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
|
||||||
|
|
||||||
|
|
||||||
# Build the current project if needed
|
|
||||||
if [[ -n ${REQUIRES_INSTALLED_ARTIFACTS} ]] || [[ -n ${REQUIRES_LOCAL_IMAGES} ]] || [[ -n ${BUILD_PROFILES} ]]; then
|
|
||||||
|
|
||||||
if [[ -n ${BUILD_PROFILES} ]]; then
|
|
||||||
PROFILES="${BUILD_PROFILES}"
|
|
||||||
else
|
|
||||||
if [[ "${REQUIRES_LOCAL_IMAGES}" == "true" ]]; then
|
|
||||||
PROFILES="-Pbuild-docker-images -Pags"
|
|
||||||
else
|
|
||||||
PROFILES="-Pags"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "${REQUIRES_INSTALLED_ARTIFACTS}" == "true" ]]; then
|
|
||||||
PHASE="install"
|
|
||||||
else
|
|
||||||
PHASE="package"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mvn -B -V $PHASE -DskipTests -Dmaven.javadoc.skip=true $PROFILES $BUILD_OPTIONS
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
popd
|
|
||||||
set +vex
|
|
||||||
echo "=========================== Finishing Build Script =========================="
|
|
||||||
|
|
@@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo "=========================== Starting SourceClear Script ==========================="
|
|
||||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
|
||||||
set +e -v -x
|
|
||||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
|
||||||
|
|
||||||
mvn -B -q clean install \
|
|
||||||
-DskipTests \
|
|
||||||
-Dmaven.javadoc.skip=true \
|
|
||||||
com.srcclr:srcclr-maven-plugin:scan \
|
|
||||||
-Dcom.srcclr.apiToken=${SRCCLR_API_TOKEN} > scan.log
|
|
||||||
|
|
||||||
SUCCESS=$? # this will read exit code of the previous command
|
|
||||||
|
|
||||||
if [ -z "$VERACODE_FAILS_BUILD" ] || [ "$VERACODE_FAILS_BUILD" = false ] ; then
|
|
||||||
SUCCESS=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat scan.log | grep -e 'Full Report Details' -e 'Failed'
|
|
||||||
|
|
||||||
popd
|
|
||||||
set +vex
|
|
||||||
echo "=========================== Finishing SourceClear Script =========================="
|
|
||||||
|
|
||||||
exit ${SUCCESS}
|
|
Reference in New Issue
Block a user