Skip to content

Commit 283f7e2

Browse files
committed
Add Maven uploads to Bintray
1 parent 39e8cab commit 283f7e2

File tree

10 files changed

+123
-39
lines changed

10 files changed

+123
-39
lines changed

.travis.yml

+18
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ deploy:
9494
on:
9595
branch: "master"
9696
condition: $CASSANDRA_VERSION = "2.1.19" && "x${GRIM_MIN}" = "x"
97+
- provider: bintray
98+
file: "src/ci/descriptor-maven-snapshot.json"
99+
user: "adejanovski"
100+
key: $BINTRAY_API_KEY
101+
dry-run: false
102+
skip_cleanup: true
103+
on:
104+
branch: "master"
105+
condition: $CASSANDRA_VERSION = "2.1.19" && "x${GRIM_MIN}" = "x"
97106
- provider: bintray
98107
file: "src/ci/descriptor-rpm.json"
99108
user: "adejanovski"
@@ -121,6 +130,15 @@ deploy:
121130
on:
122131
tags: true
123132
condition: $CASSANDRA_VERSION = "2.1.19" && "x${GRIM_MIN}" = "x"
133+
- provider: bintray
134+
file: "src/ci/descriptor-maven.json"
135+
user: "adejanovski"
136+
key: $BINTRAY_API_KEY
137+
dry-run: false
138+
skip_cleanup: true
139+
on:
140+
tags: true
141+
condition: $CASSANDRA_VERSION = "2.1.19" && "x${GRIM_MIN}" = "x"
124142

125143

126144
notifications:

pom.xml

-14
Original file line numberDiff line numberDiff line change
@@ -167,20 +167,6 @@
167167
</executions>
168168
</plugin>
169169

170-
<plugin>
171-
<groupId>org.apache.maven.plugins</groupId>
172-
<artifactId>maven-javadoc-plugin</artifactId>
173-
<version>3.0.0-M1</version>
174-
<executions>
175-
<execution>
176-
<id>attach-javadocs</id>
177-
<goals>
178-
<goal>jar</goal>
179-
</goals>
180-
</execution>
181-
</executions>
182-
</plugin>
183-
184170
<plugin>
185171
<groupId>org.apache.maven.plugins</groupId>
186172
<artifactId>maven-gpg-plugin</artifactId>

src/ci/before_deploy.sh

+10-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ then
1414
RELEASEDATE=$(date +"%Y-%m-%d")
1515
RPM_VERSION=$(echo "${VERSION}" | sed "s/-/_/")
1616
# Update Bintray descriptor files with appropriate version numbers and release dates
17-
sed -i "s/VERSION/${VERSION}/" src/ci/descriptor-rpm-beta.json
17+
sed -i "s/VERSION/${VERSION}/g" src/ci/descriptor-rpm-beta.json
1818
sed -i "s/RELEASEDATE/${RELEASEDATE}/" src/ci/descriptor-rpm-beta.json
19-
sed -i "s/VERSION/${VERSION}/" src/ci/descriptor-deb-beta.json
19+
sed -i "s/VERSION/${VERSION}/g" src/ci/descriptor-deb-beta.json
2020
sed -i "s/RELEASEDATE/${RELEASEDATE}/" src/ci/descriptor-deb-beta.json
21-
sed -i "s/VERSION/${VERSION}/" src/ci/descriptor-tarball-beta.json
21+
sed -i "s/VERSION/${VERSION}/g" src/ci/descriptor-tarball-beta.json
2222
sed -i "s/RELEASEDATE/${RELEASEDATE}/" src/ci/descriptor-tarball-beta.json
23+
sed -i "s/VERSION/${VERSION}/g" src/ci/descriptor-maven-snapshot.json
24+
sed -i "s/RELEASEDATE/${RELEASEDATE}/" src/ci/descriptor-maven-snapshot.json
2325
mkdir -p cassandra-reaper-master/server/target
2426
cp -R src/packaging/bin cassandra-reaper-master/
2527
cp src/server/target/cassandra-reaper-*.jar cassandra-reaper-master/server/target
@@ -39,12 +41,14 @@ then
3941
VERSION=$(printf 'VER\t${project.version}' | mvn help:evaluate | grep '^VER' | cut -f2)
4042
RELEASEDATE=$(date +"%Y-%m-%d")
4143
# Update Bintray descriptor files with appropriate version numbers and release dates
42-
sed -i "s/VERSION/${VERSION}/" src/ci/descriptor-rpm.json
44+
sed -i "s/VERSION/${VERSION}/g" src/ci/descriptor-rpm.json
4345
sed -i "s/RELEASEDATE/${RELEASEDATE}/" src/ci/descriptor-rpm.json
44-
sed -i "s/VERSION/${VERSION}/" src/ci/descriptor-deb.json
46+
sed -i "s/VERSION/${VERSION}/g" src/ci/descriptor-deb.json
4547
sed -i "s/RELEASEDATE/${RELEASEDATE}/" src/ci/descriptor-deb.json
46-
sed -i "s/VERSION/${VERSION}/" src/ci/descriptor-tarball.json
48+
sed -i "s/VERSION/${VERSION}/g" src/ci/descriptor-tarball.json
4749
sed -i "s/RELEASEDATE/${RELEASEDATE}/" src/ci/descriptor-tarball.json
50+
sed -i "s/VERSION/${VERSION}/g" src/ci/descriptor-maven.json
51+
sed -i "s/RELEASEDATE/${RELEASEDATE}/" src/ci/descriptor-maven.json
4852
mkdir -p cassandra-reaper-${TRAVIS_TAG}/server/target
4953
cp -R src/packaging/bin cassandra-reaper-${TRAVIS_TAG}/
5054
cp src/server/target/cassandra-reaper-*.jar cassandra-reaper-${TRAVIS_TAG}/server/target

