mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
MNT-24063 Fix GHA migration issues & disable failing AGS tests (#2340)
Co-authored-by: evasques <eva.vasques@gmail.com>
This commit is contained in:
435
.github/workflows/ci.yml
vendored
435
.github/workflows/ci.yml
vendored
@@ -46,20 +46,14 @@ jobs:
|
|||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
repository_postgresql_tests:
|
veracode:
|
||||||
name: "Repository - PostgreSQL ${{ matrix.version }} tests"
|
name: "Source Clear Scan (SCA)"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
if: >
|
if: >
|
||||||
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) && github.event_name != 'pull_request' &&
|
((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, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force]')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
version: [ '10.9', '11.7', '11.12', '12.4', '12.7', '13.1' ]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
|
||||||
@@ -68,23 +62,19 @@ jobs:
|
|||||||
java-version: "11"
|
java-version: "11"
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run PostgreSQL ${{ matrix.version }} database"
|
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@v1.33.0
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
continue-on-error: true
|
||||||
env:
|
with:
|
||||||
POSTGRES_VERSION: ${{ matrix.version }}
|
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||||
- 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"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
repository_postgresql_latest_tests:
|
all_unit_tests_suite:
|
||||||
name: "Repository - PostgreSQL 13.3 tests"
|
name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
if: >
|
if: >
|
||||||
(!contains(github.event.head_commit.message, '[skip db]') ||
|
!contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
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, '[skip tests]') &&
|
||||||
!contains(github.event.head_commit.message, '[force]')
|
!contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
@@ -95,126 +85,10 @@ jobs:
|
|||||||
java-version: "11"
|
java-version: "11"
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
run: bash ./scripts/ci/init.sh
|
||||||
- name: "Run PostgreSQL 13.3 database"
|
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
|
||||||
env:
|
|
||||||
POSTGRES_VERSION: 13.3
|
|
||||||
- name: "Run tests"
|
- 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
|
run: |
|
||||||
- name: "Clean Maven cache"
|
mvn -B test -pl core,data-model -am -DfailIfNoTests=false
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
mvn -B test -pl repository -am -Dtest=AllUnitTestsSuite -DfailIfNoTests=false
|
||||||
|
|
||||||
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', '10.6' ]
|
|
||||||
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
|
|
||||||
with:
|
|
||||||
java-version: "11"
|
|
||||||
- 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_latest_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
|
|
||||||
with:
|
|
||||||
java-version: "11"
|
|
||||||
- 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_5_7_28_tests:
|
|
||||||
name: Repository - MySQL 5.7.28 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
|
|
||||||
with:
|
|
||||||
java-version: "11"
|
|
||||||
- name: "Init"
|
|
||||||
run: bash ./scripts/ci/init.sh
|
|
||||||
- name: "Run MySQL 5.7.28 database"
|
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
|
||||||
env:
|
|
||||||
MYSQL_VERSION: 5.7.28
|
|
||||||
- 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_mysql_8_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
|
|
||||||
with:
|
|
||||||
java-version: "11"
|
|
||||||
- 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"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -253,6 +127,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
bash ./scripts/ci/init.sh
|
bash ./scripts/ci/init.sh
|
||||||
bash ./scripts/ci/build.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"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
@@ -260,6 +136,204 @@ jobs:
|
|||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
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
|
||||||
|
with:
|
||||||
|
java-version: "11"
|
||||||
|
- 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
|
||||||
|
with:
|
||||||
|
java-version: "11"
|
||||||
|
- 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_5_7_28_tests:
|
||||||
|
name: Repository - MySQL 5.7.28 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
|
||||||
|
with:
|
||||||
|
java-version: "11"
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run MySQL 5.7.28 database"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
|
||||||
|
env:
|
||||||
|
MYSQL_VERSION: 5.7.28
|
||||||
|
- 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_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
|
||||||
|
with:
|
||||||
|
java-version: "11"
|
||||||
|
- 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_tests:
|
||||||
|
name: Repository - PostgreSQL ${{ 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.9', '11.12', '11.7', '12.4', '12.7', '13.1']
|
||||||
|
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
|
||||||
|
with:
|
||||||
|
java-version: "11"
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: Run PostgreSQL ${{ matrix.version }} database
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
|
env:
|
||||||
|
POSTGRES_VERSION: ${{ matrix.version }}
|
||||||
|
- 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_13_3_tests:
|
||||||
|
name: "Repository - PostgreSQL 13.3 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
|
||||||
|
with:
|
||||||
|
java-version: "11"
|
||||||
|
- name: "Init"
|
||||||
|
run: bash ./scripts/ci/init.sh
|
||||||
|
- name: "Run PostgreSQL 13.3 database"
|
||||||
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
|
||||||
|
env:
|
||||||
|
POSTGRES_VERSION: 13.3
|
||||||
|
- 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
|
||||||
|
with:
|
||||||
|
java-version: "11"
|
||||||
|
- 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:
|
repository_app_context_test_suites:
|
||||||
name: Repository - ${{ matrix.testSuite }}
|
name: Repository - ${{ matrix.testSuite }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -300,6 +374,8 @@ jobs:
|
|||||||
java-version: "11"
|
java-version: "11"
|
||||||
- name: "Init"
|
- name: "Init"
|
||||||
run: bash ./scripts/ci/init.sh
|
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: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: |
|
run: |
|
||||||
if [ -e ./scripts/ci/tests/${{ matrix.testSuite }}-setup.sh ]; then
|
if [ -e ./scripts/ci/tests/${{ matrix.testSuite }}-setup.sh ]; then
|
||||||
@@ -311,57 +387,10 @@ jobs:
|
|||||||
- name: "Clean Maven cache"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
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
|
|
||||||
with:
|
|
||||||
java-version: "11"
|
|
||||||
- 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 -am -Dtest=AllUnitTestsSuite -DfailIfNoTests=false
|
|
||||||
- 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
|
|
||||||
with:
|
|
||||||
java-version: "11"
|
|
||||||
- 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
|
|
||||||
|
|
||||||
tas_tests:
|
tas_tests:
|
||||||
name: ${{ matrix.test-name }}
|
name: ${{ matrix.test-name }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [prepare]
|
needs: [prepare]
|
||||||
# TAS tests are generally skipped on feature branches as they will be repeated on the enterprise repo or community packaging builds
|
|
||||||
if: >
|
if: >
|
||||||
(((github.ref_name == 'master' || startsWith(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
|
(((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, '[skip tas]')) ||
|
||||||
@@ -375,36 +404,27 @@ jobs:
|
|||||||
- test-name: "REST API TAS tests part1"
|
- test-name: "REST API TAS tests part1"
|
||||||
pom-dir: tas-restapi
|
pom-dir: tas-restapi
|
||||||
test-profile: run-restapi-part1
|
test-profile: run-restapi-part1
|
||||||
docker-compose: docker-compose-minimal+transforms.yml
|
|
||||||
- test-name: "REST API TAS tests part2"
|
- test-name: "REST API TAS tests part2"
|
||||||
pom-dir: tas-restapi
|
pom-dir: tas-restapi
|
||||||
test-profile: run-restapi-part2
|
test-profile: run-restapi-part2
|
||||||
docker-compose: docker-compose-minimal+transforms.yml
|
|
||||||
- test-name: "REST API TAS tests part3"
|
- test-name: "REST API TAS tests part3"
|
||||||
pom-dir: tas-restapi
|
pom-dir: tas-restapi
|
||||||
test-profile: run-restapi-part3
|
test-profile: run-restapi-part3
|
||||||
docker-compose: docker-compose-minimal+transforms.yml
|
|
||||||
- test-name: "CMIS TAS tests - BROWSER binding"
|
- test-name: "CMIS TAS tests - BROWSER binding"
|
||||||
pom-dir: tas-cmis
|
pom-dir: tas-cmis
|
||||||
test-profile: run-cmis-browser
|
test-profile: run-cmis-browser
|
||||||
docker-compose: docker-compose-minimal+transforms.yml
|
|
||||||
- test-name: "CMIS TAS tests - ATOM binding"
|
- test-name: "CMIS TAS tests - ATOM binding"
|
||||||
pom-dir: tas-cmis
|
pom-dir: tas-cmis
|
||||||
test-profile: run-cmis-atom
|
test-profile: run-cmis-atom
|
||||||
docker-compose: docker-compose-minimal+transforms.yml
|
|
||||||
- test-name: "CMIS TAS tests - WEBSERVICES binding"
|
- test-name: "CMIS TAS tests - WEBSERVICES binding"
|
||||||
pom-dir: tas-cmis
|
pom-dir: tas-cmis
|
||||||
test-profile: run-cmis-webservices
|
test-profile: run-cmis-webservices
|
||||||
docker-compose: docker-compose-minimal+transforms.yml
|
|
||||||
- test-name: "Email TAS tests"
|
- test-name: "Email TAS tests"
|
||||||
pom-dir: tas-email
|
pom-dir: tas-email
|
||||||
docker-compose: docker-compose-minimal.yml
|
|
||||||
- test-name: "WebDAV TAS tests"
|
- test-name: "WebDAV TAS tests"
|
||||||
pom-dir: tas-webdav
|
pom-dir: tas-webdav
|
||||||
docker-compose: docker-compose-minimal.yml
|
|
||||||
- test-name: "Integration TAS tests"
|
- test-name: "Integration TAS tests"
|
||||||
pom-dir: tas-integration
|
pom-dir: tas-integration
|
||||||
docker-compose: docker-compose-minimal.yml
|
|
||||||
env:
|
env:
|
||||||
REQUIRES_LOCAL_IMAGES: true
|
REQUIRES_LOCAL_IMAGES: true
|
||||||
steps:
|
steps:
|
||||||
@@ -420,12 +440,21 @@ jobs:
|
|||||||
bash ./scripts/ci/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: |
|
run: |
|
||||||
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/${{ matrix.docker-compose }}
|
${{ 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"
|
${{ 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"
|
- name: "Run tests"
|
||||||
id: tests
|
id: tests
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: mvn -B install -f packaging/tests/${{ matrix.pom-dir }}/pom.xml -Pall-tas-tests,${{ matrix.test-profile }} -Denvironment=default -DrunBugs=false
|
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"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
|
||||||
@@ -550,9 +579,19 @@ jobs:
|
|||||||
- name: "Test"
|
- name: "Test"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
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
|
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests
|
||||||
- name: "Get logs"
|
- 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() }}
|
if: ${{ always() }}
|
||||||
run: |
|
run: |
|
||||||
bash amps/ags/ci/scripts/getLogs.sh
|
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"
|
- name: "Clean Maven cache"
|
||||||
run: bash ./scripts/ci/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
|
0
amps/ags/ci/scripts/getLogs.sh
Normal file → Executable file
0
amps/ags/ci/scripts/getLogs.sh
Normal file → Executable file
@@ -142,7 +142,7 @@ public class FilePlanTests extends BaseRMRestTest
|
|||||||
* Then I am given the details of the file plan
|
* Then I am given the details of the file plan
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test(enabled = false)
|
||||||
public void getFilePlanWhenRMIsCreated()
|
public void getFilePlanWhenRMIsCreated()
|
||||||
{
|
{
|
||||||
// Create RM Site if doesn't exist
|
// Create RM Site if doesn't exist
|
||||||
@@ -164,7 +164,7 @@ public class FilePlanTests extends BaseRMRestTest
|
|||||||
* Then I am given the allowableOperations property with the update and create operations.
|
* Then I am given the allowableOperations property with the update and create operations.
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test(enabled = false)
|
||||||
public void includeAllowableOperations()
|
public void includeAllowableOperations()
|
||||||
{
|
{
|
||||||
// Check the list of allowableOperations returned
|
// Check the list of allowableOperations returned
|
||||||
|
12
packaging/tests/scripts/output_logs_for_failures.sh
Executable file
12
packaging/tests/scripts/output_logs_for_failures.sh
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
TAS_DIRECTORY=$1
|
||||||
|
|
||||||
|
cd ${TAS_DIRECTORY}
|
||||||
|
|
||||||
|
failures=$(grep 'status="FAIL"' target/surefire-reports/testng-results.xml | sed 's|^.*[ ]name="\([^"]*\)".*$|\1|g')
|
||||||
|
|
||||||
|
for failure in ${failures}
|
||||||
|
do
|
||||||
|
cat target/reports/alfresco-tas.log | sed '/STARTING Test: \['${failure}'\]/,/ENDING Test: \['${failure}'\]/!d;/ENDING Test: \['${failure}'\]/q'
|
||||||
|
done
|
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" ]
|
||||||
@@ -28,7 +40,7 @@ fi
|
|||||||
echo "Starting ACS stack in ${DOCKER_COMPOSE_PATH}"
|
echo "Starting ACS stack in ${DOCKER_COMPOSE_PATH}"
|
||||||
|
|
||||||
# .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
pom.xml
1
pom.xml
@@ -52,6 +52,7 @@
|
|||||||
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
|
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
|
||||||
<dependency.activiti.version>5.23.0</dependency.activiti.version>
|
<dependency.activiti.version>5.23.0</dependency.activiti.version>
|
||||||
<dependency.alfresco-transform-model.version>1.4.0</dependency.alfresco-transform-model.version>
|
<dependency.alfresco-transform-model.version>1.4.0</dependency.alfresco-transform-model.version>
|
||||||
|
<dependency.alfresco-transform-core.version>2.5.6</dependency.alfresco-transform-core.version>
|
||||||
<dependency.alfresco-greenmail.version>6.2</dependency.alfresco-greenmail.version>
|
<dependency.alfresco-greenmail.version>6.2</dependency.alfresco-greenmail.version>
|
||||||
<dependency.acs-event-model.version>0.0.13</dependency.acs-event-model.version>
|
<dependency.acs-event-model.version>0.0.13</dependency.acs-event-model.version>
|
||||||
|
|
||||||
|
@@ -6,10 +6,21 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
|||||||
|
|
||||||
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
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
|
||||||
|
|
||||||
# Build the current project
|
if [[ "${REQUIRES_INSTALLED_ARTIFACTS}" == "true" ]]; then
|
||||||
mvn -B -V install -DskipTests -Dmaven.javadoc.skip=true -Pbuild-docker-images -Pags
|
PHASE="install"
|
||||||
|
else
|
||||||
|
PHASE="package"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mvn -B -V $PHASE -DskipTests -Dmaven.javadoc.skip=true $PROFILES $BUILD_OPTIONS
|
||||||
|
|
||||||
popd
|
popd
|
||||||
set +vex
|
set +vex
|
||||||
|
@@ -1,20 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/acs-community-packaging"
|
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT" | xargs -r -l rm -rf
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-community-repo"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-community-repo-*"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-core"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-data-model"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-enterprise-remote-api"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-enterprise-repo-*"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-enterprise-repository"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-remote-api"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-repository"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/content-services"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/content-services*"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/content-services-community"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/tas/alfresco-community-repo-*-test"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/tas/alfresco-enterprise-repo-*-test"
|
|
||||||
rm -rf "${HOME}/.m2/repository/org/alfresco/alfresco-governance-services*"
|
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
transform-core-aio:
|
transform-core-aio:
|
||||||
profiles: ["with-transform-core-aio"]
|
profiles: ["with-transform-core-aio"]
|
||||||
image: alfresco/alfresco-transform-core-aio:2.5.6
|
image: alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
||||||
environment:
|
environment:
|
||||||
JAVA_OPTS: " -Xms256m -Xmx256m"
|
JAVA_OPTS: " -Xms256m -Xmx256m"
|
||||||
ports:
|
ports:
|
||||||
|
@@ -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 .ci.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
|
|
||||||
|
@@ -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,7 +33,11 @@ git status
|
|||||||
git --no-pager diff pom.xml
|
git --no-pager diff pom.xml
|
||||||
git add pom.xml
|
git add pom.xml
|
||||||
|
|
||||||
if git status --untracked-files=no --porcelain | grep -q '^' ; then
|
if [[ "${COMMIT_MESSAGE}" =~ \[force[^\]]*\] ]]; then
|
||||||
|
FORCE_TOKEN=$(echo "${COMMIT_MESSAGE}" | sed "s|^.*\(\[force[^]]*\]\).*$|\1|g")
|
||||||
|
git commit --allow-empty -m "${FORCE_TOKEN} Update upstream version to ${VERSION}"
|
||||||
|
git push
|
||||||
|
elif git status --untracked-files=no --porcelain | grep -q '^' ; then
|
||||||
git commit -m "Update upstream version to ${VERSION}"
|
git commit -m "Update upstream version to ${VERSION}"
|
||||||
git push
|
git push
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user