Skip to content

Commit 364ce8c

Browse files
authored
Merge branch 'master' into DATAJDBC-234
2 parents 797dc05 + 9129622 commit 364ce8c

File tree

229 files changed

+4131
-1036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+4131
-1036
lines changed

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 0 additions & 110 deletions
This file was deleted.

CI.adoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
= Continuous Integration
2+
3+
image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-jdbc%2Fmaster&subject=Moore%20(master)["Spring Data JDBC", link="https://jenkins.spring.io/view/SpringData/job/spring-data-jdbc/"]
4+
image:https://jenkins.spring.io/buildStatus/icon?job=spring-data-jdbc%2F1.0.x&subject=Lovelace%20(1.0.x)["Spring Data JDBC", link="https://jenkins.spring.io/view/SpringData/job/spring-data-jdbc/"]
5+
6+
== Running CI tasks locally
7+
8+
Since this pipeline is purely Docker-based, it's easy to:
9+
10+
* Debug what went wrong on your local machine.
11+
* Test out a a tweak to your `test.sh` script before sending it out.
12+
* Experiment against a new image before submitting your pull request.
13+
14+
All of these use cases are great reasons to essentially run what the CI server does on your local machine.
15+
16+
IMPORTANT: To do this you must have Docker installed on your machine.
17+
18+
1. `docker run -it --mount type=bind,source="$(pwd)",target=/spring-data-jdbc-github -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock adoptopenjdk/openjdk8:latest /bin/bash`
19+
+
20+
This will launch the Docker image and mount your source code at `spring-data-jdbc-github`.
21+
+
22+
2. `cd spring-data-jdbc-github`
23+
+
24+
Next, test everything from inside the container:
25+
+
26+
3. `./mvnw -Pci,all-dbs clean dependency:list test -Dsort -B` (or whatever test configuration you must use)
27+
28+
Since the container is binding to your source, you can make edits from your IDE and continue to run build jobs.
29+
30+
NOTE: Docker containers can eat up disk space fast! From time to time, run `docker system prune` to clean out old images.

CODE_OF_CONDUCT.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ Instances of abusive, harassing, or otherwise unacceptable behavior may be repor
2424
All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
2525
Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
2626

27-
This Code of Conduct is adapted from the http://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at http://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/].
27+
This Code of Conduct is adapted from the https://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at https://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/].

CONTRIBUTING.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
= Spring Data contribution guidelines
2+
3+
You find the contribution guidelines for Spring Data projects https://github.com/spring-projects/spring-data-build/blob/master/CONTRIBUTING.adoc[here].

Jenkinsfile

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
pipeline {
2+
agent none
3+
4+
triggers {
5+
pollSCM 'H/10 * * * *'
6+
upstream(upstreamProjects: "spring-data-commons/master", threshold: hudson.model.Result.SUCCESS)
7+
}
8+
9+
options {
10+
disableConcurrentBuilds()
11+
buildDiscarder(logRotator(numToKeepStr: '14'))
12+
}
13+
14+
stages {
15+
stage("Test") {
16+
when {
17+
anyOf {
18+
branch 'master'
19+
not { triggeredBy 'UpstreamCause' }
20+
}
21+
}
22+
parallel {
23+
stage("test: baseline") {
24+
agent {
25+
docker {
26+
image 'adoptopenjdk/openjdk8:latest'
27+
label 'data'
28+
args '-u root -v /var/run/docker.sock:/var/run/docker.sock'
29+
// root but with no maven caching
30+
}
31+
}
32+
options { timeout(time: 30, unit: 'MINUTES') }
33+
steps {
34+
sh 'rm -rf ?'
35+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,all-dbs clean dependency:list test -Dsort -U -B'
36+
sh "chown -R 1001:1001 target"
37+
}
38+
}
39+
}
40+
}
41+
stage('Release to artifactory') {
42+
when {
43+
anyOf {
44+
branch 'master'
45+
not { triggeredBy 'UpstreamCause' }
46+
}
47+
}
48+
agent {
49+
docker {
50+
image 'adoptopenjdk/openjdk8:latest'
51+
label 'data'
52+
args '-v $HOME:/tmp/jenkins-home'
53+
}
54+
}
55+
options { timeout(time: 20, unit: 'MINUTES') }
56+
57+
environment {
58+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
59+
}
60+
61+
steps {
62+
sh 'rm -rf ?'
63+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
64+
'-Dartifactory.server=https://repo.spring.io ' +
65+
"-Dartifactory.username=${ARTIFACTORY_USR} " +
66+
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
67+
"-Dartifactory.staging-repository=libs-snapshot-local " +
68+
"-Dartifactory.build-name=spring-data-jdbc " +
69+
"-Dartifactory.build-number=${BUILD_NUMBER} " +
70+
'-Dmaven.test.skip=true clean deploy -U -B'
71+
}
72+
}
73+
stage('Publish documentation') {
74+
when {
75+
branch 'master'
76+
}
77+
agent {
78+
docker {
79+
image 'adoptopenjdk/openjdk8:latest'
80+
label 'data'
81+
args '-v $HOME:/tmp/jenkins-home'
82+
}
83+
}
84+
options { timeout(time: 20, unit: 'MINUTES') }
85+
86+
environment {
87+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
88+
}
89+
90+
steps {
91+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,distribute ' +
92+
'-Dartifactory.server=https://repo.spring.io ' +
93+
"-Dartifactory.username=${ARTIFACTORY_USR} " +
94+
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
95+
"-Dartifactory.distribution-repository=temp-private-local " +
96+
'-Dmaven.test.skip=true clean deploy -U -B'
97+
}
98+
}
99+
}
100+
101+
post {
102+
changed {
103+
script {
104+
slackSend(
105+
color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger',
106+
channel: '#spring-data-dev',
107+
message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}")
108+
emailext(
109+
subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}",
110+
mimeType: 'text/html',
111+
recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']],
112+
body: "<a href=\"${env.BUILD_URL}\">${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}</a>")
113+
}
114+
}
115+
}
116+
}

0 commit comments

Comments
 (0)