src/ci/descriptor-maven-snapshot.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"package": {
3+
"name": "cassandra-reaper", // Bintray package name
4+
"repo": "reaper-maven-snapshots", // Bintray repository name
5+
"subject": "thelastpickle", // Bintray subject (user or organization)
6+
"desc": "Apache Cassandra Reaper snapshot releases",
7+
"website_url": "cassandra-reaper.io",
8+
"issue_tracker_url": "https://github.com/thelastpickle/cassandra-reaper/issues",
9+
"vcs_url": "https://github.com/thelastpickle/cassandra-reaper.git",
10+
"github_use_tag_release_notes": false,
11+
"github_release_notes_file": "RELEASE.txt",
12+
"licenses": ["Apache-2.0"],
13+
"labels": ["cassandra", "reaper"],
14+
"public_download_numbers": true,
15+
"public_stats": true,
16+
"attributes": []
17+
},
18+
19+
"version": {
20+
"name": "VERSION",
21+
"desc": "VERSION",
22+
"released": "RELEASEDATE",
23+
"vcs_tag": "",
24+
"attributes": [],
25+
"gpgSign": true
26+
},
27+
"files":
28+
[
29+
{"includePattern": "src/server/target/(cassandra.*\\.jar)", "uploadPattern": "io/cassandrareaper/cassandra-reaper/VERSION/$1",
30+
"matrixParams": { "override": 1 }
31+
}
32+
,
33+
{"includePattern": "src/server/pom.xml", "uploadPattern": "io/cassandrareaper/cassandra-reaper/VERSION/cassandra-reaper-VERSION.pom",
34+
"matrixParams": { "override": 1 }
35+
}
36+
],
37+
"publish": true
38+
}

src/ci/descriptor-maven.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"package": {
3+
"name": "cassandra-reaper", // Bintray package name
4+
"repo": "reaper-maven", // Bintray repository name
5+
"subject": "thelastpickle", // Bintray subject (user or organization)
6+
"desc": "Apache Cassandra Reaper stable releases",
7+
"website_url": "cassandra-reaper.io",
8+
"issue_tracker_url": "https://github.com/thelastpickle/cassandra-reaper/issues",
9+
"vcs_url": "https://github.com/thelastpickle/cassandra-reaper.git",
10+
"github_use_tag_release_notes": false,
11+
"github_release_notes_file": "RELEASE.txt",
12+
"licenses": ["Apache-2.0"],
13+
"labels": ["cassandra", "reaper"],
14+
"public_download_numbers": true,
15+
"public_stats": true,
16+
"attributes": []
17+
},
18+
19+
"version": {
20+
"name": "VERSION",
21+
"desc": "VERSION",
22+
"released": "RELEASEDATE",
23+
"vcs_tag": "VERSION",
24+
"attributes": [],
25+
"gpgSign": true
26+
},
27+
"files":
28+
[
29+
{"includePattern": "src/server/target/(cassandra.*\\.jar)", "uploadPattern": "io/cassandrareaper/cassandra-reaper/VERSION/$1",
30+
"matrixParams": { "override": 1 }
31+
}
32+
,
33+
{"includePattern": "src/server/pom.xml", "uploadPattern": "io/cassandrareaper/cassandra-reaper/VERSION/cassandra-reaper-VERSION.pom",
34+
"matrixParams": { "override": 1 }
35+
}
36+
],
37+
"publish": true
38+
}

