-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Peter Zhu <[email protected]>
- Loading branch information
1 parent
442340e
commit 899ec1e
Showing
8 changed files
with
366 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Apply 'untriaged' label during issue lifecycle | ||
|
||
on: | ||
issues: | ||
types: [opened, reopened, transferred] | ||
|
||
jobs: | ||
apply-label: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['untriaged'] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Releases | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: GitHub App token | ||
id: github_app_token | ||
uses: tibdex/[email protected] | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
installation_id: 22958780 | ||
- name: Get tag | ||
id: tag | ||
uses: dawidd6/action-get-tag@v1 | ||
- uses: actions/checkout@v2 | ||
- uses: ncipollo/release-action@v1 | ||
with: | ||
github_token: ${{ steps.github_app_token.outputs.token }} | ||
bodyFile: release-notes/opensearch-asynchronous-search.release-notes-${{steps.tag.outputs.tag}}.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Backport | ||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
- labeled | ||
|
||
jobs: | ||
backport: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
name: Backport | ||
steps: | ||
- name: GitHub App token | ||
id: github_app_token | ||
uses: tibdex/[email protected] | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
installation_id: 22958780 | ||
|
||
- name: Backport | ||
uses: VachaShah/[email protected] | ||
with: | ||
github_token: ${{ steps.github_app_token.outputs.token }} | ||
branch_name: backport/backport-${{ github.event.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,16 +47,15 @@ jobs: | |
id: step-build-test-linux | ||
run: | | ||
chown -R 1000:1000 `pwd` | ||
su `id -un 1000` -c "./gradlew assemble" | ||
su `id -un 1000` -c "./gradlew build" | ||
plugin=`basename $(ls build/distributions/*.zip)` | ||
echo plugin $plugin | ||
mv -v build/distributions/$plugin ./ | ||
echo "build-test-linux=$plugin" >> $GITHUB_OUTPUT | ||
#run: ./gradlew build | ||
# - name: Uploads coverage | ||
# uses: codecov/[email protected] | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Uploads coverage | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: async-plugin-linux-${{ matrix.java }} | ||
|
@@ -137,60 +136,60 @@ jobs: | |
name: logs | ||
path: build/testclusters/integTest-*/logs/* | ||
|
||
# windows-build: | ||
# # Job name | ||
# name: Build Asynchronous Search | ||
# # This job runs on Windows. | ||
# runs-on: windows-latest | ||
# steps: | ||
# # This step uses the setup-java Github action: https://github.com/actions/setup-java | ||
# - name: Set Up JDK 11 | ||
# uses: actions/setup-java@v1 | ||
# with: | ||
# java-version: 11 | ||
# # This step uses the checkout Github action: https://github.com/actions/checkout | ||
# - name: Checkout Branch | ||
# uses: actions/checkout@v2 | ||
# - name: Build with Gradle | ||
# run: ./gradlew.bat build -x integTest -x jacocoTestReport | ||
# env: | ||
# _JAVA_OPTIONS: -Xmx4096M | ||
# - name: Create Artifact Path | ||
# run: | | ||
# mkdir -p asynchronous-search-artifacts | ||
# cp ./build/distributions/*.zip asynchronous-search-artifacts | ||
# # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact | ||
# - name: Upload Artifacts | ||
# uses: actions/upload-artifact@v1 | ||
# with: | ||
# name: asynchronous-search-plugin-windows | ||
# path: asynchronous-search-artifacts | ||
# | ||
# mac-os-build: | ||
# # Job name | ||
# name: Build Asynchronous Search | ||
# # This job runs on Mac OS. | ||
# runs-on: macos-latest | ||
# steps: | ||
# # This step uses the setup-java Github action: https://github.com/actions/setup-java | ||
# - name: Set Up JDK 11 | ||
# uses: actions/setup-java@v1 | ||
# with: | ||
# java-version: 11 | ||
# # This step uses the checkout Github action: https://github.com/actions/checkout | ||
# - name: Checkout Branch | ||
# uses: actions/checkout@v2 | ||
# - name: Build with Gradle | ||
# run: ./gradlew build -x integTest -x jacocoTestReport | ||
# env: | ||
# _JAVA_OPTIONS: -Xmx4096M | ||
# - name: Create Artifact Path | ||
# run: | | ||
# mkdir -p asynchronous-search-artifacts | ||
# cp ./build/distributions/*.zip asynchronous-search-artifacts | ||
# # This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact | ||
# - name: Upload Artifacts | ||
# uses: actions/upload-artifact@v1 | ||
# with: | ||
# name: asynchronous-search-plugin-mac | ||
# path: asynchronous-search-artifacts | ||
windows-build: | ||
# Job name | ||
name: Build Asynchronous Search | ||
# This job runs on Windows. | ||
runs-on: windows-latest | ||
steps: | ||
# This step uses the setup-java Github action: https://github.com/actions/setup-java | ||
- name: Set Up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
# This step uses the checkout Github action: https://github.com/actions/checkout | ||
- name: Checkout Branch | ||
uses: actions/checkout@v2 | ||
- name: Build with Gradle | ||
run: ./gradlew.bat build -x integTest -x jacocoTestReport | ||
env: | ||
_JAVA_OPTIONS: -Xmx4096M | ||
- name: Create Artifact Path | ||
run: | | ||
mkdir -p asynchronous-search-artifacts | ||
cp ./build/distributions/*.zip asynchronous-search-artifacts | ||
# This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: asynchronous-search-plugin-windows | ||
path: asynchronous-search-artifacts | ||
|
||
mac-os-build: | ||
# Job name | ||
name: Build Asynchronous Search | ||
# This job runs on Mac OS. | ||
runs-on: macos-latest | ||
steps: | ||
# This step uses the setup-java Github action: https://github.com/actions/setup-java | ||
- name: Set Up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
# This step uses the checkout Github action: https://github.com/actions/checkout | ||
- name: Checkout Branch | ||
uses: actions/checkout@v2 | ||
- name: Build with Gradle | ||
run: ./gradlew build -x integTest -x jacocoTestReport | ||
env: | ||
_JAVA_OPTIONS: -Xmx4096M | ||
- name: Create Artifact Path | ||
run: | | ||
mkdir -p asynchronous-search-artifacts | ||
cp ./build/distributions/*.zip asynchronous-search-artifacts | ||
# This step uses the upload-artifact Github action: https://github.com/actions/upload-artifact | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: asynchronous-search-plugin-mac | ||
path: asynchronous-search-artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Delete merged branch of the backport PRs | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
delete-branch: | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.pull_request.head.ref,'backport/') | ||
steps: | ||
- name: Delete merged branch | ||
uses: SvanBoxel/delete-merged-branch@main | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish snapshots to maven | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'main' | ||
- '2.*' | ||
|
||
jobs: | ||
build-and-publish-snapshots: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin # Temurin is a distribution of adoptium | ||
java-version: 11 | ||
- uses: actions/checkout@v3 | ||
- uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} | ||
aws-region: us-east-1 | ||
- name: publish snapshots to maven | ||
run: | | ||
export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text) | ||
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text) | ||
echo "::add-mask::$SONATYPE_USERNAME" | ||
echo "::add-mask::$SONATYPE_PASSWORD" | ||
./gradlew publishPluginZipPublicationToSnapshotsRepository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Multi node test workflow | ||
|
||
env: | ||
java_version: 11 | ||
# This workflow is triggered on pull requests to master | ||
on: | ||
pull_request: | ||
branches: | ||
- "*" | ||
push: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
Get-CI-Image-Tag: | ||
uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main | ||
with: | ||
product: opensearch | ||
|
||
build: | ||
# Job name | ||
needs: Get-CI-Image-Tag | ||
name: Build Asynchronous Search | ||
# This job runs on Linux | ||
runs-on: ubuntu-latest | ||
container: | ||
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution | ||
# this image tag is subject to change as more dependencies and updates will arrive over time | ||
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} | ||
# need to switch to root so that github actions can install runner binary on container without permission issues. | ||
options: --user root | ||
|
||
steps: | ||
# This step uses the setup-java Github action: https://github.com/actions/setup-java | ||
- name: Set Up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: ${{ env.java_version }} | ||
# This step uses the checkout Github action: https://github.com/actions/checkout | ||
- name: Checkout Branch | ||
uses: actions/checkout@v2 | ||
- name: Run integration tests with multi node config | ||
run: | | ||
chown -R 1000:1000 `pwd` | ||
su `id -un 1000` -c "./gradlew integTest -PnumNodes=5" | ||
- name: Run Backwards Compatibility Tests | ||
run: | | ||
echo "Running backwards compatibility tests ..." | ||
chown -R 1000:1000 `pwd` | ||
su `id -un 1000` -c "./gradlew bwcTestSuite -Dtests.security.manager=false" | ||
- name: Upload failed logs | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: logs | ||
path: build/testclusters/integTest-*/logs/* |
Oops, something went wrong.