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

JDK 21 support #398

Merged
merged 5 commits into from
Aug 9, 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
6 changes: 3 additions & 3 deletions .github/workflows/all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: "(github.event.inputs.jobs == '' || contains(github.event.inputs.jobs, 'unit-tests')) && !contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
java-version: [17]
java-version: [17, 21]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
needs: unit-tests
strategy:
matrix:
java-version: [17]
java-version: [17, 21]
jira-version: [10.0.0-m0009]
fail-fast: false
steps:
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
strategy:
matrix:
# every version part should be 0 <= <version> <= 255; otherwise Confluence fails to start
java-version: [17]
java-version: [17, 21]
confluence-version: [9.0.0-rc2]
fail-fast: false
steps:
Expand Down
24 changes: 21 additions & 3 deletions bin/release-check/check-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,30 @@ esac
echo "Determined workflow name: $workflow_name"

# RUN TESTS AGAINST SPECIFIC VERSIONS
workflow_links=()
# Bitbucket 9+ does not support Java 21
if [ $product_type != "bitbucket" ]; then
echo "Running workflow with params: workflow-name=$workflow_name java-version=21 product-version=$product_version"
first_workflow_link=$(start_workflow $workflow_name 21 $product_version)
echo "Pipeline URL: $first_workflow_link"
workflow_links+=("$first_workflow_link")
fi

echo "Running workflow with params: workflow-name=$workflow_name java-version=17 product-version=$product_version"
workflow_link=$(start_workflow $workflow_name 17 $product_version)
echo "Pipeline URL: $workflow_link"
second_workflow_link=$(start_workflow $workflow_name 17 $product_version)
echo "Pipeline URL: $second_workflow_link"
workflow_links+=("$second_workflow_link")

# Join elements with a multi-character delimiter
function join_by {
local d=${1-} f=${2-}
if shift 2; then
printf %s "$f" "${@/#/$d}"
fi
}

# CREATE NEW ISSUE FOR RELEASE
echo "Creating a new issue"
new_issue_url=$(RELEASE_LABEL="$release_label" WORKFLOW_LINKS="$workflow_link" . ./create-issue.sh)
new_issue_url=$(RELEASE_LABEL="$release_label" WORKFLOW_LINKS="$(join_by ', ' ${workflow_links[@]})" . ./create-issue.sh)

echo "New ticket created: $new_issue_url"
21 changes: 14 additions & 7 deletions bitbucket-slack-server-integration-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@
<!-- product properties -->
<plugin.key>${project.groupId}.${project.artifactId}</plugin.key>
<!-- TODO: 9.0.0 bitbucket-rest-api and bitbucket-rest-model are not available yet-->
<bitbucket.api.version>9.0.0-eap09</bitbucket.api.version>
<bitbucket.version>9.0.0-eap09</bitbucket.version>
<bitbucket.rest.api.version>9.0.0-eap09</bitbucket.rest.api.version>
<bitbucket.api.version>9.0.0</bitbucket.api.version>
<bitbucket.version>9.0.0</bitbucket.version>
<bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
<bitbucket.amps.version>8.16.1</bitbucket.amps.version>
<bitbucket.amps.version>9.0.4</bitbucket.amps.version>
<platform.version>7.0.5</platform.version>
</properties>

Expand Down Expand Up @@ -127,13 +128,13 @@
<dependency>
<groupId>com.atlassian.bitbucket.server</groupId>
<artifactId>bitbucket-rest-api</artifactId>
<version>${bitbucket.api.version}</version>
<version>${bitbucket.rest.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.bitbucket.server</groupId>
<artifactId>bitbucket-rest-model</artifactId>
<version>${bitbucket.api.version}</version>
<version>${bitbucket.rest.api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -293,7 +294,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -338,6 +339,12 @@
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.14.18</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
Expand Down Expand Up @@ -600,7 +607,7 @@
<profile>
<id>jvm17</id>
<activation>
<jdk>17</jdk>
<jdk>[17,)</jdk>
</activation>
<properties>
<!-- Needed to start Bitbucket on JDK 17 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
<project.root.directory>${project.basedir}/..</project.root.directory>

<!-- version of Confluence libraries used to compile plugin code -->
<confluence.api.version>9.0.0-rc2</confluence.api.version>
<confluence.api.version>9.0.1</confluence.api.version>

<!-- version of Confluence used in integration tests -->
<confluence.version>9.0.0-rc2</confluence.version>
<confluence.version>9.0.1</confluence.version>
<confluence.data.version>${confluence.version}</confluence.data.version>

<confluence.amps.version>8.9.2</confluence.amps.version>
Expand Down Expand Up @@ -559,7 +559,7 @@
<profile>
<id>jvm17</id>
<activation>
<jdk>17</jdk>
<jdk>[17,)</jdk>
</activation>
<properties>
<!-- Needed to start Confluence 8 on JDK 17 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ public void getSlackPrettyTime_shouldReturnExpectedValue() {
when(localeManager.getSiteDefaultLocale()).thenReturn(Locale.ENGLISH);
when(timeZoneManager.getDefaultTimeZone()).thenReturn(TimeZone.getTimeZone("America/Chicago"));

String result = target.getSlackPrettyTime(1551985533000L);
// `DateTimeFormatter` whitespace separator may change among JDKs
// Since `equals` method compares each character by its ascii value for equality,
// horizontal whitespace character (\\h) is replaced with a space for consistency
String result = target.getSlackPrettyTime(1551985533000L).replaceAll("\\h", " ");

assertThat(result, is("<!date^" + (1551985533L) + "^{time}|1:05 PM>"));
}
Expand Down
2 changes: 1 addition & 1 deletion jira-slack-server-integration/jira-8-compat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.11.22</version>
<version>1.14.18</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@
<profile>
<id>jvm17</id>
<activation>
<jdk>17</jdk>
<jdk>[17,)</jdk>
</activation>
<properties>
<!-- Needed to start Jira on JDK 17 -->
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<version>1.18.30</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
Expand Down Expand Up @@ -334,7 +334,7 @@
<profile>
<id>jvm17</id>
<activation>
<jdk>17</jdk>
<jdk>[17,)</jdk>
</activation>
<properties>
<jvm17.opens>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED --add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED --add-opens=java.base/sun.util.locale=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-exports=java.base/sun.security.action=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xml.internal.utils=ALL-UNNAMED --add-exports=java.desktop/sun.font=ALL-UNNAMED --add-exports=java.base/sun.security.util=ALL-UNNAMED</jvm17.opens>
Expand Down
9 changes: 8 additions & 1 deletion slack-server-integration-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,14 @@
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.11.22</version>
<version>1.14.18</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.30.2-GA</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>joda-time</groupId>
Expand Down
Loading