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#960: Upgrade kie-tools to Java 17, Maven 3.9.6, and Quarkus 3 #2182

Merged
merged 52 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
daae2bb
Make stunner editor compatible with JDK 17
yesamer Feb 23, 2024
9baeac9
Test fixed
yesamer Feb 23, 2024
e96c6ed
Test fixed
yesamer Feb 23, 2024
70cf51d
Unnecessary entry
yesamer Feb 24, 2024
b2468cc
Removing reflection trick to mock static final fields (no longer vali…
yesamer Feb 24, 2024
b0b8993
Update Selenium + Webdriver
yesamer Feb 24, 2024
81a246c
Removing reflection trick to mock static final fields (no longer vali…
yesamer Feb 25, 2024
3287840
Removing reflection trick to mock static final fields (no longer vali…
yesamer Feb 25, 2024
f2ceda6
Removing reflection trick to mock static final fields (no longer vali…
yesamer Feb 25, 2024
9567d6b
Update Selenium + Webdriver
yesamer Feb 25, 2024
e971dfa
Updating plugin
yesamer Feb 25, 2024
1b578ad
Updating test dependency that doesn't support JDK 17
yesamer Feb 25, 2024
358cddd
Update Selenium + Webdriver
yesamer Feb 25, 2024
01b50e5
Removing reflection trick to mock static final fields (no longer vali…
yesamer Feb 25, 2024
dcca359
Removing reflection trick to mock static final fields (no longer vali…
yesamer Feb 26, 2024
9745489
java-vscode completion dependencies updated.
yesamer Feb 26, 2024
5844ac4
Java, Maven, Quarkus and Kogito Runtimes to `17`, `3.9.6`, `3.2.10` a…
yesamer Feb 26, 2024
779ced0
Java, Maven, Quarkus and Kogito Runtimes to `17`, `3.9.6`, `3.2.10` a…
yesamer Feb 26, 2024
1264a68
Apache repo added
yesamer Feb 26, 2024
21843c7
kogito-quarkus-blank-app
yesamer Feb 26, 2024
7c5cf9a
Restoring kogtio-quarkus
yesamer Feb 26, 2024
1894d56
extended-services-java
yesamer Feb 26, 2024
4b09adf
Restoring kogito-quarkus
yesamer Feb 26, 2024
251a7ff
Change snapshot version
yesamer Feb 26, 2024
262bb4d
jakarta vs javax
yesamer Feb 26, 2024
72337a9
SFW JDK 17 compliant
yesamer Feb 27, 2024
3bad38c
Using `999-20240218-SNAPSHOT`
yesamer Feb 27, 2024
f019134
Dashbuilder
yesamer Feb 27, 2024
fe6f3af
fixed repos
yesamer Feb 27, 2024
81c6c9b
JDK updated to version 17 in dev-deployment-base-image
yesamer Feb 28, 2024
f3ea2d7
Dashbuilder
yesamer Feb 28, 2024
e571ce2
Dashbuilder - reverted
yesamer Feb 28, 2024
b138ccc
Merge branch 'main' into kie-issues#960
yesamer Feb 28, 2024
104b3b6
Dashbuilder
yesamer Feb 28, 2024
2dd2c2e
serverless-logic-web-tools-swf-deployment-quarkus-app updated depende…
fantonangeli Feb 28, 2024
dbc917e
Apache repo added
yesamer Feb 28, 2024
799cdc0
Jenkis CI build updated
yesamer Feb 28, 2024
0b4df99
Merge branch 'main' into kie-issues#960
yesamer Feb 29, 2024
0a8098d
Disabling test in macOS (dev-deployment-uploaded-service)
yesamer Feb 29, 2024
3ecd13c
Disabling test in macOS (dev-deployment-uploaded-service)
yesamer Feb 29, 2024
9673a2c
Temporarly disabled kn-plugin e2e tests
yesamer Feb 29, 2024
33b932f
Build base-image and blank-app together
thiagoelg Feb 29, 2024
519b8f4
Build quarkus-blank-app deps
thiagoelg Feb 29, 2024
d88c71f
Exclude blank-app-image instead of blank-app
thiagoelg Feb 29, 2024
7db76a4
Fix distribution tests
thiagoelg Feb 29, 2024
aded992
[REVERT_THIS] Use nightly kogito-base-builder images temporarily
thiagoelg Mar 1, 2024
ab8e101
Use main-2024-02-18 tag
thiagoelg Mar 1, 2024
cf07abf
Fix swfBuilder tag
thiagoelg Mar 1, 2024
63bfc6a
Temporary disabled java code completion module
yesamer Mar 1, 2024
81a332d
Revert previous commit
yesamer Mar 1, 2024
983bef9
Use volumes for container volumes for dev deployments
thiagoelg Mar 5, 2024
43fd54a
Remove push command
thiagoelg Mar 5, 2024
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
27 changes: 4 additions & 23 deletions .ci/jenkins/Jenkinsfile.staging-build
Original file line number Diff line number Diff line change
Expand Up @@ -626,23 +626,25 @@ pipeline {
}
}

stage('Build (dev-deployment-base-image)') {
stage('Build (dev-deployment-base-image and dev-deployment-kogito-quarkus-blank-app-image)') {
steps {
dir('kie-tools') {
script {
buildDevDeploymentBaseImage()
buildDevDeploymentKogitoQuarkusBlankAppImage()
}
}
}
}

stage('STAGING: Push dev-deployment-base-image to quay.io') {
stage('STAGING: Push dev-deployment-base-image and dev-deployment-kogito-quarkus-blank-app-image to quay.io') {
when {
expression { !params.DRY_RUN }
}
steps {
script {
pushDevDeploymentBaseImageToQuay()
pushDevDeploymentKogitoQuarkusBlankAppImageToQuay()
}
}
}
Expand All @@ -668,27 +670,6 @@ pipeline {
}
}

stage('Build (dev-deployment-kogito-quarkus-blank-app-image)') {
steps {
dir('kie-tools') {
script {
buildDevDeploymentKogitoQuarkusBlankAppImage()
}
}
}
}

stage('STAGING: Push dev-deployment-kogito-quarkus-blank-app-image to quay.io') {
when {
expression { !params.DRY_RUN }
}
steps {
script {
pushDevDeploymentKogitoQuarkusBlankAppImageToQuay()
}
}
}

stage('Build (serverless-logic-web-tools-base-builder-image)') {
steps {
dir('kie-tools') {
Expand Down
12 changes: 6 additions & 6 deletions .ci/kie-tools-ci-build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ libxi6 \
libnss3 \
libgconf-2-4 \
libpci-dev \
openjdk-11-jdk \
openjdk-17-jdk \
git \
jq \
vim \
Expand All @@ -44,7 +44,7 @@ RUN wget -O /tmp/firefox-latest.tar.bz2 "https://download.mozilla.org/?product=f

# Install chromedriver
RUN CHROME_VERSION=$(curl https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json | jq -r .channels.Stable.version) && \
wget -O /tmp/chromedriver-linux64.zip https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_VERSION/linux64/chromedriver-linux64.zip && \
wget -O /tmp/chromedriver-linux64.zip https://storage.googleapis.com/chrome-for-testing-public/$CHROME_VERSION/linux64/chromedriver-linux64.zip && \
unzip /tmp/chromedriver-linux64.zip -d /tmp && mv /tmp/chromedriver-linux64/chromedriver /usr/bin/ && \
rm /tmp/chromedriver-linux64.zip

Expand Down Expand Up @@ -75,9 +75,9 @@ RUN bash -c 'source $HOME/.nvm/nvm.sh && \
npm install -g [email protected]'

# Maven setup
RUN wget https://archive.apache.org/dist/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz -P /tmp && \
sudo tar xzf /tmp/apache-maven-3.8.6-bin.tar.gz -C /opt && rm /tmp/apache-maven-3.8.6-bin.tar.gz && \
sudo ln -s /opt/apache-maven-3.8.6 /opt/maven && \
RUN wget https://archive.apache.org/dist/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -P /tmp && \
sudo tar xzf /tmp/apache-maven-3.9.6-bin.tar.gz -C /opt && rm /tmp/apache-maven-3.9.6-bin.tar.gz && \
sudo ln -s /opt/apache-maven-3.9.6 /opt/maven && \
echo 'export M2_HOME=/opt/maven' | sudo tee -a /etc/profile.d/maven.sh && \
echo 'export MAVEN_HOME=${M2_HOME}' | sudo tee -a /etc/profile.d/maven.sh && \
echo 'export PATH=${M2_HOME}/bin:${PATH}' | sudo tee -a /etc/profile.d/maven.sh && \
Expand Down Expand Up @@ -106,7 +106,7 @@ RUN wget https://get.helm.sh/helm-v3.13.3-linux-amd64.tar.gz -P /tmp && \
sudo tar -C /usr/bin/ -zxvf /tmp/helm-v3.13.3-linux-amd64.tar.gz linux-amd64/helm --strip-components 1 && rm /tmp/helm-v3.13.3-linux-amd64.tar.gz

# Env vars
ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
ENV JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
ENV DISPLAY=":99"
ENV NODE_OPTIONS="--max_old_space_size=4096"

Expand Down
6 changes: 3 additions & 3 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ runs:
with:
node-version: 18.14.0

- name: "Setup JDK 11"
- name: "Setup JDK 17"
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: "zulu"

- name: "Set up GOLANG 1.21.5"
Expand All @@ -66,7 +66,7 @@ runs:
- name: "Set up Maven"
uses: stCarolas/[email protected]
with:
maven-version: 3.8.6
maven-version: 3.9.6

- name: Setup docker (macOS only)
if: runner.os == 'macOS'
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ jobs:
START_SERVER_AND_TEST_INSECURE: "true"
NODE_OPTIONS: "--max_old_space_size=4096"
run: >-
pnpm
-F='!@kie-tools/serverless-logic-web-tools-swf-dev-mode-image'
pnpm
-F='!@kie-tools/serverless-logic-web-tools-swf-dev-mode-image'
-F='!@kie-tools/dev-deployment-base-image'
-F='!@kie-tools/dev-deployment-kogito-quarkus-blank-app-image'
-F='!@kie-tools/dev-deployment-dmn-form-webapp-image'
-F='!@kie-tools/serverless-logic-web-tools-base-builder-image'
-F='!@kie-tools/dashbuilder-viewer-image'
-F='!@kie-tools/serverless-logic-web-tools-base-builder-image'
-F='!@kie-tools/dashbuilder-viewer-image'
-r --workspace-concurrency=1 build:prod

- name: "FULL → Build → serverless-logic-web-tools-swf-dev-mode-image"
Expand All @@ -122,7 +123,7 @@ jobs:
echo "Build @kie-tools/serverless-logic-web-tools-swf-dev-mode-image"
pnpm -F @kie-tools/serverless-logic-web-tools-swf-dev-mode-image... --workspace-concurrency=1 build:prod

- name: "FULL → Build → dev-deployment-base-image"
- name: "FULL → Build → dev-deployment-base-image and dev-deployment-kogito-quarkus-blank-app"
if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux'
env:
KIE_TOOLS_BUILD__runTests: "true"
Expand All @@ -137,7 +138,7 @@ jobs:
podman system prune --all --force
fi
echo "Build @kie-tools/dev-deployment-base-image"
pnpm -F @kie-tools/dev-deployment-base-image... --workspace-concurrency=1 build:prod
pnpm -F @kie-tools/dev-deployment-base-image... -F @kie-tools/dev-deployment-kogito-quarkus-blank-app... --workspace-concurrency=1 build:prod

- name: "FULL → Build → dev-deployment-dmn-form-webapp-image"
if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ To start building the Apache KIE Tools project, you're going to need:

- Node `18` _(To install, follow these instructions: https://nodejs.org/en/download/package-manager/)_
- pnpm `8.7.0` _(To install, follow these instructions: https://pnpm.io/installation)_
- Maven `3.8.6`
- Java `11`
- Maven `3.9.6`
- Java `17`
- Go `1.21.5` _(To install, follow these instructions: https://go.dev/doc/install)_
- Helm `3.13.3` _(To install, follow these instructions: https://helm.sh/docs/intro/install/)_

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public void testInsertTabAndContent() {
final TabPane tabContentPane = mock(TabPane.class);
final NavTabs tabBar = mock(NavTabs.class);
final TabContent tabContent = mock(TabContent.class);
final Set<TabPanelEntry> allContentTabs = spy(new HashSet<>());
final Set<Widget> activatableWidgets = spy(new HashSet<>());
final Set<TabPanelEntry> allContentTabs = mock(Set.class);
final Set<Widget> activatableWidgets = mock(Set.class);

doReturn(tabWidget).when(tab).getTabWidget();
doReturn(tabContentPane).when(tab).getContentPane();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,14 @@
-Ddashbuilder.kieserver.serverTemplate.sample-server.password=kieserver1!
-Ddashbuilder.kieserver.defaultServerTemplate=default
-Ddashbuilder.kieserver.serverTemplate.sample-server.replace_query=true
-Ddashbuilder.dev=true</extraJvmArgs>
-Ddashbuilder.dev=true
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.time=ALL-UNNAMED
--add-opens java.base/java.time.format=ALL-UNNAMED
--add-opens java.base/java.text=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
</extraJvmArgs>
<style>OBFUSCATED</style>
<noServer>false</noServer>
<!-- <server>org.jboss.errai.cdi.server.gwt.EmbeddedWildFlyLauncher</server> -->
Expand Down
10 changes: 5 additions & 5 deletions packages/dashbuilder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<version.javax.validation>1.0.0.GA</version.javax.validation>

<!-- Resolved artifacts -->
<version.org.junit>4.13.1</version.org.junit>
<version.org.junit>4.13.2</version.org.junit>
<version.org.assertj>3.14.0</version.org.assertj>
<version.org.mockito>3.6.0</version.org.mockito>
<version.org.kie>7.59.0.Final</version.org.kie>
Expand All @@ -78,7 +78,7 @@
<version.io.netty>4.1.59.Final</version.io.netty>
<version.com.google.elemental2>1.1.0</version.com.google.elemental2>
<version.com.allen-sauer.gwt.dnd>3.3.3</version.com.allen-sauer.gwt.dnd>
<version.org.freemarker>2.3.30</version.org.freemarker>
<version.org.freemarker>2.3.32</version.org.freemarker>
<version.jakarta.activation-api>1.2.2</version.jakarta.activation-api>
<version.com.google.jsinterop.base>1.0.0</version.com.google.jsinterop.base>
<version.com.google.jsinterop.annotations>2.0.0</version.com.google.jsinterop.annotations>
Expand All @@ -100,10 +100,10 @@
<version.surefire.plugin>2.22.2</version.surefire.plugin>
<version.failsafe.plugin>${version.surefire.plugin}</version.failsafe.plugin>
<version.buildhelper.plugin>3.0.0</version.buildhelper.plugin>
<version.surefire.plugin>2.22.2</version.surefire.plugin>
<version.surefire.plugin>3.2.5</version.surefire.plugin>
<version.enforcer.plugin>3.0.0-M3</version.enforcer.plugin>
<version.clean.plugin>3.1.0</version.clean.plugin>
<version.compiler.plugin>3.8.1</version.compiler.plugin>
<version.compiler.plugin>3.12.1</version.compiler.plugin>
<version.resources.plugin>3.2.0</version.resources.plugin>
<version.war.plugin>3.2.3</version.war.plugin>
<version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
Expand All @@ -112,6 +112,7 @@
<version.site.plugin>3.8.2</version.site.plugin>
<version.antrun.plugin>1.8</version.antrun.plugin>
<version.exec-maven-plugin>3.0.0</version.exec-maven-plugin>
<version.org.maven.dependency.plugin>3.1.2</version.org.maven.dependency.plugin>
<checkstyle.header.extensions>java</checkstyle.header.extensions>
<checkstyle.header.template
><![CDATA[
Expand All @@ -135,7 +136,6 @@
\*\/$
]]>
</checkstyle.header.template>
<version.org.maven.dependency.plugin>3.1.2</version.org.maven.dependency.plugin>

<!-- Properties from DROOLS-WB parent POM -->
<!-- TODO: Enable these flags after fixing all checkstyle issues -->
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-deployment-base-image/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

# Defaults to registry.access.redhat.com/ubi9/openjdk-11 (check env/index.js)
# Defaults to registry.access.redhat.com/ubi9/openjdk-17 (check env/index.js)
ARG BUILDER_IMAGE_ARG

FROM --platform=linux/amd64 ${BUILDER_IMAGE_ARG}
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-deployment-base-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Docker image with Java and Maven, as well as the dev-deployment-upload-service b

## Build arguments

- `BUILDER_IMAGE_ARG`: The base image used for building this image (defaults to `registry.access.redhat.com/ubi9/openjdk-11:1.17`).
- `BUILDER_IMAGE_ARG`: The base image used for building this image (defaults to `registry.access.redhat.com/ubi9/openjdk-17:1.18`).

## Environment variables

Expand Down
2 changes: 1 addition & 1 deletion packages/dev-deployment-base-image/env/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const { varsWithName, composeEnv, getOrDefault } = require("@kie-tools-scripts/b
module.exports = composeEnv([require("@kie-tools/root-env/env")], {
vars: varsWithName({
DEV_DEPLOYMENT_BASE_IMAGE__builderImage: {
default: "registry.access.redhat.com/ubi9/openjdk-11:1.17",
default: "registry.access.redhat.com/ubi9/openjdk-17:1.18",
description: "The image used in the FROM import.",
},
DEV_DEPLOYMENT_BASE_IMAGE__registry: {
Expand Down
50 changes: 39 additions & 11 deletions packages/dev-deployment-kogito-quarkus-blank-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,45 @@
<artifactId>dev-deployment-kogito-quarkus-blank-app</artifactId>
<version>${revision}</version>

<repositories>
<repository>
<!-- Duplicating the Maven Central repository here (as it is already coming from Super POM) makes the build much faster,
as the Maven Central is now treated as the first (default) repository (because it is before the Apache Nexus one).
Artifacts with release (fixed) versions are being downloaded primarily from there. Without the central being the
first repository the Apache Nexus would be contacted first and since it is quite slow it slows down the build.
We use Apache repo only to download our SNAPSHOTs. -->
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>apache-public-repository-group</id>
<name>Apache Public Repository Group</name>
<url>https://repository.apache.org/content/groups/public/</url>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>

<properties>
<compiler-plugin.version>3.8.1</compiler-plugin.version>
<compiler-plugin.version>3.12.1</compiler-plugin.version>
<maven.compiler.parameters>true</maven.compiler.parameters>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
<version.junit>4.13.1</version.junit>
<surefire-plugin.version>3.2.5</surefire-plugin.version>
<version.junit>4.13.2</version.junit>
</properties>

<dependencyManagement>
Expand All @@ -48,18 +78,16 @@
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.quarkus.platform</groupId>
<artifactId>quarkus-kogito-bom</artifactId>
<version>${quarkus.platform.version}</version>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-kie-bom</artifactId>
<version>${version.org.kie.kogito}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
<artifactId>kogito-kie-bom</artifactId>
<artifactId>kogito-quarkus</artifactId>
<version>${version.org.kie.kogito}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
4 changes: 3 additions & 1 deletion packages/dev-deployment-upload-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"start": "make start",
"start-test-servers": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"node scripts/runTestServers.js\"",
"stop-test-servers": "run-script-if --bool \"$(build-env containerImages.build)\" --then \"node scripts/runTestServers.js --cleanup\"",
"test": "run-script-if --bool \"$(build-env containerImages.build)\" --bool \"$(build-env tests.run)\" --ignore-errors \"$(build-env tests.ignoreFailures)\" --then \"jest --verbose --silent=false\""
"test": "run-script-os",
"test:linux": "run-script-if --bool \"$(build-env containerImages.build)\" --bool \"$(build-env tests.run)\" --ignore-errors \"$(build-env tests.ignoreFailures)\" --then \"jest --verbose --silent=false\"",
"test:win32:darwin": "echo 'Not supported'"
},
"devDependencies": {
"@kie-tools/root-env": "workspace:*",
Expand Down
Loading
Loading