Skip to content

Commit 805026f

Browse files
committed
initial commit
Signed-off-by: zane-neo <[email protected]>
1 parent 11fde1e commit 805026f

Some content is hidden

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

43 files changed

+2235
-56
lines changed

Diff for: .codecov.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
codecov:
2+
require_ci_to_pass: yes
3+
4+
coverage:
5+
precision: 2
6+
round: down
7+
range: "75...100"
8+
status:
9+
project:
10+
default:
11+
target: 75% # the required coverage value
12+
threshold: 1% # the leniency in hitting the target

Diff for: .eclipseformat.xml

+362
Large diffs are not rendered by default.

Diff for: .github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @b4sjoo @dhrubo-os @jngz-es @model-collapse @rbhavna @wujunshen @ylwu-amzn @zane-neo @Zhangxunmt @xinyual

Diff for: .github/ISSUE_TEMPLATE/bug_report.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: 🐛 Bug report
3+
about: Create a report to help us improve
4+
title: '[BUG]'
5+
labels: 'bug, untriaged'
6+
assignees: ''
7+
---
8+
9+
**What is the bug?**
10+
A clear and concise description of the bug.
11+
12+
**How can one reproduce the bug?**
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. Scroll down to '....'
17+
4. See error
18+
19+
**What is the expected behavior?**
20+
A clear and concise description of what you expected to happen.
21+
22+
**What is your host/environment?**
23+
- OS: [e.g. iOS]
24+
- Version [e.g. 22]
25+
- Plugins
26+
27+
**Do you have any screenshots?**
28+
If applicable, add screenshots to help explain your problem.
29+
30+
**Do you have any additional context?**
31+
Add any other context about the problem.

Diff for: .github/ISSUE_TEMPLATE/config.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
contact_links:
2+
- name: OpenSearch Community Support
3+
url: https://discuss.opendistrocommunity.dev/
4+
about: Please ask and answer questions here.
5+
- name: AWS/Amazon Security
6+
url: https://aws.amazon.com/security/vulnerability-reporting/
7+
about: Please report security vulnerabilities here.

Diff for: .github/ISSUE_TEMPLATE/feature_request.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: 🎆 Feature request
3+
about: Request a feature in this project
4+
title: '[FEATURE]'
5+
labels: 'enhancement, untriaged'
6+
assignees: ''
7+
---
8+
**Is your feature request related to a problem?**
9+
A clear and concise description of what the problem is, e.g. _I'm always frustrated when [...]_
10+
11+
**What solution would you like?**
12+
A clear and concise description of what you want to happen.
13+
14+
**What alternatives have you considered?**
15+
A clear and concise description of any alternative solutions or features you've considered.
16+
17+
**Do you have any additional context?**
18+
Add any other context or screenshots about the feature request here.

Diff for: .github/PULL_REQUEST_TEMPLATE.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Description
2+
[Describe what this change achieves]
3+
4+
### Issues Resolved
5+
[List any issues this PR will resolve]
6+
7+
### Check List
8+
- [ ] New functionality includes testing.
9+
- [ ] All tests pass
10+
- [ ] New functionality has been documented.
11+
- [ ] New functionality has javadoc added
12+
- [ ] Commits are signed per the DCO using --signoff
13+
14+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
15+
For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

Diff for: .github/workflows/auto-release.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Releases
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: GitHub App token
16+
id: github_app_token
17+
uses: tibdex/[email protected]
18+
with:
19+
app_id: ${{ secrets.APP_ID }}
20+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
21+
installation_id: 22958780
22+
- name: Get tag
23+
id: tag
24+
uses: dawidd6/action-get-tag@v1
25+
- uses: actions/checkout@v2
26+
- uses: ncipollo/release-action@v1
27+
with:
28+
github_token: ${{ steps.github_app_token.outputs.token }}
29+
bodyFile: release-notes/opensearch-agent-tools.release-notes-${{steps.tag.outputs.tag}}.md

Diff for: .github/workflows/backport.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
name: Backport
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
- labeled
8+
9+
jobs:
10+
backport:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
name: Backport
16+
steps:
17+
- name: GitHub App token
18+
id: github_app_token
19+
uses: tibdex/[email protected]
20+
with:
21+
app_id: ${{ secrets.APP_ID }}
22+
private_key: ${{ secrets.APP_PRIVATE_KEY }}
23+
installation_id: 22958780
24+
25+
- name: Backport
26+
uses: VachaShah/[email protected]
27+
with:
28+
github_token: ${{ steps.github_app_token.outputs.token }}
29+
branch_name: backport/backport-${{ github.event.number }}
30+
labels_template: "<%= JSON.stringify([...labels, 'autocut']) %>"
31+
failure_labels: "failed backport"

