Merge pull request #1 from sgoudham/dev/jenkins

Dev/jenkins -> Add support for Jenkins Builds
pull/2/head
Hamothy 4 years ago committed by GitHub
commit 5ae001db5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

94
Jenkinsfile vendored

@ -0,0 +1,94 @@
pipeline {
agent {
docker {
image "maven:3.8.1-adoptopenjdk-11"
args '-v /root/.m2:/root/.m2'
}
}
environment {
NEXUS_VERSION = "nexus3"
NEXUS_PROTOCOL = "https"
NEXUS_REPOSITORY = "maven-goudham"
NEXUS_URL = credentials('fe3e0c7e-bcb1-4d55-9591-f55f71f42356')
NEXUS_CREDENTIAL_ID = 'e5582b32-3507-4e88-ab7c-d16d701c46e9'
CODECOV_TOKEN = credentials('44a3c021-5cbb-4a6f-bea2-ae6c51d43038')
}
stages {
stage("Building") {
steps {
sh "mvn -B -DskipTests clean install"
}
}
stage("Testing") {
steps {
sh "mvn test"
}
}
stage("Deploying To Nexus") {
when {
branch 'release'
}
steps {
script {
pom = readMavenPom file: "pom.xml";
filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
artifactPath = filesByGlob[0].path;
artifactExists = fileExists artifactPath;
if (artifactExists) {
echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version}";
nexusArtifactUploader(
nexusVersion: NEXUS_VERSION,
protocol: NEXUS_PROTOCOL,
nexusUrl: NEXUS_URL,
groupId: pom.groupId,
version: pom.version,
repository: NEXUS_REPOSITORY,
credentialsId: NEXUS_CREDENTIAL_ID,
artifacts: [
[artifactId: pom.artifactId,
classifier: '',
file: artifactPath,
type: pom.packaging],
[artifactId: pom.artifactId,
classifier: '',
file: "pom.xml",
type: "pom"]
]
)
} else {
error "*** File: ${artifactPath}, could not be found";
}
}
}
}
}
post {
success {
echo "I'm Feeling Swag!"
echo "Generating Test Report..."
publishCoverage adapters: [jacocoAdapter('target/site/jacoco/jacoco.xml')]
echo "Sending Report to CodeCov..."
sh '''#!/bin/bash
bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN || echo "Codecov did not collect coverage reports"
'''
}
failure {
echo 'Not Very Swag :('
}
cleanup {
cleanWs()
}
}
}

@ -31,7 +31,7 @@
<dependency> <dependency>
<groupId>org.jetbrains</groupId> <groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId> <artifactId>annotations</artifactId>
<version>RELEASE</version> <version>21.0.1</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>

