13
13
stage(' Check' ) {
14
14
node {
15
15
checkout scm
16
+ sh " git clean -dfx"
16
17
try {
17
18
withEnv([" JAVA_HOME=${ tool 'jdk8' } " ]) {
18
19
sh " ./gradlew clean check --refresh-dependencies --no-daemon --stacktrace"
30
31
stage(' Sonar' ) {
31
32
node {
32
33
checkout scm
34
+ sh " git clean -dfx"
33
35
withCredentials([string(credentialsId : ' spring-sonar.login' , variable : ' SONAR_LOGIN' )]) {
34
36
try {
35
37
withEnv([" JAVA_HOME=${ tool 'jdk8' } " ]) {
51
53
stage(' Snapshot Tests' ) {
52
54
node {
53
55
checkout scm
56
+ sh " git clean -dfx"
54
57
try {
55
58
withEnv([" JAVA_HOME=${ tool 'jdk8' } " ]) {
56
59
sh " ./gradlew clean test -PforceMavenRepositories=snapshot -PspringVersion='5.+' -PreactorVersion=Dysprosium-BUILD-SNAPSHOT -PspringDataVersion=Lovelace-BUILD-SNAPSHOT --refresh-dependencies --no-daemon --stacktrace"
66
69
stage(' JDK 9' ) {
67
70
node {
68
71
checkout scm
72
+ sh " git clean -dfx"
69
73
try {
70
74
withEnv([" JAVA_HOME=${ tool 'jdk9' } " ]) {
71
75
sh " ./gradlew clean test --refresh-dependencies --no-daemon --stacktrace"
81
85
stage(' JDK 10' ) {
82
86
node {
83
87
checkout scm
88
+ sh " git clean -dfx"
84
89
try {
85
90
withEnv([" JAVA_HOME=${ tool 'jdk10' } " ]) {
86
91
sh " ./gradlew clean test --refresh-dependencies --no-daemon --stacktrace"
96
101
stage(' JDK 11' ) {
97
102
node {
98
103
checkout scm
104
+ sh " git clean -dfx"
99
105
try {
100
106
withEnv([" JAVA_HOME=${ tool 'jdk11' } " ]) {
101
107
sh " ./gradlew clean test --refresh-dependencies --no-daemon --stacktrace"
@@ -111,6 +117,7 @@ try {
111
117
stage(' JDK 12' ) {
112
118
node {
113
119
checkout scm
120
+ sh " git clean -dfx"
114
121
try {
115
122
withEnv([" JAVA_HOME=${ tool 'openjdk12' } " ]) {
116
123
sh " ./gradlew clean test --refresh-dependencies --no-daemon --stacktrace"
@@ -128,6 +135,7 @@ try {
128
135
stage(' Deploy Artifacts' ) {
129
136
node {
130
137
checkout scm
138
+ sh " git clean -dfx"
131
139
withCredentials([file(credentialsId : ' spring-signing-secring.gpg' , variable : ' SIGNING_KEYRING_FILE' )]) {
132
140
withCredentials([string(credentialsId : ' spring-gpg-passphrase' , variable : ' SIGNING_PASSWORD' )]) {
133
141
withCredentials([usernamePassword(credentialsId : ' oss-token' , passwordVariable : ' OSSRH_PASSWORD' , usernameVariable : ' OSSRH_USERNAME' )]) {
@@ -146,6 +154,7 @@ try {
146
154
stage(' Deploy Docs' ) {
147
155
node {
148
156
checkout scm
157
+ sh " git clean -dfx"
149
158
withCredentials([file(credentialsId : ' docs.spring.io-jenkins_private_ssh_key' , variable : ' DEPLOY_SSH_KEY' )]) {
150
159
withEnv([" JAVA_HOME=${ tool 'jdk8' } " ]) {
151
160
sh " ./gradlew deployDocs -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
@@ -158,6 +167,7 @@ try {
158
167
stage(' Deploy Schema' ) {
159
168
node {
160
169
checkout scm
170
+ sh " git clean -dfx"
161
171
withCredentials([file(credentialsId : ' docs.spring.io-jenkins_private_ssh_key' , variable : ' DEPLOY_SSH_KEY' )]) {
162
172
withEnv([" JAVA_HOME=${ tool 'jdk8' } " ]) {
163
173
sh " ./gradlew deploySchema -PdeployDocsSshKeyPath=$DEPLOY_SSH_KEY -PdeployDocsSshUsername=$SPRING_DOCS_USERNAME --refresh-dependencies --no-daemon --stacktrace"
0 commit comments