-
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
1af04a4
commit e0e7abb
Showing
4 changed files
with
137 additions
and
2 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,118 @@ | ||
name: Release drafter | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
draft-a-release: | ||
name: Draft a release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- id: get_data | ||
run: | | ||
echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '* ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT | ||
echo "version=$(cat gradle.properties | grep "systemProp.version" | cut -d'=' -f2)" >> $GITHUB_OUTPUT | ||
- 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: 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: set required env variables | ||
run: | | ||
echo "MAVEN_HOME=maven" >> $GITHUB_ENV | ||
echo "MAVEN_HOME_CLIENT=maven/org/opensearch/client" >> $GITHUB_ENV | ||
echo "VERSION=${{ steps.read_property.outputs.opensearch_hadoop }}" >> $GITHUB_ENV | ||
- name: make directories | ||
run: | | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}" | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop/${{ env.VERSION }}" | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop-mr/${{ env.VERSION }}" | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop-hive/${{ env.VERSION }}" | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.10/${{ env.VERSION }}" | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.11/${{ env.VERSION }}" | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.12/${{ env.VERSION }}" | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-30_2.12/${{ env.VERSION }}" | ||
mkdir -p "${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-30_2.13/${{ env.VERSION }}" | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
|
||
- name: generate JARs | ||
run: | | ||
./gradlew clean -S -Dbuild.snapshot=false -Dorg.gradle.warning.mode=summary distribution --no-configuration-cache --no-daemon --info | ||
- name: copy JARs and POMs | ||
run: | | ||
cp -R mr/build/distributions/* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop-mr/${{ env.VERSION }} | ||
cp -R mr/build/poms/* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop-mr/${{ env.VERSION }} | ||
cp -R hive/build/distributions/* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop-hive/${{ env.VERSION }} | ||
cp -R hive/build/poms/* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop-hive/${{ env.VERSION }} | ||
cp -R dist/build/distributions/* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop/${{ env.VERSION }} | ||
cp -R dist/build/poms/* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-hadoop/${{ env.VERSION }} | ||
cp -R spark/sql-20/build/distributions/opensearch-spark-20_2.10* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.10/${{ env.VERSION }} | ||
cp -R spark/sql-20/build/poms/opensearch-spark-20_2.10* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.10/${{ env.VERSION }} | ||
cp -R spark/sql-20/build/distributions/opensearch-spark-20_2.11* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.11/${{ env.VERSION }} | ||
cp -R spark/sql-20/build/poms/opensearch-spark-20_2.11* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.11/${{ env.VERSION }} | ||
cp -R spark/sql-20/build/distributions/opensearch-spark-20_2.12* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.12/${{ env.VERSION }} | ||
cp -R spark/sql-20/build/poms/opensearch-spark-20_2.12* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-20_2.12/${{ env.VERSION }} | ||
cp -R spark/sql-30/build/distributions/opensearch-spark-30_2.12* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-30_2.12/${{ env.VERSION }} | ||
cp -R spark/sql-30/build/poms/opensearch-spark-30_2.12* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-30_2.12/${{ env.VERSION }} | ||
cp -R spark/sql-30/build/distributions/opensearch-spark-30_2.13* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-30_2.13/${{ env.VERSION }} | ||
cp -R spark/sql-30/build/poms/opensearch-spark-30_2.13* ${{ env.MAVEN_HOME_CLIENT }}/opensearch-spark-30_2.13/${{ env.VERSION }} | ||
- name: create artifacts | ||
run: | | ||
tar -cvf artifacts.tar.gz maven | ||
- uses: trstringer/manual-approval@v1 | ||
with: | ||
secret: ${{ github.TOKEN }} | ||
approvers: ${{ steps.get_data.outputs.approvers }} | ||
minimum-approvals: 1 | ||
issue-title: 'Release opensearch-hadoop : ${{ steps.get_data.outputs.version }}' | ||
issue-body: "Please approve or deny the release of opensearch-hadoop. **VERSION**: ${{ steps.get_data.outputs.version }} **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }}" | ||
|
||
- name: Draft a release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
generate_release_notes: true | ||
files: | | ||
artifacts.tar.gz |
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
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 @@ | ||
opensearch_hadoop = 1.0.0 | ||
opensearch = 3.0.0 | ||
opensearch = 2.7.0 | ||
lucene = 9.5.0-snapshot-a4ef70f | ||
build-tools = 3.0.0 | ||
build-tools = 2.7.0 |
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,16 @@ | ||
lib = library(identifier: 'jenkins@1.5.3', retriever: modernSCM([ | ||
$class: 'GitSCMSource', | ||
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', | ||
])) | ||
|
||
standardReleasePipelineWithGenericTrigger( | ||
tokenIdCredential: 'jenkins-opensearch-hadoop-generic-webhook-token', | ||
causeString: 'A tag was cut on opensearch-project/opensearch-hadoop repository causing this workflow to run', | ||
downloadReleaseAsset: true, | ||
publishRelease: true) { | ||
publishToMaven( | ||
signingArtifactsPath: "$WORKSPACE/maven/", | ||
mavenArtifactsPath: "$WORKSPACE/maven/", | ||
autoPublish: true | ||
) | ||
} |