Skip to content

Commit 87ee274

Browse files
authored
Merge branch 'master' into assistant-update
2 parents d73059b + 9c08668 commit 87ee274

File tree

7 files changed

+62
-95
lines changed

7 files changed

+62
-95
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ package-lock.json
3535
*.test-metadata.txt
3636
*.py
3737
fix-copyrights.sh
38+
/.utility/secring.gpg

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ stages:
77
- Build and test
88
- Semantic release
99
- Publish javadoc
10-
- Release to bintray
10+
- Upload Archives
1111

1212
jobs:
1313
include:
@@ -44,7 +44,7 @@ jobs:
4444
- ./gradlew docs
4545
- .utility/push-javadoc-to-gh-pages.sh
4646

47-
- stage: Release to bintray
47+
- stage: Upload Archives
4848
jdk: openjdk8
4949
language: java
5050
if: tag IS present

.utility/bintray-release.gradle

Lines changed: 50 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,62 @@
1-
apply plugin: 'com.jfrog.bintray'
21
apply plugin: 'com.github.johnrengelman.shadow'
32
apply plugin: 'java'
43
apply plugin: 'java-library'
54
apply plugin: 'maven'
6-
apply plugin: 'maven-publish'
75

8-
bintrayUpload.dependsOn assemble
9-
bintrayUpload.dependsOn sourcesJar
10-
bintrayUpload.dependsOn javadocJar
6+
uploadArchives.dependsOn assemble
7+
uploadArchives.dependsOn sourcesJar
8+
uploadArchives.dependsOn javadocJar
119

