Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRCI-5071 Fix running AC within CI when accounting for default JDKs #2999

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions build-test-analytics-cloud.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,49 @@
analytics.cloud.repository.dir="${analytics.cloud.asah.dir}"
/>

<execute dir="${analytics.cloud.asah.dir}">
<echo file="${analytics.cloud.asah.dir}/build_analytics_cloud_image.sh">
java -version
ant -version

./gradlew jar -Dliferay.ci=true

./gradlew clean assemble -Dliferay.ci=true

docker compose --file=${analytics.cloud.docker.test.yaml} --project-name=${analytics.cloud.project.name} build

docker images
</execute>
</echo>

<local name="java.jdk.home" />
<local name="java.jdk.opts" />
<local name="path" />

<!--<get-java-jdk-home architecture="x64" type="oracle" version="8" />-->
<!--<get-java-jdk-opts architecture="x64" type="oracle" version="8" />-->
<get-java-jdk-home architecture="x64" type="zulu" version="21" />
<get-java-jdk-opts architecture="x64" type="zulu" version="21" />

<propertyregex
input="${env.PATH}"
override="true"
property="path"
regexp="/opt/java/jdk[^/]+/bin"
replace="${java.jdk.home}/bin"
/>

<echo>java.jdk.home=${java.jdk.home}</echo>
<echo>java.jdk.opts=${java.jdk.opts}</echo>
<echo>path=${path}</echo>

<exec dir="${analytics.cloud.asah.dir}" executable="/bin/bash" failonerror="true" timeout="600000">
<env key="ANT_OPTS" value="${java.jdk.opts}" />
<env key="JAVA_HOME" value="${java.jdk.home}" />
<env key="JAVA_OPTS" value="${java.jdk.opts}" />
<env key="PATH" value="${path}" />
<arg value="${analytics.cloud.asah.dir}/build_analytics_cloud_image.sh" />
</exec>

<delete file="${analytics.cloud.asah.dir}/build_analytics_cloud_image.sh" />

<for list="${analytics.cloud.asah.image.names}" param="analytics.cloud.asah.image.name">
<sequential>
Expand Down
16 changes: 9 additions & 7 deletions build-test-batch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2761,8 +2761,6 @@ ${poshi.runner.testsuite.testcase.name}</echo>
<get-java-jdk-bundle-type test.batch.name="${test.batch.name}" />
<get-java-jdk-bundle-version test.batch.name="${test.batch.name}" />

<get-java-jdk-home type="${java.jdk.bundle.type}" version="${java.jdk.bundle.version}" />

<run-batch-test>
<test-action>
<database-test-run-test database.type="@{database.type}" stop.app.server="true">
Expand All @@ -2781,9 +2779,13 @@ ${poshi.runner.testsuite.testcase.name}</echo>

<trycatch property="exception.message">
<try>
<get-java-jdk-home architecture="x64" type="oracle" version="8" />
<get-java-jdk-opts architecture="x64" type="oracle" version="8" />

<exec executable="/bin/bash">
<arg value="modules/test/playwright/env/set_up.sh" />
<env key="JAVA_HOME" value="${java.jdk.home}" />
<env key="JAVA_OPTS" value="${java.jdk.opts}" />
<env key="LIFERAY_HOME" value="${liferay.home}" />
<env key="LIFERAY_PORTAL_URL" value="http://${env.NODE_NAME}:8080" />
<env key="PLAYWRIGHT_PROJECT_NAME" value="${playwright.project.name}" />
Expand All @@ -2796,19 +2798,19 @@ ${poshi.runner.testsuite.testcase.name}</echo>
<local name="playwright.test.shard" />

<if>
<isset property="PLAYWRIGHT_ARGS_${axis.variable}" />
<isset property="env.PLAYWRIGHT_ARGS_${axis.variable}" />
<then>
<propertycopy from="PLAYWRIGHT_ARGS_${axis.variable}" name="playwright.test.shard" />
<propertycopy from="env.PLAYWRIGHT_ARGS_${axis.variable}" name="playwright.test.shard" />
</then>
<else>
<property name="playwright.test.shard" value="" />
</else>
</if>

<if>
<isset property="PLAYWRIGHT_PROJECT_NAME" />
<isset property="env.PLAYWRIGHT_PROJECT_NAME" />
<then>
<propertycopy from="PLAYWRIGHT_PROJECT_NAME" name="playwright.project.name" />
<propertycopy from="env.PLAYWRIGHT_PROJECT_NAME" name="playwright.project.name" />
</then>
<else>
<property name="playwright.project.name" value="" />
Expand All @@ -2823,7 +2825,7 @@ ${poshi.runner.testsuite.testcase.name}</echo>
<property name="playwright.command" value="npx playwright test ${playwright.test.shard}" />
</then>
<else>
<property name="playwright.command" value="npx playwright test --project ${playwright.project.name} ${playwright.test.shard}" />
<property name="playwright.command" value="npx playwright test --project=${playwright.project.name} ${playwright.test.shard}" />
</else>
</if>

Expand Down