Skip to content

Commit

Permalink
Updated DEVELOPER_GUIDE.md and workflows to reference changes to the …
Browse files Browse the repository at this point in the history
…supported JDKs. (#338)

* Added support for JDK 8 and 14.

Signed-off-by: AWSHurneyt <[email protected]>

* Added support for JDK 8 and 14.

Signed-off-by: AWSHurneyt <[email protected]>

* Updated DEVELOPER_GUIDE.md to reference changes to the supported JDKs.

Signed-off-by: AWSHurneyt <[email protected]>

* Added additional release note.

Signed-off-by: AWSHurneyt <[email protected]>

* Updated DEVELOPER_GUIDE.md to reference changes to the supported JDKs.

Signed-off-by: AWSHurneyt <[email protected]>

* Updated DEVELOPER_GUIDE.md to reference changes to the supported JDKs.

Signed-off-by: AWSHurneyt <[email protected]>

* Updated workflows to build using JDK 11.

Signed-off-by: AWSHurneyt <[email protected]>

* Removing redundant JDK setup step.

Signed-off-by: AWSHurneyt <[email protected]>

* Fixed guide wording.

Signed-off-by: AWSHurneyt <[email protected]>

* Fixed guide wording.

Signed-off-by: AWSHurneyt <[email protected]>

* Reverted bwc workflow JDK.

Signed-off-by: AWSHurneyt <[email protected]>
  • Loading branch information
AWSHurneyt authored Mar 11, 2022
1 parent af55dd3 commit 9487c00
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/multi-node-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
java: [ 14 ]
java: [ 11 ]
# Job name
name: Build and test Alerting
# This job runs on Linux
Expand All @@ -26,10 +26,5 @@ jobs:
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
- name: Run integration tests with multi node config
run: ./gradlew integTest -PnumNodes=3 -Dopensearch.version=1.3.0-SNAPSHOT
6 changes: 3 additions & 3 deletions .github/workflows/security-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
java: [ 14 ]
java: [ 11 ]
# Job name
name: Build and test Alerting
# This job runs on Linux
Expand All @@ -27,10 +27,10 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@v2
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK 14
- name: Set Up JDK 11
uses: actions/setup-java@v1
with:
java-version: 14
java-version: 11
- name: Build Alerting
# Only assembling since the full build is governed by other workflows
run: ./gradlew assemble -Dopensearch.version=1.3.0-SNAPSHOT
Expand Down
23 changes: 21 additions & 2 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
- [Developer Guide](#developer-guide)
- [Forking and Cloning](#forking-and-cloning)
- [Install Prerequisites](#install-prerequisites)
- [JDK 11](#jdk-11)
- [JDK 14](#jdk-14)
- [Setup](#setup)
- [Build](#build)
Expand All @@ -18,14 +19,32 @@ Fork this repository on GitHub, and clone locally with `git clone`.

### Install Prerequisites

#### JDK 11

OpenSearch builds using Java 11 at a minimum, using the Adoptium distribution. This means you must have a JDK 11 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 11 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-11`. This is configured in [buildSrc/build.gradle](buildSrc/build.gradle) and [distribution/tools/java-version-checker/build.gradle](distribution/tools/java-version-checker/build.gradle).

```
allprojects {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
}
```

```
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
```

Download Java 11 from [here](https://adoptium.net/releases.html?variant=openjdk11).

#### JDK 14

OpenSearch components build using Java 14 at a minimum. This means you must have a JDK 14 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 14 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-14`.
To run the full suite of tests, download and install [JDK 14](https://jdk.java.net/archive/) and set `JAVA11_HOME`, and `JAVA14_HOME`. They are required by the [backwards compatibility test](./TESTING.md#testing-backwards-compatibility).

### Setup

1. Clone the repository (see [Forking and Cloning](#forking-and-cloning))
2. Make sure `JAVA_HOME` is pointing to a Java 14 JDK (see [Install Prerequisites](#install-prerequisites))
2. Make sure `JAVA_HOME` is pointing to a Java 11 JDK (see [Install Prerequisites](#install-prerequisites))
3. Launch Intellij IDEA, Choose Import Project and select the settings.gradle file in the root of this package.

### Build
Expand Down
3 changes: 2 additions & 1 deletion release-notes/opensearch-alerting.release-notes-1.3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ Compatible with OpenSearch 1.3.0
* Fix running Alerting security tests in GitHub Actions. ([#252](https://github.com/opensearch-project/alerting/pull/252))

### Documentation
* Added 1.3 release notes. ([#336](https://github.com/opensearch-project/alerting/pull/336))
* Added 1.3 release notes. ([#336](https://github.com/opensearch-project/alerting/pull/336))
* Updated DEVELOPER_GUIDE.md to reference changes to the supported JDKs. ([#338](https://github.com/opensearch-project/alerting/pull/338))

0 comments on commit 9487c00

Please sign in to comment.