ACS-3841 Create docker-compose for dbs

This commit is contained in:
Damian.Ujma@hyland.com
2022-11-21 17:01:21 +01:00
parent d323e7e3aa
commit 615759f148
2 changed files with 50 additions and 10 deletions

View File

@@ -242,10 +242,10 @@ jobs:
with: with:
java-version: ${{ env.JAVA_VERSION }} java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin" distribution: "temurin"
- name: "docker build 1" - name: "Set up the environment"
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 run: docker-compose -f ./scripts/gh-actions/docker-compose/docker-compose-db.yaml --profile mariadb up -d
- name: "docker build 2" env:
run: docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8 - MARIADB_VERSION=10.2.18
- name: "Run tests" - 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 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
@@ -280,7 +280,7 @@ jobs:
with: with:
java-version: ${{ env.JAVA_VERSION }} java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin" distribution: "temurin"
- name: "build" - name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: | run: |
bash ./scripts/travis/init.sh bash ./scripts/travis/init.sh
@@ -411,12 +411,12 @@ jobs:
with: with:
java-version: ${{ env.JAVA_VERSION }} java-version: ${{ env.JAVA_VERSION }}
distribution: "temurin" distribution: "temurin"
- name: "init" - name: "Build"
run: bash ./scripts/travis/init.sh
- name: "build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: bash ./scripts/travis/build.sh run: |
- name: "verify" bash ./scripts/travis/init.sh
bash ./scripts/travis/build.sh
- name: "Verify"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} 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 -PagsAllTestSuitePt1 ${{ env.LOG_WARN }} run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt1 ${{ env.LOG_WARN }}

View 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