Skip to content

Commit

Permalink
feat(datahub-client): additionally generates java8 artefacts (#12106)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgomezvillamor authored Dec 12, 2024
1 parent 507087a commit edca8ea
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish-datahub-jars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,52 @@ jobs:
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew -PreleaseVersion=${{ needs.setup.outputs.tag }} :metadata-integration:java:custom-plugin-lib:publish
./gradlew :metadata-integration:java:custom-plugin-lib:closeAndReleaseRepository --info
publish-java8:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
needs: ["check-secret", "setup"]
if: ${{ needs.check-secret.outputs.publish-enabled == 'true' }}
steps:
- uses: acryldata/sane-checkout-action@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 17
- uses: gradle/actions/setup-gradle@v3
- uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: checkout upstream repo
run: |
git remote add upstream https://github.com/datahub-project/datahub.git
git fetch upstream --tags --force --filter=tree:0
- name: publish datahub-client jar snapshot
if: ${{ github.event_name != 'release' }}
env:
RELEASE_USERNAME: ${{ secrets.RELEASE_USERNAME }}
RELEASE_PASSWORD: ${{ secrets.RELEASE_PASSWORD }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew :metadata-integration:java:datahub-client:printVersion -PjavaClassVersionDefault=8 -ParchiveAppendix=java8
./gradlew :metadata-integration:java:datahub-client:publish -PjavaClassVersionDefault=8 -ParchiveAppendix=java8
- name: release datahub-client jar
if: ${{ github.event_name == 'release' }}
env:
RELEASE_USERNAME: ${{ secrets.RELEASE_USERNAME }}
RELEASE_PASSWORD: ${{ secrets.RELEASE_PASSWORD }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew -PreleaseVersion=${{ needs.setup.outputs.tag }} :metadata-integration:java:datahub-client:publish -PjavaClassVersionDefault=8 -ParchiveAppendix=java8
./gradlew :metadata-integration:java:datahub-client:closeAndReleaseRepository --info -PjavaClassVersionDefault=8 -ParchiveAppendix=java8
6 changes: 6 additions & 0 deletions metadata-integration/java/datahub-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import org.apache.tools.ant.filters.ReplaceTokens


jar {
if (project.hasProperty('archiveAppendix')) {
archiveAppendix.set(project.archiveAppendix)
}
archiveClassifier = "lib"
}

Expand Down Expand Up @@ -98,6 +101,9 @@ task checkShadowJar(type: Exec) {

shadowJar {
zip64 = true
if (project.hasProperty('archiveAppendix')) {
archiveAppendix.set(project.archiveAppendix)
}
archiveClassifier = ''
// preventing java multi-release JAR leakage
// https://github.com/johnrengelman/shadow/issues/729
Expand Down

0 comments on commit edca8ea

Please sign in to comment.