-
Notifications
You must be signed in to change notification settings - Fork 0
[CORE-593] update jfrog to gar #98
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
Changes from all commits
25b6213
eb0354e
f6765dd
b5e885d
2d6a8a7
bbf4d2a
ab6095e
98b503f
5aef8d8
c5be024
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| plugins { | ||
| id 'com.srcclr.gradle' | ||
| id 'maven-publish' | ||
| id 'com.jfrog.artifactory' | ||
| id 'bio.terra.pfb.java-library-conventions' | ||
| id 'com.github.davidmc24.gradle.plugin.avro' version '1.9.1' | ||
| id 'me.champeau.jmh' version '0.7.3' | ||
| id 'com.google.cloud.artifactregistry.gradle-plugin' version '2.1.5' | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The latest version is
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah right I meant to do that and forgot, thanks |
||
| } | ||
|
|
||
| repositories { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,13 @@ | ||
| def artifactory_repo_key = System.getenv('ARTIFACTORY_REPO_KEY') != null ? System.getenv('ARTIFACTORY_REPO_KEY') : 'libs-release-local' | ||
| def artifactory_username = System.getenv('ARTIFACTORY_USERNAME') | ||
| def artifactory_password = System.getenv('ARTIFACTORY_PASSWORD') | ||
| def garProjectId = System.getenv("GOOGLE_CLOUD_PROJECT") | ||
| def garLocation = System.getenv("GAR_LOCATION") | ||
| def garRepoId = System.getenv("GAR_REPOSITORY_ID") | ||
|
|
||
|
|
||
| java { | ||
| // Builds sources into the published package as part of the 'assemble' task. | ||
| withSourcesJar() | ||
| } | ||
|
|
||
| gradle.taskGraph.whenReady { taskGraph -> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is artifactory-specific and so can be removed entirely instead of updated. My test-run of publishing seemed to work without it, but if you know otherwise, let me know! |
||
| if (taskGraph.hasTask(artifactoryPublish) && | ||
| (artifactory_username == null || artifactory_password == null)) { | ||
| throw new GradleException('Set env vars ARTIFACTORY_USERNAME and ARTIFACTORY_PASSWORD to publish') | ||
| } | ||
| } | ||
|
|
||
| // Publish jar file to a Maven module/artifact using the maven-publish plugin. | ||
| publishing { | ||
| publications { | ||
|
|
@@ -24,21 +18,9 @@ publishing { | |
| from components.java | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // Upload Maven artifacts to Artifactory using the Artifactory plugin. | ||
| artifactory { | ||
| publish { | ||
| contextUrl = 'https://broadinstitute.jfrog.io/broadinstitute/' | ||
| repository { | ||
| repoKey = "${artifactory_repo_key}" | ||
| username = "${artifactory_username}" | ||
| password = "${artifactory_password}" | ||
| } | ||
| defaults { | ||
| publications('javaPfbLibrary') | ||
| publishArtifacts = true | ||
| publishPom = true | ||
| repositories { | ||
| maven { | ||
| url = uri("artifactregistry://${garLocation}-maven.pkg.dev/${garProjectId}/${garRepoId}") | ||
| } | ||
| } | ||
| } | ||
| } | ||
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.
does this mean we can also remove https://github.com/broadinstitute/terraform-ap-deployments/blob/824166e7be8cfa8be5c4954a07c1aa5a9fcab894/github/tfvars/databiosphere-java-pfb.tfvars#L22-L31 ? It might make sense to do a big bulk update in terraform-ap-deployments once we've changed over multiple repos.
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.
Probably, maybe a bulk update is a good idea though. But this comment did bring my attention to directions in the README that need to be updated, thank you!