Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(jar): add datahub-custom-plugin-lib to jar workflow #10812

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/publish-datahub-jars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- id: publish-enabled
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: |

Check failure on line 29 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:48: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:29:9: shellcheck reported issue in this script: SC2086:info:2:48: Double quote to prevent globbing and word splitting [shellcheck]
echo "Enable publish: ${{ env.SIGNING_KEY != '' }}"
echo "publish=${{ env.SIGNING_KEY != '' }}" >> $GITHUB_OUTPUT
setup:
Expand All @@ -39,7 +39,7 @@
uses: acryldata/sane-checkout-action@v3
- name: Compute Tag
id: tag
run: |

Check failure on line 42 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2001:style:2:7: See if you can use ${variable//search/replace} instead [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:42:9: shellcheck reported issue in this script: SC2001:style:2:7: See if you can use ${variable//search/replace} instead [shellcheck]

Check failure on line 42 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:2:12: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:42:9: shellcheck reported issue in this script: SC2086:info:2:12: Double quote to prevent globbing and word splitting [shellcheck]

Check failure on line 42 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:3:20: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:42:9: shellcheck reported issue in this script: SC2086:info:3:20: Double quote to prevent globbing and word splitting [shellcheck]
source .github/scripts/docker_helpers.sh
TAG=$(echo ${GITHUB_REF} | sed -e 's,refs/tags/v,,g')
echo "tag=$TAG" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -72,7 +72,7 @@
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |

Check failure on line 75 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:75:9: shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck]
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew :metadata-integration:java:datahub-client:printVersion
./gradlew :metadata-integration:java:datahub-client:publish
Expand All @@ -85,7 +85,7 @@
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |

Check failure on line 88 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:88:9: shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck]
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew -PreleaseVersion=${{ needs.setup.outputs.tag }} :metadata-integration:java:datahub-client:publish
./gradlew :metadata-integration:java:datahub-client:closeAndReleaseRepository --info
Expand All @@ -98,7 +98,7 @@
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |

Check failure on line 101 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:101:9: shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck]
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew :metadata-integration:java:spark-lineage:printVersion
./gradlew :metadata-integration:java:spark-lineage:publish
Expand All @@ -111,7 +111,7 @@
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |

Check failure on line 114 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:114:9: shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck]
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew -PreleaseVersion=${{ needs.setup.outputs.tag }} :metadata-integration:java:spark-lineage:publish
./gradlew :metadata-integration:java:spark-lineage:closeAndReleaseRepository --info
Expand All @@ -124,7 +124,7 @@
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |

Check failure on line 127 in .github/workflows/publish-datahub-jars.yml

View workflow job for this annotation

GitHub Actions / actionlint

[actionlint] reported by reviewdog 🐶 shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck] Raw Output: .github/workflows/publish-datahub-jars.yml:127:9: shellcheck reported issue in this script: SC2086:info:1:17: Double quote to prevent globbing and word splitting [shellcheck]
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew :metadata-integration:java:datahub-protobuf:printVersion
./gradlew :metadata-integration:java:datahub-protobuf:publish
Expand Down Expand Up @@ -167,3 +167,29 @@
echo signingKey=$SIGNING_KEY >> gradle.properties
./gradlew -PreleaseVersion=${{ needs.setup.outputs.tag }} :metadata-auth:auth-api:publish
./gradlew :metadata-auth:auth-api:closeAndReleaseRepository --info
- name: publish datahub-custom-plugin-lib snapshot 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 :metadata-integration:java:custom-plugin-lib:printVersion
./gradlew :metadata-integration:java:custom-plugin-lib:publish
Comment on lines +170 to +182
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Double Quotes to Prevent Globbing and Word Splitting

The shell commands should be updated to include double quotes to prevent globbing and word splitting.

-          echo signingKey=$SIGNING_KEY >> gradle.properties
+          echo "signingKey=$SIGNING_KEY" >> gradle.properties
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: publish datahub-custom-plugin-lib snapshot 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 :metadata-integration:java:custom-plugin-lib:printVersion
./gradlew :metadata-integration:java:custom-plugin-lib:publish
- name: publish datahub-custom-plugin-lib snapshot 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 :metadata-integration:java:custom-plugin-lib:printVersion
./gradlew :metadata-integration:java:custom-plugin-lib:publish

- name: release datahub-custom-plugin-lib 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:custom-plugin-lib:publish
./gradlew :metadata-integration:java:custom-plugin-lib:closeAndReleaseRepository --info
Comment on lines +183 to +195
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Double Quotes to Prevent Globbing and Word Splitting

The shell commands should be updated to include double quotes to prevent globbing and word splitting.

-          echo signingKey=$SIGNING_KEY >> gradle.properties
+          echo "signingKey=$SIGNING_KEY" >> gradle.properties
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: release datahub-custom-plugin-lib 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:custom-plugin-lib:publish
./gradlew :metadata-integration:java:custom-plugin-lib:closeAndReleaseRepository --info
- name: release datahub-custom-plugin-lib 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:custom-plugin-lib:publish
./gradlew :metadata-integration:java:custom-plugin-lib:closeAndReleaseRepository --info

Loading