Skip to content

Commit 09402d3

Browse files
getsaurabh02lezzagomch2ryanbogandblock
authored
Backport main changes to 1.x (#126)
* Fix copyright notice and add DCO check workflow (#94) Signed-off-by: Ashish Agrawal <ashisagr@amazon.com> * Update build.sh script to include optional platform param. (#95) Signed-off-by: Marc Handalian <handalm@amazon.com> * Add codeowners support for repo (#96) Signed-off-by: Ryan Bogan <10944539+ryanbogan@users.noreply.github.com> * Bump version to 1.3 (#99) Signed-off-by: Ashish Agrawal <ashisagr@amazon.com> * Auto-increment version on new release tags. (#106) Signed-off-by: Daniel Doubrovkine (dB.) <dblock@dblock.org> * Remove jcenter repository (#115) Signed-off-by: Peter Nied <peternied@hotmail.com> * Using Github App token to trigger CI for version increment PRs (#116) Signed-off-by: Vacha Shah <vachshah@amazon.com> * Fixes copyright headers (#117) Signed-off-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com> * Remove jcenter repository missed on first pass (#118) Signed-off-by: Peter Nied <petern@amazon.com> * Run CI/CD on Java 8, 11, 14 and 17. (#121) * Run CI/CD on Java 8, 11, 14 and 17. Signed-off-by: Daniel Doubrovkine (dB.) <dblock@dblock.org> * Add JDK 17. Signed-off-by: Daniel Doubrovkine (dB.) <dblock@dblock.org> * Add .whitesource configuration file (#109) Co-authored-by: whitesource-for-github-com[bot] <50673670+whitesource-for-github-com[bot]@users.noreply.github.com> Co-authored-by: Ashish Agrawal <ashisagr@amazon.com> Co-authored-by: Marc Handalian <handalm@amazon.com> Co-authored-by: Ryan Bogan <10944539+ryanbogan@users.noreply.github.com> Co-authored-by: Daniel Doubrovkine (dB.) <dblock@dblock.org> Co-authored-by: Peter Nied <peternied@hotmail.com> Co-authored-by: Vacha Shah <vachshah@amazon.com> Co-authored-by: Drew Baugher <46505179+dbbaughe@users.noreply.github.com> Co-authored-by: Peter Nied <petern@amazon.com> Co-authored-by: whitesource-for-github-com[bot] <50673670+whitesource-for-github-com[bot]@users.noreply.github.com>
1 parent 2430990 commit 09402d3

File tree

122 files changed

+316
-2516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+316
-2516
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams
2+
* @opensearch-project/common-utils

.github/workflows/ci-17.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and Test
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
pull_request:
7+
branches:
8+
- "*"
9+
10+
jobs:
11+
build:
12+
13+
name: Build and Test (17)
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Setup Java 11
21+
uses: actions/setup-java@v2
22+
with:
23+
distribution: 'temurin'
24+
java-version: 11
25+
26+
- name: Build
27+
run: |
28+
./gradlew build --build-cache
29+
30+
- name: Setup Java 17
31+
uses: actions/setup-java@v2
32+
with:
33+
distribution: 'temurin'
34+
java-version: 17
35+
36+
- name: Test
37+
run: |
38+
./gradlew test --build-cache
39+
40+

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ jobs:
1111
build:
1212
strategy:
1313
matrix:
14-
java: [14]
14+
java:
15+
- 8
16+
- 11
17+
- 14
1518

1619
name: Build and Test
1720
runs-on: ubuntu-latest
@@ -25,14 +28,13 @@ jobs:
2528
with:
2629
java-version: ${{ matrix.java }}
2730

28-
# common-utils
2931
- name: Build and Test
3032
run: |
31-
./gradlew build -Dopensearch.version=1.2.0-SNAPSHOT
33+
./gradlew build
3234
3335
- name: Publish to Maven Local
3436
run: |
35-
./gradlew publishToMavenLocal -Dopensearch.version=1.2.0-SNAPSHOT
37+
./gradlew publishToMavenLocal
3638
3739
- name: Upload Coverage Report
3840
uses: codecov/codecov-action@v1

.github/workflows/dco.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Developer Certificate of Origin Check
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
check:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Get PR Commits
11+
id: 'get-pr-commits'
12+
uses: tim-actions/get-pr-commits@v1.1.0
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
- name: DCO Check
16+
uses: tim-actions/dco@v1.1.0
17+
with:
18+
commits: ${{ steps.get-pr-commits.outputs.commits }}

.github/workflows/version.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Increment Version
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*.*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: GitHub App token
13+
id: github_app_token
14+
uses: tibdex/github-app-token@v1.5.0
15+
with:
16+
app_id: ${{ secrets.APP_ID }}
17+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
18+
installation_id: 22958780
19+
20+
- uses: actions/checkout@v2
21+
- name: Fetch Tag and Version Information
22+
run: |
23+
TAG=$(echo "${GITHUB_REF#refs/*/}")
24+
CURRENT_VERSION_ARRAY=($(echo "$TAG" | tr . '\n'))
25+
BASE=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:2}")
26+
CURRENT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
27+
CURRENT_VERSION_ARRAY[2]=$((CURRENT_VERSION_ARRAY[2]+1))
28+
NEXT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
29+
echo "TAG=$TAG" >> $GITHUB_ENV
30+
echo "BASE=$BASE" >> $GITHUB_ENV
31+
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
32+
echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_ENV
33+
- uses: actions/checkout@v2
34+
with:
35+
ref: ${{ env.BASE }}
36+
token: ${{ steps.github_app_token.outputs.token }}
37+
38+
- name: Increment Version
39+
run: |
40+
echo Incrementing $CURRENT_VERSION to $NEXT_VERSION
41+
sed -i "s/$CURRENT_VERSION-SNAPSHOT/$NEXT_VERSION-SNAPSHOT/g" build.gradle
42+
43+
- name: Create Pull Request
44+
uses: peter-evans/create-pull-request@v3
45+
with:
46+
token: ${{ steps.github_app_token.outputs.token }}
47+
base: ${{ env.BASE }}
48+
commit-message: Incremented version to ${{ env.NEXT_VERSION }}
49+
delete-branch: true
50+
title: '[AUTO] Incremented version to ${{ env.NEXT_VERSION }}.'
51+
body: |
52+
I've noticed that a new tag ${{ env.TAG }} was pushed, and incremented the version from ${{ env.CURRENT_VERSION }} to ${{ env.NEXT_VERSION }}.

.whitesource

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"scanSettings": {
3+
"configMode": "AUTO",
4+
"configExternalURL": "",
5+
"projectToken": "",
6+
"baseBranches": []
7+
},
8+
"checkRunSettings": {
9+
"vulnerableCheckRunConclusionLevel": "failure",
10+
"displayMode": "diff"
11+
},
12+
"issueSettings": {
13+
"minSeverityLevel": "LOW"
14+
}
15+
}