Diff for: .github/workflows/ci.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Build and Test
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
pull_request:
7+
branches:
8+
- "*"
9+
10+
jobs:
11+
Get-CI-Image-Tag:
12+
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main
13+
with:
14+
product: opensearch
15+
16+
build-linux:
17+
needs: Get-CI-Image-Tag
18+
strategy:
19+
matrix:
20+
java:
21+
- 11
22+
- 17
23+
- 21
24+
name: Build and Test
25+
runs-on: ubuntu-latest
26+
container:
27+
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
28+
# this image tag is subject to change as more dependencies and updates will arrive over time
29+
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
30+
# need to switch to root so that github actions can install runner binary on container without permission issues.
31+
options: --user root
32+
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v2
36+
37+
- name: Setup Java ${{ matrix.java }}
38+
uses: actions/setup-java@v1
39+
with:
40+
java-version: ${{ matrix.java }}
41+
42+
- name: Build and Test
43+
run: |
44+
chown -R 1000:1000 `pwd`
45+
su `id -un 1000` -c "./gradlew build &&
46+
./gradlew publishToMavenLocal"
47+
48+
- name: Upload Coverage Report
49+
uses: codecov/codecov-action@v1
50+
with:
51+
token: ${{ secrets.CODECOV_TOKEN }}
52+
53+
build-windows:
54+
strategy:
55+
matrix:
56+
java:
57+
- 11
58+
- 17
59+
- 21
60+
name: Build and Test
61+
runs-on: windows-latest
62+
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v2
66+
67+
- name: Setup Java ${{ matrix.java }}
68+
uses: actions/setup-java@v1
69+
with:
70+
java-version: ${{ matrix.java }}
71+
72+
- name: Build and Test
73+
run: |
74+
./gradlew build
75+
76+
- name: Publish to Maven Local
77+
run: |
78+
./gradlew publishToMavenLocal
79+
80+
- name: Upload Coverage Report
81+
uses: codecov/codecov-action@v1
82+
with:
83+
token: ${{ secrets.CODECOV_TOKEN }}
84+

Diff for: .github/workflows/delete_backport_branch.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Delete merged branch of the backport PRs
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
jobs:
8+
delete-branch:
9+
runs-on: ubuntu-latest
10+
if: startsWith(github.event.pull_request.head.ref,'backport/')
11+
steps:
12+
- name: Delete merged branch
13+
uses: SvanBoxel/delete-merged-branch@main
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/maven-publish.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish snapshots to maven
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- '[0-9]+.[0-9]+'
9+
- '[0-9]+.x'
10+
jobs:
11+
build-and-publish-snapshots:
12+
strategy:
13+
fail-fast: false
14+
if: github.repository == 'opensearch-project/agent-tools'
15+
runs-on: ubuntu-latest
16+
17+
permissions:
18+
id-token: write
19+
contents: write
20+
21+
steps:
22+
- uses: actions/setup-java@v3
23+
with:
24+
distribution: temurin # Temurin is a distribution of adoptium
25+
java-version: 17
26+
- uses: actions/checkout@v3
27+
- uses: aws-actions/configure-aws-credentials@v1
28+
with:
29+
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
30+
aws-region: us-east-1
31+
- name: publish snapshots to maven
32+
run: |
33+
export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
34+
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
35+
echo "::add-mask::$SONATYPE_USERNAME"
36+
echo "::add-mask::$SONATYPE_PASSWORD"
37+
./gradlew publishShadowPublicationToSnapshotsRepository

Diff for: .github/workflows/version.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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/[email protected]
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+
signoff: true
50+
delete-branch: true
51+
title: '[AUTO] Incremented version to ${{ env.NEXT_VERSION }}.'
52+
body: |
53+
I've noticed that a new tag ${{ env.TAG }} was pushed, and incremented the version from ${{ env.CURRENT_VERSION }} to ${{ env.NEXT_VERSION }}.

Diff for: .gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
buildSrc/libs
2+
.gradle/
3+
build/
4+
.idea/
5+
!.idea/codeStyles/codeStyleConfig.xml
6+
.DS_Store
7+
*.log
8+
out/
9+
.classpath
10+
.project
11+
.settings
12+
.vscode
13+
bin/

Diff for: .whitesource

+15
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+
}

Diff for: ADMINS.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Admins
2+
3+
| Admin | GitHub ID | Affiliation |
4+
| --------------- | --------------------------------------- | ----------- |
5+
| Henri Yandell | [hyandell](https://github.com/hyandell) | Amazon |
6+
7+
[This document](https://github.com/opensearch-project/.github/blob/main/ADMINS.md) explains what admins do in this repo. and how they should be doing it. If you're interested in becoming a maintainer, see [MAINTAINERS](MAINTAINERS.md). If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).

0 commit comments

Comments
 (0)