thiagoelg commented on code in PR #2866:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2866#discussion_r1927409912


##########
packages/online-editor/package.json:
##########
@@ -24,7 +24,16 @@
     "start:kie-sandbox": "webpack serve --host 0.0.0.0 --env dev",
     "start:kie-sandbox-accelerator-quarkus": "npm --prefix 
./node_modules/@kie-tools/kie-sandbox-accelerator-quarkus run start",
     "test": "run-script-if --ignore-errors \"$(build-env 
tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest 
--silent --verbose\"",
-    "test-e2e": "run-script-if --ignore-errors \"$(build-env 
endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" 
--then  \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\"",
+    "test-e2e": "run-script-if --ignore-errors \"$(build-env 
endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" 
--then \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\" --else \"pnpm 
test-e2e:container\"",
+    "test-e2e:container": "run-script-if --bool \"$(build-env 
containerizedEndToEndTests.run)\" --then  \"pnpm rimraf ./dist-tests-e2e\" 
\"pnpm test-e2e:container:check\"",
+    "test-e2e:container:bash": "docker exec -it 
kie-tools-playwright-containerization-online-editor /bin/bash -c \"cd 
kie-tools/packages/online-editor && exec /bin/bash\"",
+    "test-e2e:container:build": "cross-env 
KIE_TOOLS_BUILD__buildContainerImages=true pnpm -F playwright-base 
image:docker:build",

Review Comment:
   I think we should handle the playwright-base image as a dependency, and as 
long as the dependencies are built, this image should exist.
   
   It seems wrong to call the build script of a different package here, wdyt?



##########
packages/playwright-base/package.json:
##########
@@ -18,6 +18,7 @@
     "index.js"
   ],
   "scripts": {
+    "image:docker:build": "run-script-if --bool \"$(build-env 
containerImages.build)\" --then \"docker build --platform=linux/amd64 -t 
kie-tools-playwright-container-image:$(build-env root.version) . -f 
Containerfile --output type=docker\"",

Review Comment:
   ```suggestion
       "build:dev": "run-script-if --bool \"$(build-env 
containerImages.build)\" --then \"pnpm image:docker:build\"",
       "build:prod": "pnpm build:dev",
       "image:docker:build": "docker build --platform=linux/amd64 -t 
kie-tools-playwright-container-image:$(build-env root.version) . -f 
Containerfile --output type=docker",
   ```
   
   This way, we isolate the env var check to the `build:*` scripts and can call 
the `image:docker:build` directly if necessary.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to