-
Notifications
You must be signed in to change notification settings - Fork 22
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: Harsha Vamsi Kalluri <harshavamsi096@gmail.com>
- Loading branch information
1 parent
5dd79e6
commit bc7d33f
Showing
7 changed files
with
101 additions
and
6 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/build-hive.yml → .github/workflows/build_hive.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build | ||
name: Build and test hive | ||
|
||
on: [push, pull_request] | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/build-mr.yml → .github/workflows/build_mr.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build | ||
name: Build and test MR | ||
|
||
on: [push, pull_request] | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/build-spark.yml → .github/workflows/build_spark.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build | ||
name: Build and test spark | ||
|
||
on: [push, pull_request] | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/build-spark-20.yml → .github/workflows/build_spark_20.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build | ||
name: Build and test spark 20 | ||
|
||
on: [push, pull_request] | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/build-spark-30.yml → .github/workflows/build_spark_30.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build | ||
name: Build and test spark 30 | ||
|
||
on: [push, pull_request] | ||
|
||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: Gradle Precommit | ||
on: [pull_request] | ||
on: [push,pull_request] | ||
|
||
jobs: | ||
precommit: | ||
|
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,95 @@ | ||
name: Publish snapshots to maven | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-publish-snapshots: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '8' | ||
cache: 'gradle' | ||
|
||
- name: 'Setup: Java 8 env' | ||
run: echo "JAVA8_HOME=$JAVA_HOME" >> $GITHUB_ENV | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: 'gradle' | ||
|
||
- name: 'Setup: Java 11 env' | ||
run: echo "JAVA11_HOME=$JAVA_HOME" >> $GITHUB_ENV | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: 'Setup: Java 17 env' | ||
run: echo "JAVA17_HOME=$JAVA_HOME" >> $GITHUB_ENV | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }} | ||
aws-region: us-east-1 | ||
|
||
- name: Read value from Properties-file | ||
id: read_property | ||
uses: christian-draeger/read-properties@1.1.1 | ||
with: | ||
path: 'buildSrc/opensearch-hadoop-version.properties' | ||
properties: 'opensearch_hadoop' | ||
|
||
- name: publish snapshots to build repositories | ||
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 :opensearch-hadoop-mr:publishMainPublicationToBuildRepository | ||
./gradlew :opensearch-hadoop-hive:publishMainPublicationToBuildRepository | ||
./gradlew -S -Dbuild.snapshot=true -Dorg.gradle.warning.mode=summary distribution | ||
- name: create snapshots maven folder and copy files | ||
run: | | ||
mkdir -p maven/org/opensearch/client | ||
mkdir -p maven/org/opensearch/client/opensearch-hadoop/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
mkdir -p maven/org/opensearch/client/opensearch-spark-20_2.10/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
mkdir -p maven/org/opensearch/client/opensearch-spark-20_2.11/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
mkdir -p maven/org/opensearch/client/opensearch-spark-20_2.12/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
mkdir -p maven/org/opensearch/client/opensearch-spark-30_2.12/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
mkdir -p maven/org/opensearch/client/opensearch-spark-30_2.13/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
cp -R mr/build/repo/org/opensearch/client/ maven/org/opensearch/client/ | ||
cp -R hive/build/repo/org/opensearch/client/ maven/org/opensearch/client/ | ||
cp -R dist/build/distributions/ maven/org/opensearch/client/opensearch-hadoop/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
cp -R spark/sql-20/build/distributions/opensearch-spark-20_2.10* maven/org/opensearch/client/opensearch-spark-20_2.10/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
cp -R spark/sql-20/build/distributions/opensearch-spark-20_2.11* maven/org/opensearch/client/opensearch-spark-20_2.11/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
cp -R spark/sql-20/build/distributions/opensearch-spark-20_2.12* maven/org/opensearch/client/opensearch-spark-20_2.12/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
cp -R spark/sql-30/build/distributions/opensearch-spark-30_2.12* maven/org/opensearch/client/opensearch-spark-30_2.12/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
cp -R spark/sql-30/build/distributions/opensearch-spark-30_2.13* maven/org/opensearch/client/opensearch-spark-30_2.13/${{ steps.read_property.outputs.opensearch_hadoop }} | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: 'opensearch-project/opensearch-build' | ||
path: 'build' | ||
|
||
- name: publish snapshots to maven | ||
run: | | ||
build/publish-snapshot.sh maven | ||