Skip to content

Commit

Permalink
Update to Mendix 10.11 and enable mxbuild multi-arch (#1127)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardomendix authored Jun 27, 2024
2 parents f90492f + c3b49fb commit 5b3fe27
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 28 deletions.
2 changes: 1 addition & 1 deletion automation/run-e2e/docker/m2ee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ m2ee:
admin_pass: Password1!
runtime_port: 8080
runtime_listen_addresses: "*"
javaopts: ["-Dfile.encoding=UTF-8", "-XX:MaxPermSize=128M", "-Xmx512M", "-Xms512M", "-Djava.io.tmpdir=/source/tests/testProject/deployment/data/tmp"]
javaopts: ["-Dfile.encoding=UTF-8", "-Xmx512M", "-Xms512M", "-Djava.io.tmpdir=/source/tests/testProject/deployment/data/tmp"]
javabin: /usr/bin/java
pidfile: /var/run/m2ee.pid
mxruntime:
Expand Down
44 changes: 27 additions & 17 deletions automation/run-e2e/docker/mxbuild.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
FROM mcr.microsoft.com/dotnet/runtime:6.0
FROM --platform=$BUILDPLATFORM eclipse-temurin:17-jdk-jammy

ARG MENDIX_VERSION
ARG BUILDPLATFORM

SHELL ["/bin/bash", "-c"]
RUN \
echo "Installing Java..." && \
apt-get -qq update && \
apt-get -qq install -y wget libgdiplus && \
wget -q https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz && \
mkdir /usr/lib/jvm && \
tar xfz /tmp/openjdk.tar.gz --directory /usr/lib/jvm && \
rm /tmp/openjdk.tar.gz && \
\
echo "Downloading mxbuild ${MENDIX_VERSION}..." && \
wget -q https://cdn.mendix.com/runtime/net6-mxbuild-${MENDIX_VERSION}.tar.gz -O /tmp/mxbuild.tar.gz && \
mkdir /tmp/mxbuild && \
tar xfz /tmp/mxbuild.tar.gz --directory /tmp/mxbuild && \
rm /tmp/mxbuild.tar.gz && \
echo "Downloading mxbuild ${MENDIX_VERSION} and docker building for ${BUILDPLATFORM}..." \
&& case "${BUILDPLATFORM}" in \
linux/arm64) \
BINARY_URL="https://cdn.mendix.com/runtime/arm64-mxbuild-${MENDIX_VERSION}.tar.gz"; \
;; \
linux/amd64) \
BINARY_URL="https://cdn.mendix.com/runtime/mxbuild-${MENDIX_VERSION}.tar.gz"; \
;; \
*) \
echo "Unsupported architecture: ${BUILDPLATFORM}" >&2; \
exit 1; \
;; \
esac \
&& echo "Downloading from: ${BINARY_URL}" \
&& wget -q "${BINARY_URL}" -O /tmp/mxbuild.tar.gz \
&& mkdir /tmp/mxbuild \
&& tar xfz /tmp/mxbuild.tar.gz --directory /tmp/mxbuild \
&& rm /tmp/mxbuild.tar.gz && \
\
apt-get -qq remove -y wget && \
apt-get update -qqy && \
apt-get install -qqy libicu70 && \
apt-get -qqy remove --auto-remove wget && \
apt-get clean && \
\
echo "#!/bin/bash -x" >/bin/mxbuild && \
echo "dotnet /tmp/mxbuild/modeler/mxbuild.dll --java-home=/usr/lib/jvm/jdk-11.0.2 --java-exe-path=/usr/lib/jvm/jdk-11.0.2/bin/java \$@" >>/bin/mxbuild && \
echo "/tmp/mxbuild/modeler/mxbuild --java-home=/opt/java/openjdk --java-exe-path=/opt/java/openjdk/bin/java \$@" >>/bin/mxbuild && \
chmod +x /bin/mxbuild && \
\
echo "#!/bin/bash -x" >/bin/mx && \
echo "dotnet /tmp/mxbuild/modeler/mx.dll \$@" >>/bin/mx && \
echo "/tmp/mxbuild/modeler/mx \$@" >>/bin/mx && \
chmod +x /bin/mx
2 changes: 1 addition & 1 deletion automation/run-e2e/docker/mxruntime.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM adoptopenjdk/openjdk11:jdk-11.0.19_7-slim
FROM eclipse-temurin:17-jdk-jammy

ARG MENDIX_VERSION

Expand Down
1 change: 0 additions & 1 deletion automation/run-e2e/docker/mxruntimeRC.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
FROM adoptopenjdk/openjdk11:jdk-11.0.19_7-slim

ARG MENDIX_VERSION

Expand Down
7 changes: 2 additions & 5 deletions automation/run-e2e/lib/docker-utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ export function getFullImageName(name, mendixVersion) {
export async function buildImage(name, mendixVersion) {
const image = getFullImageName(name, mendixVersion);
const dockerDir = fileURLToPath(new URL("../docker", import.meta.url));
const dockerFile = p.join(dockerDir, process.env.RC ? `${name}RC.Dockerfile`:`${name}.Dockerfile` );
const dockerFile = p.join(dockerDir, process.env.RC ? `${name}RC.Dockerfile` : `${name}.Dockerfile`);
const runnumber = process.env.CI && process.env.GITHUB_RUN_ID;

const args = [
`--platform=linux/amd64`,
`--file ${dockerFile}`,
`--build-arg MENDIX_VERSION=${mendixVersion}`,
`--tag ${image}`,
Expand Down Expand Up @@ -150,9 +149,7 @@ export function startPlaywright(ip, freePort) {

console.log("Start Playwright in", startingPoint);

const args = [
`--project=${browserPlaywright}`,
];
const args = [`--project=${browserPlaywright}`];
const command = [`${modernClientMode} ${baseURL} playwright test`, ...args].join(" ");

execSync(command, { stdio: "inherit" });
Expand Down
2 changes: 1 addition & 1 deletion automation/run-e2e/mendix-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"latest": "10.8.1.29725",
"latest": "10.12.0.38909",
"9": "9.24.0.2965",
"8": "8.18.24.2858"
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,14 @@ test.describe("color-picker-web", () => {
await page.waitForLoadState("networkidle");
});

test("hex", async ({ page }) => {
test.fixme("hex", async ({ page }) => {
const hexInput = await page.locator(".mx-name-colorPicker24 input");
await expect(hexInput).toBeVisible();
await page.reload();
await page.waitForLoadState("networkidle");
await expect(hexInput).toBeVisible({ timeout: 10000 });
await expect(hexInput).toBeEnabled({ timeout: 10000 });
await expect(hexInput).toBeEditable({ timeout: 10000 });
await expect(hexInput).toHaveValue("#4caf50");
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ test.describe("Popup-menu-web", () => {

test("shows a new menu list when on hover is triggered", async ({ page }) => {
await page.click(".mx-name-actionButton1");
const button25 = await page.locator(".mx-name-actionButton25");
await page.waitForLoadState("networkidle");
const button25 = page.getByRole("button", { name: "Trigger On Hover" });
await expect(button25).toBeVisible();
await button25.hover();
const text42 = await page.locator(".mx-name-text42");
Expand Down

0 comments on commit 5b3fe27

Please sign in to comment.