CONTRIBUTING.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,51 @@
11
## Contributing to this Project
22

33
OpenSearch is a community project that is built and maintained by people just like **you**.
4-
[This document](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) explains how you can contribute to this and related projects.
4+
[This document](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) explains how you can contribute to this and related projects.
5+
6+
## Developer Certificate of Origin
7+
8+
OpenSearch is an open source product released under the Apache 2.0 license (see either [the Apache site](https://www.apache.org/licenses/LICENSE-2.0) or the [LICENSE.txt file](LICENSE.txt)). The Apache 2.0 license allows you to freely use, modify, distribute, and sell your own products that include Apache 2.0 licensed software.
9+
10+
We respect intellectual property rights of others and we want to make sure all incoming contributions are correctly attributed and licensed. A Developer Certificate of Origin (DCO) is a lightweight mechanism to do that.
11+
12+
The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](http://developercertificate.org/).
13+
14+
```
15+
Developer's Certificate of Origin 1.1
16+
17+
By making a contribution to this project, I certify that:
18+
19+
(a) The contribution was created in whole or in part by me and I
20+
have the right to submit it under the open source license
21+
indicated in the file; or
22+
23+
(b) The contribution is based upon previous work that, to the
24+
best of my knowledge, is covered under an appropriate open
25+
source license and I have the right under that license to
26+
submit that work with modifications, whether created in whole
27+
or in part by me, under the same open source license (unless
28+
I am permitted to submit under a different license), as
29+
Indicated in the file; or
30+
31+
(c) The contribution was provided directly to me by some other
32+
person who certified (a), (b) or (c) and I have not modified
33+
it.
34+
35+
(d) I understand and agree that this project and the contribution
36+
are public and that a record of the contribution (including
37+
all personal information I submit with it, including my
38+
sign-off) is maintained indefinitely and may be redistributed
39+
consistent with this project or the open source license(s)
40+
involved.
41+
```
42+
43+
We require that every contribution to OpenSearch is signed with a Developer Certificate of Origin. Additionally, please use your real name. We do not accept anonymous contributors nor those utilizing pseudonyms.
44+
45+
Each commit must include a DCO which looks like this
46+
47+
```
48+
Signed-off-by: Jane Smith <jane.smith@email.com>
49+
```
50+
51+
You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `– – signoff` to add the `Signed-off-by` line to the end of the commit message.

DEVELOPER_GUIDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- [Developer Guide](#developer-guide)
22
- [Forking and Cloning](#forking-and-cloning)
33
- [Install Prerequisites](#install-prerequisites)
4-
- [JDK 14](#jdk-14)
4+
- [JDK 11](#jdk-11)
55
- [Building](#building)
66
- [Using IntelliJ IDEA](#using-intellij-idea)
77
- [Submitting Changes](#submitting-changes)
@@ -16,9 +16,9 @@ Fork this repository on GitHub, and clone locally with `git clone`.
1616

1717
### Install Prerequisites
1818

19-
#### JDK 14
19+
#### JDK 11
2020

21-
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`.
21+
OpenSearch components build using Java 11 at a minimum. 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`.
2222

2323
### Building
2424

NOTICE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
OpenSearch
2-
Copyright 2021 OpenSearch Contributors
1+
OpenSearch (https://opensearch.org/)
2+
Copyright OpenSearch Contributors
33

44
This product includes software developed by
55
Elasticsearch (http://www.elastic.co).

build.gradle

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
/*
2+
* Copyright OpenSearch Contributors
23
* SPDX-License-Identifier: Apache-2.0
3-
*
4-
* The OpenSearch Contributors require contributions made to
5-
* this file be licensed under the Apache-2.0 license or a
6-
* compatible open source license.
7-
*
8-
* Modifications Copyright OpenSearch Contributors. See
9-
* GitHub history for details.
104
*/
115

126
buildscript {
137
ext {
148
opensearch_group = "org.opensearch"
15-
opensearch_version = System.getProperty("opensearch.version", "1.2.0-SNAPSHOT")
9+
opensearch_version = System.getProperty("opensearch.version", "1.3.0-SNAPSHOT")
1610
kotlin_version = System.getProperty("kotlin.version", "1.4.32")
1711
}
1812

1913
repositories {
2014
mavenLocal()
2115
mavenCentral()
2216
maven { url "https://plugins.gradle.org/m2/" }
23-
jcenter()
2417
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
2518
}
2619

@@ -42,7 +35,6 @@ repositories {
4235
mavenLocal()
4336
mavenCentral()
4437
maven { url "https://plugins.gradle.org/m2/" }
45-
jcenter()
4638
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
4739
}
4840

0 commit comments

Comments
 (0)