Skip to content

Commit

Permalink
Merge e4cc8b0 into c135544
Browse files Browse the repository at this point in the history
  • Loading branch information
pkgajulapalli authored Oct 4, 2024
2 parents c135544 + e4cc8b0 commit cc00b98
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 6 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/build-jar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,22 @@ jobs:
- name: Set input tag
run: echo "INPUT_TAG=${{ inputs.tags }}" >> $GITHUB_ENV

- name: Upload JAR files to Release
- name: Publish with Gradle
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
branch_name=$(git rev-parse --abbrev-ref HEAD)
if [[ "$branch_name" == "release-v"* ]]; then
version_number=${branch_name:9}
echo "Publishing release branch"
./gradlew publish -PbuildRelease=true -Pversion=${version_number}
else
echo "Publishing snapshot release"
./gradlew publish -Pversion="0.0.${{ github.event.pull_request.number }}-SNAPSHOT"
fi
- name: Upload lakeview jar file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -47,7 +62,7 @@ jobs:
asset_name: LakeView-${{ env.INPUT_TAG }}-all.jar
asset_content_type: application/java-archive

- name: Upload JAR files to Release
- name: Upload lakeview source jar file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -57,7 +72,7 @@ jobs:
asset_name: LakeView-${{ env.INPUT_TAG }}-sources.jar
asset_content_type: application/java-archive

- name: Upload JAR files to Release
- name: Upload lakeview-glue jar file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -67,7 +82,7 @@ jobs:
asset_name: lakeview-glue-${{ env.INPUT_TAG }}-all.jar
asset_content_type: application/java-archive

- name: Upload JAR files to Release
- name: Upload lakeview-glue source jar file to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
52 changes: 50 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ sonar {
property "sonar.pullrequest.key", project.getProperty("pullrequest_key")
property "sonar.pullrequest.branch", project.getProperty("pullrequest_branch")
property "sonar.pullrequest.base", project.getProperty("pullrequest_base")
property "sonar.pullrequest.github.repository", "https://github.com/onehouseinc/gateway-controller"
property "sonar.pullrequest.github.repository", "https://github.com/onehouseinc/LakeView"
} else {
property "sonar.branch.name", project.getProperty("branch_name")
}
Expand All @@ -84,7 +84,7 @@ tasks.getByPath('sonar').setDependsOn([])
tasks.getByPath('sonar').setMustRunAfter([])

group = 'ai.onehouse'
version = '1.0-SNAPSHOT'
version = project.hasProperty('version') ? project.version : '1.0-SNAPSHOT'

repositories {
mavenCentral()
Expand All @@ -105,6 +105,7 @@ subprojects {
apply plugin: 'application'
apply plugin: 'io.freefair.lombok'
apply plugin: 'com.diffplug.spotless'
apply plugin: "maven-publish"

compileJava {
options.compilerArgs << '-Xlint:unchecked'
Expand All @@ -117,7 +118,54 @@ subprojects {
from sourceSets.main.allSource
}

artifacts {
archives sourceJar
}

build.dependsOn sourceJar

publishing {
repositories {
maven {
url = project.hasProperty('buildRelease') ?
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" :
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
credentials {
username = System.getenv("SONATYPE_USER")
password = System.getenv("SONATYPE_PASSWORD")
}
}
}

publications {
mavenJava(MavenPublication) {
groupId 'ai.onehouse'
artifactId project.name
version = project.version

from components.java

pom {
name.set("LakeView")
description.set("LakeView is a free product provided by Onehouse for the Apache Hudi community. LakeView exposes an interactive interface with pre-built metrics, charts, and alerts to help you monitor, optimize, and debug your data lakehouse tables.")
url.set("https://www.onehouse.ai/product/lakeview")
licenses {
license {
name.set("Apache-2.0")
distribution.set("repo")
url.set("https://github.com/onehouseinc/LakeView/blob/main/LICENSE.txt")
}
}

scm {
connection.set("scm:git:ssh://github.com/onehouseinc/LakeView.git")
developerConnection.set("scm:git:ssh://github.com/onehouseinc/LakeView.git")
url.set("https://github.com/onehouseinc/LakeView")
}
}
}
}
}
}

// Configure Shadow plugin
Expand Down

0 comments on commit cc00b98

Please sign in to comment.