src/server/pom.xml

+8-3
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,14 @@
217217
<plugin>
218218
<groupId>org.apache.maven.plugins</groupId>
219219
<artifactId>maven-javadoc-plugin</artifactId>
220-
<configuration>
221-
<additionalparam>-Xdoclint:none</additionalparam>
222-
</configuration>
220+
<executions>
221+
<execution>
222+
<id>attach-javadocs</id>
223+
<goals>
224+
<goal>jar</goal>
225+
</goals>
226+
</execution>
227+
</executions>
223228
</plugin>
224229
<plugin>
225230
<groupId>org.codehaus.mojo</groupId>

src/server/src/main/java/io/cassandrareaper/core/NodeMetrics.java

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public String getDatacenter() {
4949
}
5050

5151
/** If true indicates that metrics for this node have been requested.
52-
*<p/>
5352
* A reaper instance that can jmx access the node will do so on its next heartbeat.
5453
*/
5554
public boolean isRequested() {

src/server/src/main/java/io/cassandrareaper/resources/RepairRunResource.java

+8-9
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,10 @@ static Response checkRequestForAddRepair(
320320
/**
321321
* Modifies a state of the repair run.
322322
*
323-
* <p>
324-
* Currently supports NOT_STARTED|PAUSED -> RUNNING and RUNNING -> PAUSED.
323+
* <p>Currently supports NOT_STARTED|PAUSED to RUNNING and RUNNING to PAUSED.
325324
*
326-
* @return OK if all goes well NOT_MODIFIED if new state is the same as the old one, and 501 (NOT_IMPLEMENTED) if
327-
* transition is not supported.
325+
* @return OK if all goes well NOT_MODIFIED if new state is the same as the old one, and 501
326+
* (NOT_IMPLEMENTED) if transition is not supported.
328327
*/
329328
@PUT
330329
@Path("/{id}/state/{state}")
@@ -387,18 +386,18 @@ public Response modifyRunState(
387386
/**
388387
* Modifies a state of the repair run.
389388
*
390-
* <p>
391-
* Currently supports NOT_STARTED|PAUSED -> RUNNING and RUNNING -> PAUSED.
389+
* <p>Currently supports NOT_STARTED|PAUSED to RUNNING and RUNNING to PAUSED.
392390
*
393-
* @return OK if all goes well NOT_MODIFIED if new state is the same as the old one, and 501 (NOT_IMPLEMENTED) if
394-
* transition is not supported.
391+
* @return OK if all goes well NOT_MODIFIED if new state is the same as the old one, and 501
392+
* (NOT_IMPLEMENTED) if transition is not supported.
395393
*/
396394
@PUT
397395
@Path("/{id}/intensity/{intensity}")
398396
public Response modifyRunIntensity(
399397
@Context UriInfo uriInfo,
400398
@PathParam("id") UUID repairRunId,
401-
@PathParam("intensity") Optional<String> intensityStr) throws ReaperException {
399+
@PathParam("intensity") Optional<String> intensityStr)
400+
throws ReaperException {
402401

403402
LOG.info("modify repair run intensity called with: id = {}, state = {}", repairRunId, intensityStr);
404403
try {

src/server/src/main/java/io/cassandrareaper/resources/RepairScheduleResource.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,10 @@ private Double getIntensity(Optional<String> intensityStr) throws NumberFormatEx
293293
/**
294294
* Modifies a state of the repair schedule.
295295
*
296-
* <p>
297-
* Currently supports PAUSED -> ACTIVE and ACTIVE -> PAUSED.
296+
* <p>Currently supports PAUSED to ACTIVE and ACTIVE to PAUSED.
298297
*
299-
* @return OK if all goes well NOT_MODIFIED if new state is the same as the old one, and 400 (BAD_REQUEST) if
300-
* transition is not supported.
298+
* @return OK if all goes well NOT_MODIFIED if new state is the same as the old one, and 400
299+
* (BAD_REQUEST) if transition is not supported.
301300
*/
302301
@PUT
303302
@Path("/{id}")

src/server/src/main/java/io/cassandrareaper/service/RepairManager.java

-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ public void initializeThreadPool(
8888

8989
/**
9090
* Consult storage to see if any repairs are running, and resume those repair runs.
91-
*
92-
* @param context Reaper's application context.
9391
*/
9492
public void resumeRunningRepairRuns() throws ReaperException {
9593
try {

0 commit comments

Comments
 (0)