@ -16,9 +16,6 @@ import java.util.concurrent.Executor;
* *
* <p> Main entry point for retrieving information from MyWaifuList.</p> * <p> Main entry point for retrieving information from MyWaifuList.</p>
* <p> {@link MyWaifuWrapper} is utilised to make the API requests </p> * <p> {@link MyWaifuWrapper} is utilised to make the API requests </p>
* <p> Examples of such methods include:
* <li>{@link }</li>
* </p>
*/ */
public class MyWaifuClient { public class MyWaifuClient {
private final MyWaifuWrapper myWaifuWrapper; private final MyWaifuWrapper myWaifuWrapper;

@ -12,10 +12,14 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
* {@link PaginationData} * {@link PaginationData}
* <p>Contains standard Pagination data from the API</p> * <p>Contains standard Pagination data from the API</p>
* *
* <p> Fields included are: </p>
* <ul>
* <li>{@link Integer currentPage}</li> * <li>{@link Integer currentPage}</li>
* <li>{@link Integer lastPage}</li> * <li>{@link Integer lastPage}</li>
* <li>{@link Integer perPage}</li> * <li>{@link Integer perPage}</li>
* <li>{@link Integer total}</li> * <li>{@link Integer total}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -14,9 +14,12 @@ import java.util.Objects;
* <p> Contains information on a given animation or game development studio </p> * <p> Contains information on a given animation or game development studio </p>
* *
* <p>Fields included are:</p> * <p>Fields included are:</p>
* <ul>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String originalName}</li> * <li>{@link String originalName}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -15,6 +15,7 @@ import java.util.Objects;
* <p> Contains basic series information for most endpoints </p> * <p> Contains basic series information for most endpoints </p>
* *
* <p> Fields included are: </p> * <p> Fields included are: </p>
* <ul>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String originalName}</li> * <li>{@link String originalName}</li>
* <li>{@link String romajiName}</li> * <li>{@link String romajiName}</li>
@ -22,6 +23,8 @@ import java.util.Objects;
* <li>{@link String description}</li> * <li>{@link String description}</li>
* <li>{@link String url}</li> * <li>{@link String url}</li>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -16,6 +16,7 @@ import java.util.Objects;
* <p>Represents a grouping of various {@link Waifu}'s. This can be an anime, mobile game, video game, manga, or LN</p> * <p>Represents a grouping of various {@link Waifu}'s. This can be an anime, mobile game, video game, manga, or LN</p>
* *
* <p> Fields included are: </p> * <p> Fields included are: </p>
* <ul>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String originalName}</li> * <li>{@link String originalName}</li>
* <li>{@link String romajiName}</li> * <li>{@link String romajiName}</li>
@ -28,6 +29,8 @@ import java.util.Objects;
* <li>{@link String url}</li> * <li>{@link String url}</li>
* <li>{@link Studio}</li> * <li>{@link Studio}</li>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -14,9 +14,13 @@ import java.util.Objects;
* {@link TrueLove} * {@link TrueLove}
* <p>Represents a {@link User}'s True Love</p> * <p>Represents a {@link User}'s True Love</p>
* *
* <p> Fields included are: </p>
* <ul>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String slug}</li> * <li>{@link String slug}</li>
* <li>{@link String series}</li> * <li>{@link String series}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -16,6 +16,7 @@ import java.util.Objects;
* <p>Standard user information and counts of waifus created, liked, trashed. Also contains true love</p> * <p>Standard user information and counts of waifus created, liked, trashed. Also contains true love</p>
* *
* <p> Fields included are: </p> * <p> Fields included are: </p>
* <ul>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String twitter}</li> * <li>{@link String twitter}</li>
@ -24,6 +25,8 @@ import java.util.Objects;
* <li>{@link Integer waifusLiked}</li> * <li>{@link Integer waifusLiked}</li>
* <li>{@link Integer waifusTrashed}</li> * <li>{@link Integer waifusTrashed}</li>
* <li>{@link TrueLove trueLove}</li> * <li>{@link TrueLove trueLove}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -14,10 +14,14 @@ import org.goudham.me.api.entity.waifu.Waifu;
* {@link UserList} * {@link UserList}
* <p>Get an array of all user lists on their profile</p> * <p>Get an array of all user lists on their profile</p>
* *
* <p> Fields included are: </p>
* <ul>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String order}</li> * <li>{@link String order}</li>
* <li>{@link List< Waifu > waifus}</li> * <li>{@link List} of {@link Waifu}'s</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -13,6 +13,7 @@ import javax.annotation.processing.Generated;
* <p>Contains basic series information for most endpoints</p> * <p>Contains basic series information for most endpoints</p>
* *
* <p> Fields included are: </p> * <p> Fields included are: </p>
* <ul>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String originalName}</li> * <li>{@link String originalName}</li>
* <li>{@link String romajiName}</li> * <li>{@link String romajiName}</li>
@ -20,6 +21,8 @@ import javax.annotation.processing.Generated;
* <li>{@link String description}</li> * <li>{@link String description}</li>
* <li>{@link String url}</li> * <li>{@link String url}</li>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -15,6 +15,7 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
* <p>Contains Waifu data structure for endpoints other than the primary endpoint (/waifu/{slug})</p> * <p>Contains Waifu data structure for endpoints other than the primary endpoint (/waifu/{slug})</p>
* *
* <p> Fields included are: </p> * <p> Fields included are: </p>
* <ul>
* <li>{@link String slug}</li> * <li>{@link String slug}</li>
* <li>{@link String name}</li> * <li>{@link String name}</li>
* <li>{@link String originalName}</li> * <li>{@link String originalName}</li>
@ -24,8 +25,10 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
* <li>{@link Integer trash}</li> * <li>{@link Integer trash}</li>
* <li>{@link Integer episodeCount}</li> * <li>{@link Integer episodeCount}</li>
* <li>{@link String url}</li> * <li>{@link String url}</li>
* <li>{@link List<Appearance> appearances}</li> * <li>{@link List} of {@link Appearance}'s</li>
* <li>{@link Double id}</li> * <li>{@link Double id}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -20,6 +20,7 @@ import org.goudham.me.api.entity.series.Series;
* <p>Contains most common attributes for {@link Waifu}'s based on various source material</p> * <p>Contains most common attributes for {@link Waifu}'s based on various source material</p>
* *
* <p> Fields included are: </p> * <p> Fields included are: </p>
* <ul>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* <li>{@link String slug}</li> * <li>{@link String slug}</li>
* <li>{@link Integer creatorId}</li> * <li>{@link Integer creatorId}</li>
@ -46,8 +47,10 @@ import org.goudham.me.api.entity.series.Series;
* <li>{@link Integer popularityRank}</li> * <li>{@link Integer popularityRank}</li>
* <li>{@link Integer likeRank}</li> * <li>{@link Integer likeRank}</li>
* <li>{@link Integer trashRank}</li> * <li>{@link Integer trashRank}</li>
* <li>{@link List<Appearance> appearances}</li> * <li>{@link List} of {@link Appearance}'s</li>
* <li>{@link Series series}</li> * <li>{@link Series series}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

@ -10,12 +10,15 @@ import java.util.Objects;
/** /**
* {@link WaifuImage} * {@link WaifuImage}
* <p>Contains a thumbnail & full res image link for an image in a given Waifus gallery</p> * <p>Contains a thumbnail and full res image link for an image in a given Waifus gallery</p>
* *
* <p>Fields included are:</p> * <p>Fields included are:</p>
* <ul>
* <li>{@link Integer id}</li> * <li>{@link Integer id}</li>
* <li>{@link String thumbnail}</li> * <li>{@link String thumbnail}</li>
* <li>{@link String path}</li> * <li>{@link String path}</li>
* </ul>
*
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({ @JsonPropertyOrder({

Loading…
Cancel
Save