From f242631e19d53564d3a2dde08698dfe0ef1b6e92 Mon Sep 17 00:00:00 2001 From: Emmanuel Hugonnet Date: Mon, 8 Jan 2024 17:19:49 +0100 Subject: [PATCH] [WFLY-18887]: todo-backend quickstart CI test fails. Allowing to pass extra argumnets when starting the server using the 'EXTRA_RUN_ARGS' parameter. Issue: https://issues.redhat.com/browse/WFLY-18887 Signed-off-by: Emmanuel Hugonnet --- .github/workflows/quickstart_ci.yml | 13 +++++++++---- .github/workflows/quickstart_todo-backend_ci.yml | 1 + .../workflows/quickstart_todo-backend_ci_before.sh | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/quickstart_ci.yml b/.github/workflows/quickstart_ci.yml index 5f5db8e3e9..89df1ffc5d 100644 --- a/.github/workflows/quickstart_ci.yml +++ b/.github/workflows/quickstart_ci.yml @@ -42,6 +42,11 @@ on: required: false default: 'http://localhost:8080' type: string + EXTRA_RUN_ARGS: + description: 'optional args to be passed when running the quickstart' + required: false + default: '' + type: string # Only run the latest job concurrency: @@ -107,7 +112,7 @@ jobs: echo "Add quickstartAdmin..." ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin' echo "Starting provisioned server..." - mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 + mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} echo "Testing provisioned server..." mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing echo "Shutting down provisioned server..." @@ -121,7 +126,7 @@ jobs: echo "Building bootable jar..." mvn -fae clean package -Pbootable-jar echo "Starting bootable jar..." - mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly-jar:start -Djar-file-name=${{ inputs.DEPLOYMENT_DIR }}/target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120 + mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly-jar:start -Djar-file-name=${{ inputs.DEPLOYMENT_DIR }}/target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} echo "Testing bootable jar..." mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing echo "Shutting down bootable jar..." @@ -212,7 +217,7 @@ jobs: echo "Add quickstartAdmin..." ${{ inputs.DEPLOYMENT_DIR }}/target/server/bin/add-user.sh -a -u 'quickstartAdmin' -p 'adminPwd1!' -g 'guest,user,admin' echo "Starting provisioned server..." - mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 + mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly:start -DjbossHome=${{ inputs.DEPLOYMENT_DIR }}/target/server -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} echo "Testing provisioned server..." mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing echo "Shutting down provisioned server..." @@ -226,7 +231,7 @@ jobs: echo "Building bootable jar..." mvn -fae clean package -Pbootable-jar -Dversion.server=${{ needs.wildfly-build.outputs.wildfly-version }} echo "Starting bootable jar..." - mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly-jar:start -Djar-file-name=${{ inputs.DEPLOYMENT_DIR }}/target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120 + mvn -f ${{ inputs.DEPLOYMENT_DIR }}/pom.xml wildfly-jar:start -Djar-file-name=${{ inputs.DEPLOYMENT_DIR }}/target/${{ inputs.QUICKSTART_PATH }}-bootable.jar -Dstartup-timeout=120 ${{ inputs.EXTRA_RUN_ARGS }} echo "Testing bootable jar..." mvn -fae verify -Dserver.host=${{ inputs.SERVER_PROVISIONING_SERVER_HOST }} -Pintegration-testing echo "Shutting down bootable jar..." diff --git a/.github/workflows/quickstart_todo-backend_ci.yml b/.github/workflows/quickstart_todo-backend_ci.yml index de06241f10..236463769b 100644 --- a/.github/workflows/quickstart_todo-backend_ci.yml +++ b/.github/workflows/quickstart_todo-backend_ci.yml @@ -14,3 +14,4 @@ jobs: TEST_PROVISIONED_SERVER: true TEST_OPENSHIFT: true MATRIX_OS: '"ubuntu-latest"' + EXTRA_RUN_ARGS: '-DPOSTGRESQL_DATABASE=todos -DPOSTGRESQL_SERVICE_HOST=localhost -DPOSTGRESQL_SERVICE_PORT=5432 -DPOSTGRESQL_USER=todos -DPOSTGRESQL_PASSWORD=mysecretpassword -DPOSTGRESQL_DATASOURCE=ToDos' diff --git a/.github/workflows/quickstart_todo-backend_ci_before.sh b/.github/workflows/quickstart_todo-backend_ci_before.sh index 0f39b829e4..f101acb10a 100644 --- a/.github/workflows/quickstart_todo-backend_ci_before.sh +++ b/.github/workflows/quickstart_todo-backend_ci_before.sh @@ -1,2 +1,2 @@ #!/bin/sh -docker run --name todo-backend-db -e POSTGRES_USER=todos -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 postgres +docker run --name todo-backend-db -e POSTGRES_USER=todos -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres