Skip to content
This repository was archived by the owner on May 4, 2019. It is now read-only.

Commit c01d5e8

Browse files
author
Alan Scherger
committed
ci: fix release process
1 parent 2979272 commit c01d5e8

File tree

6 files changed

+57
-75
lines changed

6 files changed

+57
-75
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,6 @@ gradle-app.setting
129129
# gradle/wrapper/gradle-wrapper.properties
130130

131131

132-
# End of https://www.gitignore.io/api/java,linux,macos,gradle,intellij+all
132+
# End of https://www.gitignore.io/api/java,linux,macos,gradle,intellij+all
133+
134+
generated/

artifactory.gradle

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,22 @@
1515
*/
1616

1717
if (project.hasProperty('netifiArtifactoryUsername') && project.hasProperty('netifiArtifactoryPassword')) {
18+
apply plugin: 'com.jfrog.artifactory'
19+
plugins.withId('com.jfrog.artifactory') {
20+
artifactory {
21+
publish {
22+
contextUrl = 'https://artifactory.netifiinc.com/artifactory'
1823

19-
subprojects {
20-
plugins.withId('com.jfrog.artifactory') {
21-
artifactory {
22-
publish {
23-
contextUrl = 'https://artifactory.netifiinc.com/artifactory'
24+
repository {
25+
repoKey = version.contains('SNAPSHOT') ? 'libs-snapshot-local' : 'libs-release-local'
2426

25-
repository {
26-
repoKey = version.contains('SNAPSHOT') ? 'libs-snapshot-local' : 'libs-release-local'
27-
28-
// Credentials for oss.jfrog.org are a user's Bintray credentials
29-
username = project.property('netifiArtifactoryUsername')
30-
password = project.property('netifiArtifactoryPassword')
31-
}
27+
// Credentials for oss.jfrog.org are a user's Bintray credentials
28+
username = project.property('netifiArtifactoryUsername')
29+
password = project.property('netifiArtifactoryPassword')
30+
}
3231

33-
defaults {
34-
publications('mavenJava')
35-
}
32+
defaults {
33+
publications('mavenJava')
3634
}
3735
}
3836
}

bintray.gradle

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,32 @@
1515
*/
1616

1717
if (project.hasProperty('bintrayUser') && project.hasProperty('bintrayKey')) {
18+
apply plugin: 'com.jfrog.bintray'
19+
plugins.withId('com.jfrog.bintray') {
20+
bintray {
21+
user = project.property('bintrayUser')
22+
key = project.property('bintrayKey')
1823

19-
subprojects {
20-
plugins.withId('com.jfrog.bintray') {
21-
bintray {
22-
user = project.property('bintrayUser')
23-
key = project.property('bintrayKey')
24+
publications = ['mavenJava']
2425

25-
publications = ['mavenJava']
26+
//dryRun = true
27+
publish = (osdetector.os == 'osx')
28+
override = true
2629

27-
//dryRun = true
28-
publish = (osdetector.os == 'osx')
29-
override = true
30+
pkg {
31+
repo = 'netifi-oss'
32+
name = project.name
33+
userOrg = 'netifi'
34+
desc = "${project.description}"
35+
websiteUrl = 'https://github.com/netifi-proteus/proteus-httpgateway'
36+
issueTrackerUrl = 'https://github.com/netifi-proteus/proteus-httpgateway/issues'
37+
vcsUrl = 'https://github.com/netifi-proteus/proteus-httpgateway.git'
38+
licenses = ['Apache-2.0']
39+
githubRepo = 'netifi-proteus/proteus-httpgateway'
40+
githubReleaseNotesFile = 'CHANGELOG.md'
3041

31-
pkg {
32-
repo = 'netifi-oss'
33-
name = project.name
34-
userOrg = 'netifi'
35-
desc = "${project.description}"
36-
websiteUrl = 'https://github.com/netifi-proteus/proteus-httpgateway'
37-
issueTrackerUrl = 'https://github.com/netifi-proteus/proteus-httpgateway/issues'
38-
vcsUrl = 'https://github.com/netifi-proteus/proteus-httpgateway.git'
39-
licenses = ['Apache-2.0']
40-
githubRepo = 'netifi-proteus/proteus-httpgateway'
41-
githubReleaseNotesFile = 'CHANGELOG.md'
42-
43-
version {
44-
name = "$project.version".toString()
45-
}
42+
version {
43+
name = "$project.version".toString()
4644
}
4745
}
4846
}

build.gradle

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ allprojects {
5656

5757
repositories {
5858
maven {
59-
url 'https://sonatype.netifiinc.com/repository/maven-central/'
59+
url 'https://sonatype.netifiinc.com/repository/jcenter/'
6060
credentials {
6161
username = "${netifiReadOnlyUsername}"
6262
password = "${netifiReadOnlyPassword}"
6363
}
6464
}
6565
maven {
66-
url 'https://sonatype.netifiinc.com/repository/jcenter/'
66+
url 'https://sonatype.netifiinc.com/repository/maven-central/'
6767
credentials {
6868
username = "${netifiReadOnlyUsername}"
6969
password = "${netifiReadOnlyPassword}"
@@ -96,8 +96,6 @@ allprojects {
9696
subprojects {
9797
apply plugin: 'idea'
9898
apply plugin: 'java'
99-
apply plugin: 'com.jfrog.bintray'
100-
apply plugin: 'com.jfrog.artifactory'
10199
apply plugin: 'maven'
102100
apply plugin: 'maven-publish'
103101
apply plugin: 'com.google.osdetector'
@@ -138,17 +136,4 @@ subprojects {
138136
archives sourcesJar
139137
archives javadocJar
140138
}
141-
142-
publishing {
143-
publications {
144-
mavenJava(MavenPublication) {
145-
from components.java
146-
artifact sourcesJar
147-
artifact javadocJar
148-
}
149-
}
150-
}
151139
}
152-
153-
apply from: "artifactory.gradle"
154-
apply from: "bintray.gradle"

proteus-httpgateway-idl/build.gradle

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,16 @@ idea {
4949
clean {
5050
delete 'src/generated/main'
5151
}
52+
53+
publishing {
54+
publications {
55+
mavenJava(MavenPublication) {
56+
from components.java
57+
artifact sourcesJar
58+
artifact javadocJar
59+
}
60+
}
61+
}
62+
63+
apply from: "../artifactory.gradle"
64+
apply from: "../bintray.gradle"

proteus-httpgateway/build.gradle

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@ jar {
3939
}
4040
}
4141

42-
43-
// Artifact Publishing
44-
publishing {
45-
publications {
46-
mavenJava(MavenPublication) {
47-
artifact distZip
48-
artifact sourcesJar
49-
artifact javadocJar
50-
}
51-
}
52-
}
53-
54-
55-
5642
mainClassName = 'com.netifi.proteus.httpgateway.Main'
5743

5844
// Properties
@@ -181,12 +167,12 @@ docker {
181167
if (version.endsWith('SNAPSHOT') || version.endsWith('RC')) {
182168
// Private Docker Repo
183169
url = 'https://netifi.azurecr.io'
184-
username = project.findProperty('netifiPrivateDockerRegistryUsername') ?: System.getenv("DOCKER_NETIFI_USERNAME")
185-
password = project.findProperty('netifiPrivateDockerRegistryPassword') ?: System.getenv("DOCKER_NETIFI_PASSWORD")
170+
username = "${netifiPrivateDockerRegistryUsername}"
171+
password = "${netifiPrivateDockerRegistryPassword}"
186172
} else {
187173
// Public Docker Repo
188-
username = project.findProperty('netifiDockerHubUsername') ?: System.getenv("DOCKER_HUB_USERNAME")
189-
password = project.findProperty('netifiDockerHubPassword') ?: System.getenv("DOCKER_HUB_PASSWORD")
174+
username = "${netifiDockerHubUsername}"
175+
password = "${netifiDockerHubPassword}"
190176
}
191177
}
192178
}

0 commit comments

Comments
 (0)