├── .gitignore
├── CHANGES.md
├── Jenkinsfile
├── README.adoc
├── pom.xml
└── src
└── main
└── webapp
├── WEB-INF
└── web.xml
└── index.jsp
/.gitignore:
--------------------------------------------------------------------------------
1 | # IntelliJ project files
2 | *.iml
3 | *.ipr
4 | *.iws
5 | .idea/
6 |
7 | # eclipse project file
8 | .metadata
9 | .settings/
10 | .classpath
11 | .project
12 | build/
13 | .factorypath
14 | .fbExcludeFilterFile
15 |
16 | # withMaven from Jenkinsfile
17 | .repository/
18 |
19 | # Maven generated files
20 | target/
21 | release.properties
22 | pom.xml.releaseBackup
23 |
24 | # git-timestamp:release Maven plugin generated files
25 | VERSION.txt
26 | TAG_NAME.txt
27 |
28 |
--------------------------------------------------------------------------------
/CHANGES.md:
--------------------------------------------------------------------------------
1 | [FEATURE-1] blah blah blah
2 | [FEATURE-2] blah blah blah
3 | [FEATURE-3] blah blah blah
4 | [FEATURE-4] blah blah blah
5 | [FEATURE-5] blah blah blah
6 | [FEATURE-6] blah blah blah
7 |
--------------------------------------------------------------------------------
/Jenkinsfile:
--------------------------------------------------------------------------------
1 | pipeline {
2 | agent any
3 | options {
4 | buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '1', daysToKeepStr: '', numToKeepStr: '10')
5 | disableConcurrentBuilds()
6 | }
7 | stages {
8 | stage('Build') {
9 | when {
10 | not { branch 'master' }
11 | }
12 | steps {
13 | withMaven(maven:'maven-3', jdk:'java-8', mavenLocalRepo: '.repository') {
14 | sh 'mvn verify'
15 | }
16 | }
17 | }
18 | stage('Release') {
19 | when {
20 | branch 'master'
21 | }
22 | steps {
23 | withMaven(maven:'maven-3', jdk:'java-8', mavenLocalRepo: '.repository') {
24 | sh 'mvn release:clean git-timestamp:setup-release release:prepare release:perform'
25 | }
26 | }
27 | post {
28 | success {
29 | // Publish the tag
30 | sshagent(['github-ssh']) {
31 | // using the full url so that we do not care if https checkout used in Jenkins
32 | sh 'git push git@github.com:cloudbeers/maven-continuous.git $(cat TAG_NAME.txt)'
33 | }
34 | // Set the display name to the version so it is easier to see in the UI
35 | script { currentBuild.displayName = readFile('VERSION.txt').trim() }
36 |
37 | // (If using a repository manager with staging support) Close staging repo
38 | }
39 | failure {
40 | // Remove the local tag as there is no matching remote tag
41 | sh 'test -f TAG_NAME.txt && git tag -d $(cat TAG_NAME.txt) && rm -f TAG_NAME.txt || true'
42 |
43 | // (If using a repository manager with staging support) Drop staging repo
44 | }
45 | }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/README.adoc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cloudbeers/maven-continuous/c130fd05fd8a319ec0338f55ecb2ce4ffbae9bd8/README.adoc
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |