mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
ACS-3465 Add AGS-Community-Rest-API-Tests, Push-to-Nexus, Update-downstream jobs
ACS-3465 Test AGS-Community-Rest-API-Tests ACS-3465 Test AGS-Community-Rest-API-Tests ACS-3465 Test script execution ACS-3465 Increase SearchRecordsTests timeout ACS-3465 Make a script executable ACS-3465 Test script execution ACS-3465 Fix build step in AGS-Community-Rest-API-Tests ACS-3465 Test AGS-Community-Rest-API-Tests ACS-3465 Test AGS-Community-Rest-API-Tests ACS-3465 Test AGS-Community-Rest-API-Tests
This commit is contained in:
558
.github/workflows/ci.yml
vendored
558
.github/workflows/ci.yml
vendored
@@ -19,36 +19,325 @@ env:
|
|||||||
JAVA_VERSION: "17"
|
JAVA_VERSION: "17"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
# prepare:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Clean cache"
|
||||||
|
# run: bash ./scripts/travis/cleanup_cache.sh
|
||||||
|
# - name: "Prepare environment"
|
||||||
|
# run: bash ./scripts/travis/prepare.sh
|
||||||
|
|
||||||
|
# veracode:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# if: >
|
||||||
|
# (github.ref_name == 'master' || contains(github.ref_name, 'release')) &&
|
||||||
|
# ! contains(github.event.head_commit.message, '[skip build]')
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - run: mkdir -p $HOME/.m2
|
||||||
|
# - run: cp .travis.settings.xml $HOME/.m2
|
||||||
|
# - uses: Alfresco/alfresco-build-tools/.github/actions/veracode@master
|
||||||
|
# with:
|
||||||
|
# srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
||||||
|
#
|
||||||
|
# AllUnitTestsSuite:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Login to Quay.io"
|
||||||
|
# uses: docker/login-action@v1
|
||||||
|
# with:
|
||||||
|
# registry: quay.io
|
||||||
|
# username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
# password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
# - name: "Set up Java"
|
||||||
|
# uses: actions/setup-java@v3
|
||||||
|
# with:
|
||||||
|
# java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
# distribution: "temurin"
|
||||||
|
# cache: "maven"
|
||||||
|
# - name: "test"
|
||||||
|
# run: mvn --settings .travis.settings.xml --file pom.xml -B test -pl core,data-model -am -DfailIfNoTests=false
|
||||||
|
# - name: "test2"
|
||||||
|
# run: mvn --settings .travis.settings.xml --file pom.xml -B test -pl "repository,mmt" -am "-Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite" -DfailIfNoTests=false
|
||||||
|
#
|
||||||
|
# Repository-AppContext01TestSuite:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Login to Quay.io"
|
||||||
|
# uses: docker/login-action@v1
|
||||||
|
# with:
|
||||||
|
# registry: quay.io
|
||||||
|
# username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
# password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
# - name: "Set up Java"
|
||||||
|
# uses: actions/setup-java@v3
|
||||||
|
# with:
|
||||||
|
# java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
# distribution: "temurin"
|
||||||
|
# cache: "maven"
|
||||||
|
# - name: "Get Transformers tag"
|
||||||
|
# run: |
|
||||||
|
# echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||||
|
# - name: "docker build 1"
|
||||||
|
# run: 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'
|
||||||
|
# - name: "docker build 2"
|
||||||
|
# run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
||||||
|
# - name: "docker build 3"
|
||||||
|
# run: docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${{ env.TRANSFORMERS_TAG }}
|
||||||
|
# - name: "Run tests"
|
||||||
|
# run: mvn --settings .travis.settings.xml --file pom.xml -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
|
||||||
|
#
|
||||||
|
# Repository-AppContext05TestSuite:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Login to Quay.io"
|
||||||
|
# uses: docker/login-action@v1
|
||||||
|
# with:
|
||||||
|
# registry: quay.io
|
||||||
|
# username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
# password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
# - name: "Set up Java"
|
||||||
|
# uses: actions/setup-java@v3
|
||||||
|
# with:
|
||||||
|
# java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
# distribution: "temurin"
|
||||||
|
# cache: "maven"
|
||||||
|
# - name: "docker build 1"
|
||||||
|
# run: 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'
|
||||||
|
# - name: "docker build 2"
|
||||||
|
# run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
||||||
|
# - name: "make folder"
|
||||||
|
# run: mkdir -p "${HOME}/tmp"
|
||||||
|
# - name: "copy file"
|
||||||
|
# run: cp repository/src/test/resources/realms/alfresco-realm.json "${HOME}/tmp"
|
||||||
|
# - name: "set HOST_IP"
|
||||||
|
# run: |
|
||||||
|
# echo "HOST_IP=$(hostname -I | cut -f1 -d' ')" >> $GITHUB_ENV
|
||||||
|
# - name: "docker build 3"
|
||||||
|
# run: 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
|
||||||
|
# - name: "Run tests"
|
||||||
|
# run: mvn --settings .travis.settings.xml --file pom.xml -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://${{ env.HOST_IP }}:8999/auth"
|
||||||
|
#
|
||||||
|
# Repository-SearchTestSuite:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Login to Quay.io"
|
||||||
|
# uses: docker/login-action@v1
|
||||||
|
# with:
|
||||||
|
# registry: quay.io
|
||||||
|
# username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
# password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
# - name: "Set up Java"
|
||||||
|
# uses: actions/setup-java@v3
|
||||||
|
# with:
|
||||||
|
# java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
# distribution: "temurin"
|
||||||
|
# cache: "maven"
|
||||||
|
# - name: "docker build 1"
|
||||||
|
# run: 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'
|
||||||
|
# - name: "docker build 2"
|
||||||
|
# run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
||||||
|
# - name: "Run tests"
|
||||||
|
# run: mvn --settings .travis.settings.xml --file pom.xml -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
|
||||||
|
#
|
||||||
|
# Repository-MariaDB10-2-18-tests:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Login to Quay.io"
|
||||||
|
# uses: docker/login-action@v1
|
||||||
|
# with:
|
||||||
|
# registry: quay.io
|
||||||
|
# username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
# password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
# - name: "Set up Java"
|
||||||
|
# uses: actions/setup-java@v3
|
||||||
|
# with:
|
||||||
|
# java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
# distribution: "temurin"
|
||||||
|
# cache: "maven"
|
||||||
|
# - name: "docker build 1"
|
||||||
|
# run: 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
|
||||||
|
# - name: "docker build 2"
|
||||||
|
# run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
||||||
|
# - name: "Run tests"
|
||||||
|
# run: mvn --settings .travis.settings.xml --file pom.xml -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
|
||||||
|
#
|
||||||
|
# Remote-api-AppContext01TestSuite:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Login to Quay.io"
|
||||||
|
# uses: docker/login-action@v1
|
||||||
|
# with:
|
||||||
|
# registry: quay.io
|
||||||
|
# username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
# password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
# - name: "Set up Java"
|
||||||
|
# uses: actions/setup-java@v3
|
||||||
|
# with:
|
||||||
|
# java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
# distribution: "temurin"
|
||||||
|
# cache: "maven"
|
||||||
|
# - name: "docker build 1"
|
||||||
|
# run: 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'
|
||||||
|
# - name: "docker build 2"
|
||||||
|
# run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
||||||
|
# - name: "Run tests"
|
||||||
|
# run: mvn --settings .travis.settings.xml --file pom.xml -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
|
||||||
|
#
|
||||||
|
# REST-API-TAS-tests-part1:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Login to Quay.io"
|
||||||
|
# uses: docker/login-action@v1
|
||||||
|
# with:
|
||||||
|
# registry: quay.io
|
||||||
|
# username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
# password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
# - name: "Set up Java"
|
||||||
|
# uses: actions/setup-java@v3
|
||||||
|
# with:
|
||||||
|
# java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
# distribution: "temurin"
|
||||||
|
# cache: "maven"
|
||||||
|
# - name: "init"
|
||||||
|
# run: bash ./scripts/travis/init.sh
|
||||||
|
# - name: "Set REQUIRES_LOCAL_IMAGES"
|
||||||
|
# run: |
|
||||||
|
# echo "REQUIRES_LOCAL_IMAGES=true" >> $GITHUB_ENV
|
||||||
|
# - name: "build"
|
||||||
|
# timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
# run: bash ./scripts/travis/build.sh
|
||||||
|
# - name: "env1"
|
||||||
|
# run: ${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
|
||||||
|
# - name: "env2"
|
||||||
|
# run: ${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
||||||
|
# - name: "Run tests"
|
||||||
|
# timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
# run: mvn --settings .travis.settings.xml --file packaging/tests/tas-restapi/pom.xml -B verify -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
|
||||||
|
#
|
||||||
|
# AGS-Unit-And_Integration-Tests-01-PostgreSQL:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs:
|
||||||
|
# - prepare
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
# - name: "Login to Quay.io"
|
||||||
|
# uses: docker/login-action@v1
|
||||||
|
# with:
|
||||||
|
# registry: quay.io
|
||||||
|
# username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
# password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
# - name: "Set up Java"
|
||||||
|
# uses: actions/setup-java@v3
|
||||||
|
# with:
|
||||||
|
# java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
# distribution: "temurin"
|
||||||
|
# cache: "maven"
|
||||||
|
# - name: "init"
|
||||||
|
# run: bash ./scripts/travis/init.sh
|
||||||
|
# - name: "Set REQUIRES_LOCAL_IMAGES"
|
||||||
|
# run: |
|
||||||
|
# echo "REQUIRES_LOCAL_IMAGES=true" >> $GITHUB_ENV
|
||||||
|
# - name: "build"
|
||||||
|
# timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
# run: bash ./scripts/travis/build.sh
|
||||||
|
# - name: "verify"
|
||||||
|
# timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
# run: mvn --settings .travis.settings.xml --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt1 ${LOG_WARN}
|
||||||
|
|
||||||
|
AGS-Community-Rest-API-Tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: >
|
||||||
|
(github.ref_name == 'master' || contains(github.ref_name, 'release/') || contains(github.event.head_commit.message, '[ags]') &&
|
||||||
|
! contains(github.event.head_commit.message, '[skip ags]')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: "Clean cache"
|
- name: "Login to Docker Hub"
|
||||||
run: bash ./scripts/travis/cleanup_cache.sh
|
uses: docker/login-action@v1
|
||||||
- name: "Prepare environment"
|
with:
|
||||||
run: bash ./scripts/travis/prepare.sh
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
- name: "Login to Quay.io"
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: quay.io
|
||||||
|
username: ${{ secrets.QUAY_USERNAME }}
|
||||||
|
password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
|
- name: "Set up Java"
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: ${{ env.JAVA_VERSION }}
|
||||||
|
distribution: "temurin"
|
||||||
|
cache: "maven"
|
||||||
|
- name: "build"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: bash ./scripts/travis/build.sh
|
||||||
|
env:
|
||||||
|
REQUIRES_LOCAL_IMAGES: true
|
||||||
|
- name: "env1"
|
||||||
|
run: ${{ env.TAS_SCRIPTS }}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
|
||||||
|
- name: "env2"
|
||||||
|
run: ${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
|
||||||
|
- name: "test"
|
||||||
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
|
run: mvn --settings .travis.settings.xml -B test -pl :alfresco-governance-services-automation-community-rest-api -am -DfailIfNoTests=false -Dskip.automationtests=false -Pags
|
||||||
|
- run: bash amps/ags/travis/scripts/getLogs.sh
|
||||||
|
if: ${{ always() }}
|
||||||
|
- run: mkdir -p deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests
|
||||||
|
if: ${{ always() }}
|
||||||
|
- run: mv "alfresco.log" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
|
||||||
|
if: ${{ always() }}
|
||||||
|
- run: mv "solr.log" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
|
||||||
|
if: ${{ always() }}
|
||||||
|
- run: mv "./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
|
||||||
|
if: ${{ always() }}
|
||||||
|
- 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 build artifacts to Amazon S3"
|
||||||
|
if: ${{ always() }}
|
||||||
|
run: aws s3 cp --recursive ./deploy_dir s3://ags-travis-artifacts
|
||||||
|
|
||||||
veracode:
|
Push-to-Nexus:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
if: >
|
if: >
|
||||||
(github.ref_name == 'master' || contains(github.ref_name, 'release')) &&
|
(github.ref_name == 'master' || contains(github.ref_name, 'release/')) &&
|
||||||
! contains(github.event.head_commit.message, '[skip build]')
|
github.event_name != 'pull_request' &&
|
||||||
|
! contains(github.event.head_commit.message, '[no release]')
|
||||||
|
needs:
|
||||||
|
- AGS-Community-Rest-API-Tests
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: mkdir -p $HOME/.m2
|
- run: mkdir -p $HOME/.m2
|
||||||
- run: cp .travis.settings.xml $HOME/.m2
|
- run: cp .travis.settings.xml $HOME/.m2
|
||||||
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@master
|
|
||||||
with:
|
|
||||||
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
|
|
||||||
|
|
||||||
AllUnitTestsSuite:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: "Login to Quay.io"
|
- name: "Login to Quay.io"
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
@@ -61,210 +350,33 @@ jobs:
|
|||||||
java-version: ${{ env.JAVA_VERSION }}
|
java-version: ${{ env.JAVA_VERSION }}
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
cache: "maven"
|
cache: "maven"
|
||||||
- name: "test"
|
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.12.0
|
||||||
run: mvn --settings .travis.settings.xml --file pom.xml -B test -pl core,data-model -am -DfailIfNoTests=false
|
with:
|
||||||
- name: "test2"
|
username: ${{ secrets.BOT_GITHUB_USERNAME }}
|
||||||
run: mvn --settings .travis.settings.xml --file pom.xml -B test -pl "repository,mmt" -am "-Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite" -DfailIfNoTests=false
|
email: ${{ secrets.BOT_GITHUB_EMAIL }}
|
||||||
|
- name: "Verify release tag"
|
||||||
Repository-AppContext01TestSuite:
|
run: bash ./scripts/travis/verify_release_tag.sh
|
||||||
|
- name: "Release"
|
||||||
|
run: bash ./scripts/gh-actions/maven_release.sh
|
||||||
|
env:
|
||||||
|
BUILD_NUMBER: ${{ github.run_number }}
|
||||||
|
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
|
||||||
|
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_PASSWORD }}
|
||||||
|
Update-downstream:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: >
|
||||||
|
(github.ref_name == 'master' || contains(github.ref_name, 'release/')) &&
|
||||||
|
github.event_name != 'pull_request' &&
|
||||||
|
! contains(github.event.head_commit.message, '[no downstream]')
|
||||||
needs:
|
needs:
|
||||||
- prepare
|
- AGS-Community-Rest-API-Tests
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: "Login to Quay.io"
|
- run: mkdir -p $HOME/.m2
|
||||||
uses: docker/login-action@v1
|
- run: cp .travis.settings.xml $HOME/.m2
|
||||||
with:
|
- run: bash ./scripts/gh-actions/update_downstream.sh
|
||||||
registry: quay.io
|
env:
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
BRANCH: ${{ github.ref_name }}
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
||||||
- name: "Set up Java"
|
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
|
||||||
uses: actions/setup-java@v3
|
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_PASSWORD }}
|
||||||
with:
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
distribution: "temurin"
|
|
||||||
cache: "maven"
|
|
||||||
- name: "Get Transformers tag"
|
|
||||||
run: |
|
|
||||||
echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
|
||||||
- name: "docker build 1"
|
|
||||||
run: 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'
|
|
||||||
- name: "docker build 2"
|
|
||||||
run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- name: "docker build 3"
|
|
||||||
run: docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:${{ env.TRANSFORMERS_TAG }}
|
|
||||||
- name: "Run tests"
|
|
||||||
run: mvn --settings .travis.settings.xml --file pom.xml -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
|
|
||||||
|
|
||||||
Repository-AppContext05TestSuite:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: "Login to Quay.io"
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
|
||||||
- name: "Set up Java"
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
distribution: "temurin"
|
|
||||||
cache: "maven"
|
|
||||||
- name: "docker build 1"
|
|
||||||
run: 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'
|
|
||||||
- name: "docker build 2"
|
|
||||||
run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- name: "make folder"
|
|
||||||
run: mkdir -p "${HOME}/tmp"
|
|
||||||
- name: "copy file"
|
|
||||||
run: cp repository/src/test/resources/realms/alfresco-realm.json "${HOME}/tmp"
|
|
||||||
- name: "set HOST_IP"
|
|
||||||
run: |
|
|
||||||
echo "HOST_IP=$(hostname -I | cut -f1 -d' ')" >> $GITHUB_ENV
|
|
||||||
- name: "docker build 3"
|
|
||||||
run: 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
|
|
||||||
- name: "Run tests"
|
|
||||||
run: mvn --settings .travis.settings.xml --file pom.xml -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://${{ env.HOST_IP }}:8999/auth"
|
|
||||||
|
|
||||||
Repository-SearchTestSuite:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: "Login to Quay.io"
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
|
||||||
- name: "Set up Java"
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
distribution: "temurin"
|
|
||||||
cache: "maven"
|
|
||||||
- name: "docker build 1"
|
|
||||||
run: 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'
|
|
||||||
- name: "docker build 2"
|
|
||||||
run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- name: "Run tests"
|
|
||||||
run: mvn --settings .travis.settings.xml --file pom.xml -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
|
|
||||||
|
|
||||||
Repository-MariaDB10-2-18-tests:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: "Login to Quay.io"
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
|
||||||
- name: "Set up Java"
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
distribution: "temurin"
|
|
||||||
cache: "maven"
|
|
||||||
- name: "docker build 1"
|
|
||||||
run: 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
|
|
||||||
- name: "docker build 2"
|
|
||||||
run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- name: "Run tests"
|
|
||||||
run: mvn --settings .travis.settings.xml --file pom.xml -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
|
|
||||||
|
|
||||||
Remote-api-AppContext01TestSuite:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: "Login to Quay.io"
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
|
||||||
- name: "Set up Java"
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
distribution: "temurin"
|
|
||||||
cache: "maven"
|
|
||||||
- name: "docker build 1"
|
|
||||||
run: 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'
|
|
||||||
- name: "docker build 2"
|
|
||||||
run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
|
||||||
- name: "Run tests"
|
|
||||||
run: mvn --settings .travis.settings.xml --file pom.xml -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
|
|
||||||
|
|
||||||
REST-API-TAS-tests-part1:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: "Login to Quay.io"
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
|
||||||
- name: "Set up Java"
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
distribution: "temurin"
|
|
||||||
cache: "maven"
|
|
||||||
- name: "init"
|
|
||||||
run: bash ./scripts/travis/init.sh
|
|
||||||
- name: "Set REQUIRES_LOCAL_IMAGES"
|
|
||||||
run: |
|
|
||||||
echo "REQUIRES_LOCAL_IMAGES=true" >> $GITHUB_ENV
|
|
||||||
- name: "build"
|
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
|
||||||
run: bash ./scripts/travis/build.sh
|
|
||||||
- name: "env1"
|
|
||||||
run: ${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
|
|
||||||
- name: "env2"
|
|
||||||
run: ${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
|
|
||||||
- name: "Run tests"
|
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
|
||||||
run: mvn --settings .travis.settings.xml --file packaging/tests/tas-restapi/pom.xml -B verify -Pall-tas-tests,run-restapi-part1 -Denvironment=default -DrunBugs=false
|
|
||||||
|
|
||||||
AGS-Unit-And_Integration-Tests-01-PostgreSQL:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- prepare
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: "Login to Quay.io"
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
|
||||||
- name: "Set up Java"
|
|
||||||
uses: actions/setup-java@v3
|
|
||||||
with:
|
|
||||||
java-version: ${{ env.JAVA_VERSION }}
|
|
||||||
distribution: "temurin"
|
|
||||||
cache: "maven"
|
|
||||||
- name: "init"
|
|
||||||
run: bash ./scripts/travis/init.sh
|
|
||||||
- name: "Set REQUIRES_LOCAL_IMAGES"
|
|
||||||
run: |
|
|
||||||
echo "REQUIRES_LOCAL_IMAGES=true" >> $GITHUB_ENV
|
|
||||||
- name: "build"
|
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
|
||||||
run: bash ./scripts/travis/build.sh
|
|
||||||
- name: "verify"
|
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
|
||||||
run: mvn --settings .travis.settings.xml --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt1 ${LOG_WARN}
|
|
20
scripts/gh-actions/build_functions.sh
Normal file
20
scripts/gh-actions/build_functions.sh
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set +vx
|
||||||
|
|
||||||
|
function cloneRepo() {
|
||||||
|
local REPO="${1}"
|
||||||
|
local TAG_OR_BRANCH="${2}"
|
||||||
|
|
||||||
|
printf "Clonning \"%s\" on %s\n" "${TAG_OR_BRANCH}" "${REPO}"
|
||||||
|
|
||||||
|
# clone the repository branch/tag
|
||||||
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" >/dev/null
|
||||||
|
|
||||||
|
rm -rf "$(basename "${REPO%.git}")"
|
||||||
|
|
||||||
|
git clone -b "${TAG_OR_BRANCH}" --depth=1 "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}"
|
||||||
|
|
||||||
|
popd >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
set -vx
|
20
scripts/gh-actions/maven_release.sh
Executable file
20
scripts/gh-actions/maven_release.sh
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "=========================== Starting Release Script ==========================="
|
||||||
|
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||||
|
set -vex
|
||||||
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||||
|
|
||||||
|
# Run the release plugin - with "[skip ci]" in the release commit message
|
||||||
|
mvn -B \
|
||||||
|
-Pall-tas-tests \
|
||||||
|
-Pags \
|
||||||
|
"-Darguments=-Pall-tas-tests -Pags -DskipTests -Dbuild-number=${BUILD_NUMBER}" \
|
||||||
|
release:clean release:prepare release:perform \
|
||||||
|
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
|
||||||
|
-Dusername="${GIT_USERNAME}" \
|
||||||
|
-Dpassword="${GIT_PASSWORD}"
|
||||||
|
|
||||||
|
popd
|
||||||
|
set +vex
|
||||||
|
echo "=========================== Finishing Release Script =========================="
|
||||||
|
|
52
scripts/gh-actions/update_downstream.sh
Normal file
52
scripts/gh-actions/update_downstream.sh
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "=========================== Starting Update Downstream Script ==========================="
|
||||||
|
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||||
|
set -vex
|
||||||
|
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||||
|
|
||||||
|
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
||||||
|
|
||||||
|
#Fetch the latest changes, as Travis will only checkout the PR commit
|
||||||
|
git fetch origin "${BRANCH}"
|
||||||
|
git checkout "${BRANCH}"
|
||||||
|
git pull
|
||||||
|
|
||||||
|
# Retrieve the current Community version - latest tag on the current branch
|
||||||
|
VERSION="$(git describe --abbrev=0 --tags)"
|
||||||
|
|
||||||
|
DOWNSTREAM_REPO="github.com/Alfresco/alfresco-enterprise-repo.git"
|
||||||
|
|
||||||
|
cloneRepo "${DOWNSTREAM_REPO}" "${BRANCH}"
|
||||||
|
|
||||||
|
cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")"
|
||||||
|
|
||||||
|
# Update parent version
|
||||||
|
mvn -B versions:update-parent versions:commit "-DparentVersion=[${VERSION}]"
|
||||||
|
|
||||||
|
# Update dependency version
|
||||||
|
mvn -B versions:set-property versions:commit \
|
||||||
|
-Dproperty=dependency.alfresco-community-repo.version \
|
||||||
|
"-DnewVersion=${VERSION}"
|
||||||
|
|
||||||
|
# Commit changes
|
||||||
|
git status
|
||||||
|
git --no-pager diff pom.xml
|
||||||
|
git add pom.xml
|
||||||
|
|
||||||
|
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 push
|
||||||
|
else
|
||||||
|
echo "Dependencies are already up to date."
|
||||||
|
git status
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
popd
|
||||||
|
set +vex
|
||||||
|
echo "=========================== Finishing Update Downstream Script =========================="
|
||||||
|
|
Reference in New Issue
Block a user