-
Notifications
You must be signed in to change notification settings - Fork 50
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
[DEVOPS-1751] Pipeline for publishing java sdk to gradle #740
[DEVOPS-1751] Pipeline for publishing java sdk to gradle #740
Conversation
New Issues
Fixed Issues
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #740 +/- ##
=======================================
Coverage 58.69% 58.69%
=======================================
Files 177 177
Lines 11501 11501
=======================================
Hits 6751 6751
Misses 4750 4750 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the intention was to make this Java sdk to be Secrets Manager specific.
See below for my other comments
.github/workflows/build-java.yml
Outdated
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0 | ||
with: | ||
arguments: publish | ||
arguments: package | ||
build-root-directory: languages/java | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think we need the token here anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! Good catch.
.github/workflows/build-java.yml
Outdated
uses: gradle/actions/setup-gradle@ec92e829475ac0c2315ea8f9eced72db85bb337a # v3.0.0 | ||
with: | ||
arguments: publish | ||
arguments: package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is probably unsupported by this action, since it's more for setup of gradle, rather than execution.
You need a separate step like: (also there is no "package" in gradle, but there is "build"
- name: Build Maven
run: ./gradlew build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should publish with java docs (and optionally source code), maybe add:
java {
withJavadocJar()
withSourcesJar()
}
java.sourceCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId = 'com.bitwarden' | ||
artifactId = 'sdk' | ||
artifactId = 'sdk-secrets' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i though this sdk repo is not specific to secrets manager, but it's for everyone ?
I did not know the Bitwarden SDK / this repo is just for secrets manager, so this change make sense now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing from my side that @mzieniukbw hasn't already by brought up 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Type of change
Objective
Code changes
rc
andhotfix-rc
and on PR. Change Publish task to package.sdk-secrets
. Addhttps://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
as repository to publish.Before you submit