Skip to content

Commit 824885e

Browse files
committed
Add 'spring-data-r2dbc/' from commit '6289f4de9bf89f1d371ea3ae8810865a20beca9c'
git-subtree-dir: spring-data-r2dbc git-subtree-mainline: c1c38a7 git-subtree-split: 6289f4d
2 parents c1c38a7 + 6289f4d commit 824885e

File tree

237 files changed

+30079
-0
lines changed

Some content is hidden

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

237 files changed

+30079
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
3+
Thank you for proposing a pull request. This template will guide you through the essential steps necessary for a pull request.
4+
Make sure that:
5+
6+
-->
7+
8+
- [ ] You have read the [Spring Data contribution guidelines](https://github.com/spring-projects/spring-data-build/blob/master/CONTRIBUTING.adoc).
9+
- [ ] You use the code formatters provided [here](https://github.com/spring-projects/spring-data-build/tree/master/etc/ide) and have them applied to your changes. Don’t submit any formatting related changes.
10+
- [ ] You submit test cases (unit or integration tests) that back your changes.
11+
- [ ] You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# GitHub Actions to automate GitHub issues for Spring Data Project Management
2+
3+
name: Spring Data GitHub Issues
4+
5+
on:
6+
issues:
7+
types: [opened, edited, reopened]
8+
issue_comment:
9+
types: [created]
10+
pull_request_target:
11+
types: [opened, edited, reopened]
12+
13+
jobs:
14+
Inbox:
15+
runs-on: ubuntu-latest
16+
if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request == null
17+
steps:
18+
- name: Create or Update Issue Card
19+
uses: peter-evans/[email protected]
20+
with:
21+
project-name: 'Spring Data'
22+
column-name: 'Inbox'
23+
project-location: 'spring-projects'
24+
token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
25+
Pull-Request:
26+
runs-on: ubuntu-latest
27+
if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request != null
28+
steps:
29+
- name: Create or Update Pull Request Card
30+
uses: peter-evans/[email protected]
31+
with:
32+
project-name: 'Spring Data'
33+
column-name: 'Review pending'
34+
project-location: 'spring-projects'
35+
issue-number: ${{ github.event.pull_request.number }}
36+
token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}
37+
Feedback-Provided:
38+
runs-on: ubuntu-latest
39+
if: github.repository_owner == 'spring-projects' && github.event_name == 'issue_comment' && github.event.action == 'created' && github.actor != 'spring-projects-issues' && github.event.pull_request == null && github.event.issue.state == 'open' && contains(toJSON(github.event.issue.labels), 'waiting-for-feedback')
40+
steps:
41+
- name: Update Project Card
42+
uses: peter-evans/[email protected]
43+
with:
44+
project-name: 'Spring Data'
45+
column-name: 'Feedback provided'
46+
project-location: 'spring-projects'
47+
token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }}

spring-data-r2dbc/.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
target/
2+
.idea/
3+
.settings/
4+
*.iml
5+
.flattened-pom.xml
6+
.project
7+
.classpath
8+
.springBeans
9+
.sonar4clipse
10+
*.sonar4clipseExternals
11+
*.graphml
12+
*.json
47.2 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#Mon Oct 11 14:30:22 CEST 2021
2+
distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip

spring-data-r2dbc/CI.adoc

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

spring-data-r2dbc/CONTRIBUTING.adoc

+3
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/main/CONTRIBUTING.adoc[here].

spring-data-r2dbc/Jenkinsfile

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
def p = [:]
2+
node {
3+
checkout scm
4+
p = readProperties interpolate: true, file: 'ci/pipeline.properties'
5+
}
6+
7+
pipeline {
8+
agent none
9+
10+
triggers {
11+
pollSCM 'H/10 * * * *'
12+
upstream(upstreamProjects: "spring-data-commons/3.0.x,spring-data-jdbc/3.0.x", threshold: hudson.model.Result.SUCCESS)
13+
}
14+
15+
options {
16+
disableConcurrentBuilds()
17+
buildDiscarder(logRotator(numToKeepStr: '14'))
18+
}
19+
20+
stages {
21+
stage("test: baseline (Java 17)") {
22+
when {
23+
beforeAgent(true)
24+
anyOf {
25+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
26+
not { triggeredBy 'UpstreamCause' }
27+
}
28+
}
29+
agent {
30+
label 'data'
31+
}
32+
options { timeout(time: 30, unit: 'MINUTES') }
33+
34+
environment {
35+
DOCKER_HUB = credentials('hub.docker.com-springbuildmaster')
36+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
37+
}
38+
39+
steps {
40+
script {
41+
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
42+
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.docker']) {
43+
sh "docker login --username ${DOCKER_HUB_USR} --password ${DOCKER_HUB_PSW}"
44+
sh 'PROFILE=ci ci/test.sh'
45+
sh "ci/clean.sh"
46+
}
47+
}
48+
}
49+
}
50+
}
51+
52+
stage('Release to artifactory') {
53+
when {
54+
beforeAgent(true)
55+
anyOf {
56+
branch(pattern: "main|(\\d\\.\\d\\.x)", comparator: "REGEXP")
57+
not { triggeredBy 'UpstreamCause' }
58+
}
59+
}
60+
agent {
61+
label 'data'
62+
}
63+
options { timeout(time: 20, unit: 'MINUTES') }
64+
65+
environment {
66+
ARTIFACTORY = credentials('02bd1690-b54f-4c9f-819d-a77cb7a9822c')
67+
}
68+
69+
steps {
70+
script {
71+
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
72+
docker.image(p['docker.java.main.image']).inside(p['docker.java.inside.basic']) {
73+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -s settings.xml -Pci,artifactory -Dmaven.repo.local=/tmp/jenkins-home/.m2/spring-data-r2dbc-non-root ' +
74+
'-Dartifactory.server=https://repo.spring.io ' +
75+
"-Dartifactory.username=${ARTIFACTORY_USR} " +
76+
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
77+
"-Dartifactory.staging-repository=libs-snapshot-local " +
78+
"-Dartifactory.build-name=spring-data-r2dbc " +
79+
"-Dartifactory.build-number=${BUILD_NUMBER} " +
80+
'-Dmaven.test.skip=true clean deploy -U -B'
81+
}
82+
}
83+
}
84+
}
85+
}
86+
}
87+
88+
post {
89+
changed {
90+
script {
91+
slackSend(
92+
color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger',
93+
channel: '#spring-data-dev',
94+
message: "${currentBuild.fullDisplayName} - `${currentBuild.currentResult}`\n${env.BUILD_URL}")
95+
emailext(
96+
subject: "[${currentBuild.fullDisplayName}] ${currentBuild.currentResult}",
97+
mimeType: 'text/html',
98+
recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']],
99+
body: "<a href=\"${env.BUILD_URL}\">${currentBuild.fullDisplayName} is reported as ${currentBuild.currentResult}</a>")
100+
}
101+
}
102+
}
103+
}

0 commit comments

Comments
 (0)