-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c772936
Showing
33 changed files
with
4,720 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
*.class | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
*.prefs | ||
.classpath | ||
.project | ||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
target | ||
|
||
# IntelliJ | ||
.idea/ | ||
*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
pipeline { | ||
agent { | ||
docker { | ||
image 'maven:3.6-jdk-11' | ||
args '-v /home/jenkins/.m2:/var/maven/.m2 -v /home/jenkins/.gnupg:/.gnupg -e MAVEN_CONFIG=/var/maven/.m2 -e MAVEN_OPTS=-Duser.home=/var/maven' | ||
} | ||
} | ||
environment { | ||
COVERALLS_REPO_TOKEN = credentials('coveralls_repo_token_snapshot_tests') | ||
GPG_SECRET = credentials('gpg_password') | ||
} | ||
stages { | ||
stage ('Test Spring-Boot Compatibility') { | ||
steps { | ||
script { | ||
def versionsAsString = sh(script: 'mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=compatible-spring-boot-versions -q -DforceStdout', returnStdout:true).trim() | ||
def versionsArray = versionsAsString.split(',') | ||
versionsArray.each { | ||
stage("Verify against Spring-Boot ${it}") { | ||
sh "mvn -B clean verify -Dversion.spring-boot=${it.trim()}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('Build Final') { | ||
steps { | ||
sh 'mvn -B clean verify' | ||
} | ||
} | ||
stage('Coverage') { | ||
steps { | ||
sh 'mvn -B jacoco:report jacoco:report-integration coveralls:report -DrepoToken=$COVERALLS_REPO_TOKEN' | ||
} | ||
} | ||
stage('javadoc') { | ||
steps { | ||
sh 'mvn -B javadoc:javadoc' | ||
} | ||
} | ||
stage('Deploy SNAPSHOT') { | ||
when { | ||
branch 'dev' | ||
} | ||
steps { | ||
sh 'mvn -B -Prelease -DskipTests -Dgpg.passphrase=${GPG_SECRET} deploy' | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
archiveArtifacts(artifacts: '*.md') | ||
junit (testResults: 'target/surefire-reports/*.xml', allowEmptyResults: true) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
pipeline { | ||
agent { | ||
docker { | ||
image 'maven:3.6-jdk-11' | ||
args '-v /home/jenkins/.m2:/var/maven/.m2 -v /home/jenkins/.gnupg:/.gnupg -e MAVEN_CONFIG=/var/maven/.m2 -e MAVEN_OPTS=-Duser.home=/var/maven' | ||
} | ||
} | ||
environment { | ||
GPG_SECRET = credentials('gpg_password') | ||
GITHUB = credentials('Github-Username-Pw') | ||
GITHUB_RELEASE_TOKEN = credentials('github_registry_release') | ||
GIT_ASKPASS='./.git-askpass' | ||
} | ||
stages { | ||
stage ('Ensure dev branch') { | ||
when { | ||
expression { | ||
return env.BRANCH_NAME != 'dev'; | ||
} | ||
} | ||
steps { | ||
error("Releasing is only possible from dev branch") | ||
} | ||
} | ||
stage ('Set Git Information') { | ||
steps { | ||
sh 'echo \'echo \$GITHUB_PSW\' > ./.git-askpass' | ||
sh 'chmod +x ./.git-askpass' | ||
sh 'git config url."https://api@github.com/".insteadOf "https://github.com/"' | ||
sh 'git config url."https://ssh@github.com/".insteadOf "ssh://git@github.com/"' | ||
sh 'git config url."https://git@github.com/".insteadOf "git@github.com:"' | ||
sh 'git config user.email "build@taddiken.online"' | ||
sh 'git config user.name "Jenkins"' | ||
} | ||
} | ||
stage('Create release branch') { | ||
steps { | ||
sh 'mvn -B -Prelease gitflow:release-start' | ||
} | ||
} | ||
|
||
stage ('Test Spring-Boot Compatibility') { | ||
steps { | ||
script { | ||
def versionsAsString = sh(script: 'mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=compatible-spring-boot-versions -q -DforceStdout', returnStdout:true).trim() | ||
def versionsArray = versionsAsString.split(',') | ||
versionsArray.each { | ||
stage("Verify against Spring-Boot ${it}") { | ||
sh "mvn -B -Prelease -Dgpg.passphrase=${GPG_SECRET} clean verify -Dversion.spring-boot=${it.trim()}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
stage('Verify Release') { | ||
steps { | ||
sh 'mvn -B -Prelease -Dgpg.passphrase=${GPG_SECRET} verify' | ||
} | ||
} | ||
stage('Update readme') { | ||
steps { | ||
sh 'git add README.md RELEASE_NOTES.md' | ||
sh 'git commit -m "Update README and RELEASE_NOTES"' | ||
} | ||
} | ||
stage('Perform release') { | ||
steps { | ||
sh "mvn -B gitflow:release-finish -DargLine=\"-Prelease -B -Dgpg.passphrase=${GPG_SECRET} -DskipTests\"" | ||
} | ||
} | ||
stage('Create GitHub release') { | ||
steps { | ||
sh 'git checkout main' | ||
sh "mvn -B github-release:github-release -Dgithub.release-token=${GITHUB_RELEASE_TOKEN}" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Simon Taddiken | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- This file is auto generated during release from readme/README.md --> | ||
|
||
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/de.skuzzle.test/snapshot-test/badge.svg)](https://maven-badges.herokuapp.com/maven-central/de.skuzzle.test/snapshot-test) | ||
[![JavaDoc](http://javadoc-badge.appspot.com/de.skuzzle.test/snapshot-test.svg?label=JavaDoc)](http://javadoc-badge.appspot.com/de.skuzzle.test/snapshot-test) | ||
[![Coverage Status](https://coveralls.io/repos/github/skuzzle/snapshot-test/badge.svg?branch=main)](https://coveralls.io/github/skuzzle/snapshot-test?branch=main) | ||
[![Twitter Follow](https://img.shields.io/twitter/follow/skuzzleOSS.svg?style=social)](https://twitter.com/skuzzleOSS) | ||
|
||
# snapshot-tests | ||
|
||
|
||
## Compatibility | ||
- [x] Requires Java 15.0.1 | ||
- [x] Tested against Spring-Boot `2.2.13.RELEASE, 2.3.12.RELEASE, 2.4.10, 2.5.4` | ||
|
||
## Changelog | ||
|
||
### Version 0.0.1 | ||
* Initial | ||
|
||
<details> | ||
<summary><b>Previous releases</b></summary> | ||
None | ||
|
||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
* Initial | ||
|
||
Maven Central coordinates for this release: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>de.skuzzle.test</groupId> | ||
<artifactId>snapshot-test</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<scope>test</scope> | ||
</dependency> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>de.skuzzle</groupId> | ||
<artifactId>skuzzle-parent</artifactId> | ||
<version>3.0.1</version> | ||
</parent> | ||
|
||
<groupId>de.skuzzle.test</groupId> | ||
<artifactId>snapshot-test</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>Snapshot Test</name> | ||
<description>Snapshot testing and test data production</description> | ||
|
||
<properties> | ||
<coveralls.skip>false</coveralls.skip> | ||
<maven.compiler.target>11</maven.compiler.target> | ||
<maven.compiler.source>11</maven.compiler.source> | ||
|
||
<!-- Minimal compatible Spring-Boot version. Newer versions are tested during Jenkins build. --> | ||
<version.spring-boot>2.2.13.RELEASE</version.spring-boot> | ||
<version.wiremock>2.27.2</version.wiremock> | ||
<version.guava>30.1.1-jre</version.guava> | ||
<!-- All the remaining spring-boot versions we run the tests against (comma separated) --> | ||
<compatible-spring-boot-versions>2.3.12.RELEASE, 2.4.10, 2.5.4</compatible-spring-boot-versions> | ||
|
||
<site.name>snapshot-test</site.name> | ||
<github.name>snapshot-test</github.name> | ||
</properties> | ||
|
||
<scm> | ||
<developerConnection>scm:git:https://github.com/skuzzle/${github.name}.git</developerConnection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-dependencies</artifactId> | ||
<version>${version.spring-boot}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>${version.guava}</version> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>javax.xml.bind</groupId> | ||
<artifactId>jaxb-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.jaxb</groupId> | ||
<artifactId>jaxb-runtime</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jdk8</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jsr310</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.xmlunit</groupId> | ||
<artifactId>xmlunit-assertj</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.skyscreamer</groupId> | ||
<artifactId>jsonassert</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<!-- Test --> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.2.0</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>copy-resources</goal> | ||
</goals> | ||
<phase>validate</phase> | ||
<configuration> | ||
<outputDirectory>${basedir}</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>readme/</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifestEntries> | ||
<Automatic-Module-Name>de.skuzzle.test.snapshots</Automatic-Module-Name> | ||
</manifestEntries> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.amashchenko.maven.plugin</groupId> | ||
<artifactId>gitflow-maven-plugin</artifactId> | ||
<configuration> | ||
<postReleaseGoals>deploy</postReleaseGoals> | ||
<detail>true</detail> | ||
<verbose>true</verbose> | ||
<skipTestProject>true</skipTestProject> | ||
<gitFlowConfig> | ||
<productionBranch>main</productionBranch> | ||
<developmentBranch>dev</developmentBranch> | ||
</gitFlowConfig> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.ragedunicorn.tools.maven</groupId> | ||
<artifactId>github-release-maven-plugin</artifactId> | ||
<version>1.0.2</version> | ||
<configuration> | ||
<owner>skuzzle</owner> | ||
<repository>${github.name}</repository> | ||
<authToken>${github.release-token}</authToken> | ||
<tagName>v${project.version}</tagName> | ||
<name>${project.version}</name> | ||
<targetCommitish>main</targetCommitish> | ||
<releaseNotes>RELEASE_NOTES.md</releaseNotes> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<configuration> | ||
<usedDependencies> | ||
<usedDependency>org.glassfish.jaxb:jaxb-runtime</usedDependency> | ||
</usedDependencies> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.