Skip to content

Commit

Permalink
GEODE-6259: Correct issues with publish targets (apache#3067)
Browse files Browse the repository at this point in the history
* Default values in gradle.properties should not be quote-wrapped
* Short-circuit-when-exists operator is ?: in Groovy, not || like in Python.
* Username/Password credentials are only valid for maven targets of HTTP, HTTPS, and SFTP.
* The meta pipeline should be updated when meta.properties changes.
  • Loading branch information
PurelyApplied authored Jan 14, 2019
1 parent 1e350b1 commit fdd924e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ci/pipelines/meta/jinja.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ resources:
- ci/pipelines/geode-build/*
- ci/pipelines/shared/*
- ci/pipelines/render.py
- ci/pipelines/meta/meta.properties
- name: geode-images-pipeline
type: git
source:
Expand Down Expand Up @@ -81,6 +82,7 @@ resources:
- ci/pipelines/examples/*
- ci/pipelines/shared/*
- ci/pipelines/render.py
- ci/pipelines/meta/meta.properties
- name: geode-pr-pipeline
type: git
source:
Expand All @@ -90,6 +92,7 @@ resources:
- ci/pipelines/pull-request/*
- ci/pipelines/shared/*
- ci/pipelines/render.py
- ci/pipelines/meta/meta.properties
{% endif %}
- name: geode-metrics-pipeline
type: git
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
version = 1.9.0-SNAPSHOT

# Default Maven targets
mavenSnapshotUrl = "gcs://maven.apachegeode-ci.info/snapshots"
mavenReleaseUrl = "https://repository.apache.org/service/local/staging/deploy/maven2"
mavenSnapshotUrl = gcs://maven.apachegeode-ci.info/snapshots
mavenReleaseUrl = https://repository.apache.org/service/local/staging/deploy/maven2

# Maven also uses the project group as a prefix.
group = org.apache.geode
Expand Down
12 changes: 8 additions & 4 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,15 @@ publishing {
repositories {
maven {
// Use specified mavenRepository if provided, else use release or snapshot defaults.
url = project.findProperty("mavenRepository") ||
url = project.findProperty("mavenRepository") ?:
project.isReleaseVersion ? project.mavenReleaseUrl : project.mavenSnapshotUrl
credentials {
username project.findProperty("mavenUsername")
password project.findProperty("mavenPassword")
if (url.toString().startsWith("http") || url.toString().startsWith("sftp")) {
// Username / password credentials are only supported for http, https, and sftp repos.
// See the Gradle documentation on Repository Types for more information.
credentials {
username project.findProperty("mavenUsername")
password project.findProperty("mavenPassword")
}
}
}
}
Expand Down

0 comments on commit fdd924e

Please sign in to comment.