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

kie-issues#1120: Minor fixes to SLWT container images #2268

Merged
merged 1 commit into from
Apr 25, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ COPY dist-dev/webapp/ src/main/resources/META-INF/resources/
RUN rm .dockerignore .gitignore README.md \
&& rm -rf .mvn/ src/main/java/ \
&& mvn quarkus:add-extension -Dextensions="quarkus-jsonp,quarkus-smallrye-openapi,quarkus-resteasy,smallrye-health" \
&& echo -e '\nquarkus.http.enable-compression=true\nquarkus.swagger-ui.always-include=true\nquarkus.http.host=0.0.0.0\nquarkus.http.cors=true\nquarkus.http.cors.origins=*' >> src/main/resources/application.properties \
&& echo -e '\nquarkus.http.enable-compression=true\nquarkus.swagger-ui.always-include=true\nquarkus.http.host=0.0.0.0\nquarkus.http.cors=true\nquarkus.http.cors.origins=*\nkogito.service.url=http://localhost:8080' >> src/main/resources/application.properties \
&& mvn clean package -B -ntp \
&& rm -rf target/
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
"build:prod:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"pnpm copy:assets\" \"pnpm image:podman:build\"",
"build:prod:win32": "echo \"Build not supported on Windows\"",
"cleanup": "rimraf dist-dev && mkdir dist-dev",
"copy:assets": "pnpm copy:serverless-logic-web-tools-swf-deployment-quarkus-app",
"copy:serverless-logic-web-tools-swf-deployment-quarkus-app": "cp -R ./node_modules/@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app/ ./dist-dev/serverless-logic-web-tools-swf-deployment-quarkus-app",
"copy:assets": "pnpm copy:serverless-logic-web-tools-swf-deployment-quarkus-app && pnpm copy:sonataflow-deployment-webapp",
"copy:serverless-logic-web-tools-swf-deployment-quarkus-app": "cp -R ./node_modules/@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app/ ./dist-dev/serverless-logic-web-tools-swf-deployment-quarkus-app && mkdir -p ./dist-dev/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/META-INF/resources/",
"copy:sonataflow-deployment-webapp": "cp -R ./node_modules/sonataflow-deployment-webapp/dist/* ./dist-dev/serverless-logic-web-tools-swf-deployment-quarkus-app/src/main/resources/META-INF/resources",
"image:docker:build": "run-script-if --bool $([ $(command -v docker) ] && echo true || echo false) --then \"docker build --ulimit nofile=5000:5000 $(echo $(build-env swfDevModeImage.buildTags) | xargs printf -- \"-t $(build-env swfDevModeImageEnv.registry)/$(build-env swfDevModeImageEnv.account)/$(build-env swfDevModeImageEnv.name):%s\n\" | xargs echo) --build-arg KOGITO_IMAGE_TAG=$(build-env swfDevModeImage.kogitoImageTag) .\" --else \"echo Docker not found, skipping image build.\"",
"image:podman:build": "run-script-if --bool $([ $(command -v podman) ] && echo true || echo false) --then \"podman build --ulimit nofile=5000:5000 $(echo $(build-env swfDevModeImage.buildTags) | xargs printf -- \"-t $(build-env swfDevModeImageEnv.registry)/$(build-env swfDevModeImageEnv.account)/$(build-env swfDevModeImageEnv.name):%s\n\" | xargs echo) --build-arg KOGITO_IMAGE_TAG=$(build-env swfDevModeImage.kogitoImageTag) -f Containerfile\" --else \"echo Podman not found, skipping image build.\""
},
Expand All @@ -29,6 +30,7 @@
"@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app": "workspace:*",
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env": "workspace:*",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6"
"run-script-os": "^1.1.6",
"sonataflow-deployment-webapp": "workspace:*"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ export function useDeployDropdownItems(props: Props) {
data-testid="alert-dev-mode-ready"
actionClose={<AlertActionCloseButton onClose={close} />}
actionLinks={
<AlertActionLink onClick={() => window.open(routeUrl, "_blank")}>
{"Go to Serverless Workflow Dev UI ↗"}
</AlertActionLink>
<AlertActionLink onClick={() => window.open(routeUrl, "_blank")}>{"Go to Dev Mode ↗"}</AlertActionLink>
}
>
<>
Expand Down Expand Up @@ -236,7 +234,7 @@ export function useDeployDropdownItems(props: Props) {
return;
}
uploadToDevModeSuccessAlert.close();
devModeReadyAlert.show({ routeUrl: devMode.endpoints!.swfDevUi, filePaths: result.uploadedPaths });
devModeReadyAlert.show({ routeUrl: devMode.endpoints!.base, filePaths: result.uploadedPaths });
window.clearInterval(fetchDevModeDeploymentTask);
}, FETCH_DEV_MODE_DEPLOYMENT_POLLING_TIME);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class KogitoProjectDeployment extends DeploymentStrategy {
importBaseImage: `FROM ${BaseBuilder.CONTAINER_IMAGE}`,
setupEnvVars: `ENV ${BaseBuilder.ENV}`,
createProjectFolder: `RUN mkdir ${projectPaths.folders.root}/`,
copyFilesIntoContainer: `COPY . ${projectPaths.folders.root}/`,
copyFilesIntoContainer: `COPY --chown=kogito:root . ${projectPaths.folders.root}/`,
configCluster: {
setServer: `${BaseBuilder.KUBECTL_PATH} config set-cluster ${clusterName} --server=${this.args.openShiftConnection.host}`,
setCredentials: `${BaseBuilder.KUBECTL_PATH} config set-credentials ${clusterCredentialsName} --token=${this.args.openShiftConnection.token}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export function OpenShiftDeploymentDropdownItem(props: Props) {

const onDeploymentClicked = useCallback(() => {
const endpoints = buildEndpoints(props.deployment.routeUrl);
window.open(props.deployment.devMode ? endpoints.swfDevUi : endpoints.base, "_blank");
}, [props.deployment.devMode, props.deployment.routeUrl]);
window.open(endpoints.base, "_blank");
}, [props.deployment.routeUrl]);

const onRestoreClicked = useCallback(async () => {
if (isRestoring) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const buildEndpoints = (routeUrl: string): DevModeEndpoints => ({
base: routeUrl,
upload: `${routeUrl}/upload`,
quarkusDevUi: `${routeUrl}/q/dev`,
swfDevUi: `${routeUrl}/q/dev/org.kie.kogito.kogito-quarkus-serverless-workflow-devui/workflowInstances`,
swfDevUi: `${routeUrl}/q/dev-ui/org.apache.kie.sonataflow.sonataflow-quarkus-devui/workflows`,
swaggerUi: `${routeUrl}/q/swagger-ui`,
health: {
live: `${routeUrl}/q/health/live`,
Expand Down
6 changes: 3 additions & 3 deletions packages/sonataflow-deployment-webapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To create a consumer app for local tests following the Quarkus Getting Started A
<executions>
<execution>
<id>unpack-webjar</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
Expand Down Expand Up @@ -106,7 +106,7 @@ Add a plugin to unpack and copy the Webjar in the plugins section
<executions>
<execution>
<id>unpack-sonataflow-deployment-webapp</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
Expand All @@ -130,7 +130,7 @@ Add a plugin to unpack and copy the Webjar in the plugins section
<executions>
<execution>
<id>copy-sonataflow-deployment-webapp-resources</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
Expand Down
8 changes: 4 additions & 4 deletions packages/sonataflow-deployment-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
~ under the License.
-->
<project
xmlns="http://maven.apache.org/POM/4.0.0"
Expand Down Expand Up @@ -81,7 +81,7 @@
<executions>
<execution>
<id>copy-webjar-resources</id>
<phase>process-resources</phase>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions repo/graph.dot
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ digraph G {
"@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image" -> "@kie-tools/serverless-logic-web-tools-swf-deployment-quarkus-app" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image" -> "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image" -> "sonataflow-deployment-webapp" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env" -> "@kie-tools/root-env" [ style = "dashed", color = "black" ];
"@kie-tools/serverless-workflow-combined-editor" -> "@kie-tools/serverless-workflow-diagram-editor-assets" [ style = "solid", color = "blue" ];
"@kie-tools/serverless-workflow-combined-editor" -> "@kie-tools/serverless-workflow-text-editor" [ style = "solid", color = "blue" ];
Expand Down
5 changes: 5 additions & 0 deletions repo/graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -1066,6 +1066,11 @@
"target": "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image-env",
"weight": 1
},
{
"source": "@kie-tools/serverless-logic-web-tools-swf-dev-mode-image",
"target": "sonataflow-deployment-webapp",
"weight": 1
},
{
"source": "@kie-tools/serverless-workflow-diagram-editor",
"target": "@kie-tools/maven-config-setup-helper",
Expand Down
Loading