Skip to content

Commit

Permalink
Merge pull request #371 from atlassian-labs/dev
Browse files Browse the repository at this point in the history
Forward merge to master
  • Loading branch information
AnnaChyzhevska01 authored May 21, 2024
2 parents fe375d7 + 905fcd8 commit 91b946a
Show file tree
Hide file tree
Showing 146 changed files with 925 additions and 1,034 deletions.
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
Thank you for considering a contribution to Atlassian Slack Integration for Server project! Pull requests, issues and
comments are welcome. For pull requests, please:

* Use `dev` as base branch for your changes and target branch for your PRs
> `dev` branch contains plugins compatible with Confluence 9+, Bitbucket 9+ and Jira 10+ products
> `release-1.x` compatible with older products versions (Confluence 7, 8; Bitbucket 8 and Jira 8, 9)
* Use `dev`/`release-1.x` as base branch for your changes and target branch for your PRs
* Add tests for new features and bug fixes
* Follow the existing style
* Separate unrelated changes into multiple pull requests
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,16 @@ or by manually downloading plugin JAR files from Marketplace pages for [Jira](ht
or [Bitbucket](https://marketplace.atlassian.com/apps/1220729/bitbucket-server-for-slack-official?hosting=datacenter&tab=overview) plugins.
Links to the official documentation are specified on Marketplace pages.

Supported products (on 10th Feb, 2023). See [EOL policy](https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html).
* Jira: 8.15.0 (EOL date: 2 Feb 2023) JDK 8, 11 - 9.5.0 (EOL date: 6 Dec 2024) on JDK 8, 11, 17.
* Confluence: 7.10 (EOL date: Dec 15, 2022) JDK 8, 11 - 8.0.0-m90 (EOL date: TBD - end of 2024) JDK 8, 11.
* Bitbucket: 7.6.0 (EOL date: Q1 calendar year 2023) on JDK 8, 11 - 8.8.0 (EOL date: 7 Feb 2025) on JDK 8, 11, 17.
Supported products. See [EOL policy](https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html).
* `master`/`dev` branch
* Jira: 10+ (not released yet) on JDK 17.
* Confluence: 9+ (not released yet) on JDK 17.
* Bitbucket: 9+ (not released yet) on JDK 17.

* `release-1.x` branch
* Jira: 8.15.0 (EOL date: 2 Feb 2023) JDK 8, 11 - 9.5.0 (EOL date: 6 Dec 2024) on JDK 8, 11, 17.
* Confluence: 7.10 (EOL date: Dec 15, 2022) JDK 8, 11 - 8.0.0-m90 (EOL date: TBD - end of 2024) JDK 8, 11.
* Bitbucket: 7.6.0 (EOL date: Q1 calendar year 2023) on JDK 8, 11 - 8.8.0 (EOL date: 7 Feb 2025) on JDK 8, 11, 17.

## A note on future development plans

Expand All @@ -27,10 +33,12 @@ When Jira, Confluence, or Bitbucket Data Center release new versions, we will va

# Installation

1. Download and install [JDK 8](https://www.oracle.com/java/technologies/javase-downloads.html). After installation `
1. Download and install [JDK 17](https://adoptium.net/en-GB/temurin/releases/?version=17). After installation `
java` command should be available in the terminal and `JAVA_HOME` environment variable should point to JDK installation directory.
Running `$JAVA_HOME/bin/java -version` should print a JDK version.
*Note*: Plugin can be compiled and run using **JDK 11**, but some old products may not support it.
> **Note:** Use [JDK 8](https://adoptium.net/en-GB/temurin/releases/?version=8) / [JDK 11](https://adoptium.net/en-GB/temurin/releases/?version=11) if working with the `release-1.x` branch
>
> **Note:** Plugin can be compiled and run using **JDK 11**, but some old products may not support it.
2. Download and install [Atlassian Plugin SDK](https://developer.atlassian.com/server/framework/atlassian-sdk/install-the-atlassian-sdk-on-a-linux-or-mac-system/).
After successful installation running `atlas-version` should print SDK version.
3. (Optional) Install [ngrok](https://ngrok.com/) to enable Slack -> product features (slash commands, unfurling).
Expand Down
3 changes: 0 additions & 3 deletions bin/build/install-common-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,5 @@ jira-slack-server-integration/jira-service-desk-compat/jira-service-desk-compat-
jira-slack-server-integration/jira-service-desk-compat/jira-service-desk-4-compat,\
jira-slack-server-integration/jira-service-desk-compat/jira-service-desk-compat-main,\
confluence-slack-integration,\
confluence-slack-integration/confluence-compat-common,\
confluence-slack-integration/confluence-7-compat,\
confluence-slack-integration/confluence-8-compat,\
slack-server-integration-test-common \
-Dmaven.test.skip=true
4 changes: 2 additions & 2 deletions bin/build/java-product-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"confluence-it": {
"java-version": ["17"],
"confluence-version": ["9.0.0-m81"]
"confluence-version": ["9.0.0-m72"]
},
"bitbucket-it": {
"java-version": ["17"],
Expand Down Expand Up @@ -55,4 +55,4 @@
]
}
}
}
}
3 changes: 3 additions & 0 deletions bin/build/run-confluence-its.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ if [[ ${XVFB_ENABLE} != false ]] ; then
export DISPLAY=:20
fi

# TODO: Remove -Denforcer.skip=true after moving from milestone versions

atlas-mvn --batch-mode verify \
${VERSION_ARG} \
-Dut.test.skip=true \
Expand All @@ -18,5 +20,6 @@ atlas-mvn --batch-mode verify \
-Dfailsafe.rerunFailingTestsCount=${RETRY_COUNT:-2} \
-Dfailsafe.forkedProcessExitTimeoutInSeconds=360 \
-Dfailsafe.exitTimeout=360 \
-Denforcer.skip=true \
-pl confluence-slack-integration/confluence-slack-server-integration-plugin \
"$@"
4 changes: 3 additions & 1 deletion bin/build/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
set -ex
trap 'set +ex' EXIT

# TODO: Remove -Denforcer.skip=true after moving from milestone versions

atlas-version
atlas-mvn --batch-mode verify -P jacoco
atlas-mvn --batch-mode verify -P jacoco -Denforcer.skip=true
13 changes: 0 additions & 13 deletions bin/pack-compat-confluence.sh

This file was deleted.

3 changes: 3 additions & 0 deletions bin/run-bitbucket.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ trap 'set +ex' EXIT
BB_NGROK="$(curl -s "http://127.0.0.1:4040/api/tunnels" | \
jq -r '.tunnels[] | select(.proto == "https") | select (.config.addr|endswith("'"7990"'")) | .public_url[8:]')"

# TODO: Remove -Denforcer.skip=true after moving from milestone versions

(
cd "$( dirname "${BASH_SOURCE[0]}")/.." ;

# set env var BB_NGROK to enable HTTPS

atlas-mvn bitbucket:debug \
-Denforcer.skip=true \
-Datlassian.dev.mode=true \
-Dmaven.test.skip=true \
-Dlogging.level.com.atlassian.bitbucket.plugins.slack=TRACE \
Expand Down
3 changes: 3 additions & 0 deletions bin/run-confluence.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/usr/bin/env bash

# TODO: Remove -Denforcer.skip=true after moving from milestone versions

(
cd "$( dirname "${BASH_SOURCE[0]}")/.." ;
atlas-mvn confluence:debug \
-Denforcer.skip=true \
-Datlassian.dev.mode=true \
-Dmaven.test.skip=true \
"$@" \
Expand Down
102 changes: 80 additions & 22 deletions bitbucket-slack-server-integration-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.atlassian.bitbucket.plugins</groupId>
<artifactId>bitbucket-slack-server-integration-plugin</artifactId>
<packaging>atlassian-plugin</packaging>
<version>4.0.11-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>

<name>Slack for Bitbucket Data Center</name>
<description>This is the Slack integration for Bitbucket Data Center</description>
Expand All @@ -18,8 +18,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<jvm17.opens />

<!-- default properties. copied from parent POM in order to allow to resolve plugin plugin dependencies during BBS build -->
Expand All @@ -35,36 +35,41 @@
<project.scm.id>github</project.scm.id>

<!-- dependency versions -->
<atlassian.spring.scanner.version>2.1.7</atlassian.spring.scanner.version>
<atlassian.spring.scanner.version>5.0.0</atlassian.spring.scanner.version>
<junit.jupiter.version>5.7.1</junit.jupiter.version>
<mockito-core.version>2.25.0</mockito-core.version>
<atlassian.selenium.version>3.0.0</atlassian.selenium.version>
<atlassian-json-api.version>0.9</atlassian-json-api.version>
<atlassian-concurrent.version>3.0.0</atlassian-concurrent.version>
<commons-codec.version>1.11</commons-codec.version>
<slack.common.version>1.1.13</slack.common.version>
<slack.common.version>2.0.0</slack.common.version>

<!-- product properties -->
<plugin.key>${project.groupId}.${project.artifactId}</plugin.key>
<bitbucket.api.version>7.6.0</bitbucket.api.version>
<bitbucket.version>7.6.0</bitbucket.version>
<bitbucket.api.version>9.0.0-plat-7-m20</bitbucket.api.version>
<bitbucket.version>9.0.0-plat-7-m20</bitbucket.version>
<bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
<bitbucket.amps.version>8.2.2</bitbucket.amps.version>
<platform.version>5.0.0</platform.version>
<platform.version>7.0.0</platform.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.atlassian.platform</groupId>
<artifactId>platform</artifactId>
<groupId>com.atlassian.platform.dependencies</groupId>
<artifactId>platform-public-api</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.atlassian.platform</groupId>
<artifactId>third-party</artifactId>
<groupId>com.atlassian.platform.dependencies</groupId>
<artifactId>platform-test-resources</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.atlassian.platform.dependencies</groupId>
<artifactId>platform-internal-api</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
Expand Down Expand Up @@ -156,7 +161,6 @@
<dependency>
<groupId>com.atlassian.json</groupId>
<artifactId>atlassian-json-api</artifactId>
<version>${atlassian-json-api.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -166,7 +170,23 @@
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-common</artifactId>
<artifactId>atlassian-rest-v2-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -205,7 +225,6 @@
<dependency>
<groupId>com.atlassian.util.concurrent</groupId>
<artifactId>atlassian-util-concurrent</artifactId>
<version>${atlassian-concurrent.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -223,13 +242,23 @@
<artifactId>fugue</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.analytics</groupId>
<artifactId>analytics-api</artifactId>
<scope>provided</scope>
</dependency>

<!-- Other provided libs -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
Expand All @@ -242,14 +271,13 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -313,11 +341,13 @@
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -369,6 +399,34 @@
<artifactId>bitbucket-it-common</artifactId>
<version>${bitbucket.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>2.42</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.atlassian.plugin.module.ModuleFactory;
import com.atlassian.plugin.spring.scanner.annotation.imports.ComponentImport;
import com.atlassian.plugin.web.WebInterfaceManager;
import com.atlassian.plugin.webresource.WebResourceUrlProvider;
import com.atlassian.sal.api.ApplicationProperties;
import com.atlassian.sal.api.auth.LoginUriProvider;
import com.atlassian.sal.api.executor.ThreadLocalDelegateExecutorFactory;
Expand All @@ -35,6 +34,7 @@
import com.atlassian.sal.api.web.context.HttpContext;
import com.atlassian.soy.renderer.SoyTemplateRenderer;
import com.atlassian.templaterenderer.TemplateRenderer;
import com.atlassian.webresource.api.WebResourceUrlProvider;
import com.atlassian.webresource.api.assembler.PageBuilderService;

@SuppressWarnings("unused")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import com.atlassian.plugins.slack.util.AsyncExecutor;
import com.atlassian.plugins.slack.util.ErrorResponse;
import com.atlassian.sal.api.message.I18nResolver;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.seratch.jslack.api.model.dialog.Dialog;
import com.github.seratch.jslack.api.model.dialog.DialogElement;
import com.github.seratch.jslack.api.model.dialog.DialogTextAreaElement;
import org.codehaus.jackson.map.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Loading

0 comments on commit 91b946a

Please sign in to comment.