12-
bintray {
13-
user = System.getenv('BINTRAY_USER')
14-
key = System.getenv('BINTRAY_APIKEY')
15-
publications = ['maven']
16-
publish = true
17-
override = true
18-
pkg {
19-
repo = 'ibm-cloud-sdk-repo'
20-
name = packageName
21-
userOrg = 'ibm-cloud-sdks'
22-
licenses = ['Apache-2.0']
23-
vcsUrl = 'https://github.com/watson-developer-cloud/java-sdk.git'
24-
version {
25-
name = project.property('version')
26-
vcsTag = project.property('version')
27-
released = new Date()
28-
gpg {
29-
sign = true
30-
}
31-
mavenCentralSync {
32-
sync = true
33-
user = System.getenv('SONATYPE_USER')
34-
password = System.getenv('SONATYPE_PASSWORD') //pragma: whitelist secret
35-
}
36-
}
37-
}
38-
}
10+
uploadArchives {
11+
repositories {
12+
mavenDeployer {
13+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
3914

40-
def pomConfig = {
41-
scm {
42-
connection 'scm:git:git@github.com:watson-developer-cloud/java-sdk.git'
43-
developerConnection 'scm:git:git@github.com:watson-developer-cloud/java-sdk.git'
44-
url 'https://github.com/watson-developer-cloud/java-sdk'
45-
}
46-
47-
issueManagement {
48-
system 'GitHub'
49-
url 'https://github.com/watson-developer-cloud/java-sdk/issues'
50-
51-
}
52-
53-
ciManagement {
54-
system 'Travis CI'
55-
url 'https://travis-ci.org/watson-developer-cloud/java-sdk'
56-
}
57-
58-
licenses {
59-
license {
60-
name 'The Apache License, Version 2.0'
61-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
62-
}
63-
}
15+
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
16+
authentication(userName: System.getenv('SONATYPE_USER'), password: System.getenv('SONATYPE_PASSWORD'))
17+
}
6418

65-
developers {
66-
developer {
67-
id 'german'
68-
name 'German Attanasio'
69-
email 'germanatt@us.ibm.com'
70-
}
71-
developer {
72-
id 'logan'
73-
name 'Logan Patino'
74-
email 'loganpatino10@ibm.com'
75-
}
76-
}
77-
}
19+
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
20+
authentication(userName: System.getenv('SONATYPE_USER'), password: System.getenv('SONATYPE_PASSWORD'))
21+
}
7822

79-
publishing {
80-
publications {
81-
maven(MavenPublication) {
82-
from components.java
83-
artifact sourcesJar
84-
artifact javadocJar
85-
artifact shadowJar
86-
groupId 'com.ibm.watson'
87-
artifactId artifact
88-
version project.property('version')
89-
pom.withXml {
90-
def root = asNode()
91-
root.appendNode('description', libraryDescription)
92-
root.appendNode('name', libraryName)
93-
root.appendNode('url', 'https://cloud.ibm.com/developer/watson/dashboard')
94-
root.children().last() + pomConfig
23+
pom.project {
24+
name libraryName
25+
packaging 'jar'
26+
description libraryDescription
27+
url 'https://cloud.ibm.com/developer/watson/dashboard'
28+
scm {
29+
connection 'scm:git:git@github.com:watson-developer-cloud/java-sdk.git'
30+
developerConnection 'scm:git:git@github.com:watson-developer-cloud/java-sdk.git'
31+
url 'https://github.com/watson-developer-cloud/java-sdk'
32+
}
33+
34+
issueManagement {
35+
system 'GitHub'
36+
url 'https://github.com/watson-developer-cloud/java-sdk/issues'
37+
38+
}
39+
40+
ciManagement {
41+
system 'Travis CI'
42+
url 'https://travis-ci.org/watson-developer-cloud/java-sdk'
43+
}
44+
45+
licenses {
46+
license {
47+
name 'The Apache License, Version 2.0'
48+
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
49+
}
50+
}
51+
52+
developers {
53+
developer {
54+
id 'watdevex'
55+
name 'Watson Developer Experience'
56+
email 'watdevex@us.ibm.com'
57+
}
58+
}
9559
}
9660
}
9761
}
98-
}
62+
}

.utility/deploy-travis-wrapper.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/bash
22
set -o pipefail
33

4-
./gradlew bintrayUpload &
4+
openssl aes-256-cbc -K $encrypted_6afd0fc9428e_key -iv $encrypted_6afd0fc9428e_iv -in .utility/secring.gpg.enc -out .utility/secring.gpg -d
5+
./gradlew uploadArchives -Psigning.keyId=$SIGNING_KEY -Psigning.password=$SIGNING_PASSWORD -Psigning.secretKeyRingFile=../.utility/secring.gpg &
56

67
# output every 9 min to prevent a Travis timeout
78
PID=$!

.utility/secring.gpg.enc

2.44 KB
Binary file not shown.

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ apply plugin: 'java'
1414
apply plugin: 'checkstyle'
1515
apply plugin: 'eclipse'
1616
apply plugin: 'idea'
17+
apply plugin: 'signing'
1718

1819
archivesBaseName = 'ibm-watson'
1920

discovery/src/test/java/com/ibm/watson/discovery/v1/DiscoveryServiceIT.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,42 +1906,42 @@ public void createEventIsSuccessful() {
19061906
}
19071907

19081908
/** Query log is successful. */
1909-
@Test
1909+
//@Test
19101910
public void queryLogIsSuccessful() {
19111911
LogQueryResponse response = discovery.queryLog().execute().getResult();
19121912
assertNotNull(response);
19131913
}
19141914

19151915
/** Gets the metrics event rate is successful. */
1916-
@Test
1916+
//@Test
19171917
public void getMetricsEventRateIsSuccessful() {
19181918
MetricResponse response = discovery.getMetricsEventRate().execute().getResult();
19191919
assertNotNull(response);
19201920
}
19211921

19221922
/** Gets the metrics query is successful. */
1923-
@Test
1923+
//@Test
19241924
public void getMetricsQueryIsSuccessful() {
19251925
MetricResponse response = discovery.getMetricsQuery().execute().getResult();
19261926
assertNotNull(response);
19271927
}
19281928

19291929
/** Gets the metrics query event is successful. */
1930-
@Test
1930+
//@Test
19311931
public void getMetricsQueryEventIsSuccessful() {
19321932
MetricResponse response = discovery.getMetricsQueryEvent().execute().getResult();
19331933
assertNotNull(response);
19341934
}
19351935

19361936
/** Gets the metrics query no results is successful. */
1937-
@Test
1937+
//@Test
19381938
public void getMetricsQueryNoResultsIsSuccessful() {
19391939
MetricResponse response = discovery.getMetricsQueryNoResults().execute().getResult();
19401940
assertNotNull(response);
19411941
}
19421942

19431943
/** Gets the metrics query token event is successful. */
1944-
@Test
1944+
//@Test
19451945
public void getMetricsQueryTokenEventIsSuccessful() {
19461946
MetricTokenResponse response = discovery.getMetricsQueryTokenEvent().execute().getResult();
19471947
assertNotNull(response);

0 commit comments

Comments
 (0)