Skip to content

Commit 7628fd2

Browse files
committed
#121 - Use parent 'artifactory' profile for snapshot releases.
1 parent 47e1812 commit 7628fd2

File tree

2 files changed

+23
-45
lines changed

2 files changed

+23
-45
lines changed

Jenkinsfile

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pipeline {
88

99
options {
1010
disableConcurrentBuilds()
11+
buildDiscarder(logRotator(numToKeepStr: '14'))
1112
}
1213

1314
stages {
@@ -23,13 +24,14 @@ pipeline {
2324
agent {
2425
docker {
2526
image 'adoptopenjdk/openjdk8:latest'
27+
label 'data'
2628
args '-u root -v /var/run/docker.sock:/var/run/docker.sock' // root but with no maven caching
2729
}
2830
}
2931
options { timeout(time: 30, unit: 'MINUTES') }
3032
steps {
3133
sh 'rm -rf ?'
32-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/spring-data-maven-repository" ./mvnw -Pci,all-dbs clean dependency:list test -Dsort -Dbundlor.enabled=false -B'
34+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,all-dbs clean dependency:list test -Dsort -Dbundlor.enabled=false -B'
3335
sh "chown -R 1001:1001 target"
3436
}
3537
}
@@ -44,7 +46,8 @@ pipeline {
4446
agent {
4547
docker {
4648
image 'adoptopenjdk/openjdk8:latest'
47-
args '-v $HOME/.m2:/tmp/spring-data-maven-repository'
49+
label 'data'
50+
args '-v $HOME:/tmp/jenkins-home'
4851
}
4952
}
5053
options { timeout(time: 20, unit: 'MINUTES') }
@@ -55,7 +58,14 @@ pipeline {
5558

5659
steps {
5760
sh 'rm -rf ?'
58-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/spring-data-maven-repository" ./mvnw -Pci,snapshot deploy -Dmaven.test.skip=true -B'
61+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
62+
'-Dartifactory.server=https://repo.spring.io ' +
63+
"-Dartifactory.username=${ARTIFACTORY_USR} " +
64+
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
65+
"-Dartifactory.staging-repository=libs-snapshot-local " +
66+
"-Dartifactory.build-name=spring-data-r2dbc " +
67+
"-Dartifactory.build-number=${BUILD_NUMBER} " +
68+
'-Dmaven.test.skip=true clean deploy -B'
5969
}
6070
}
6171

@@ -66,7 +76,8 @@ pipeline {
6676
agent {
6777
docker {
6878
image 'adoptopenjdk/openjdk8:latest'
69-
args '-v $HOME/.m2:/tmp/spring-data-maven-repository'
79+
label 'data'
80+
args '-v $HOME:/tmp/jenkins-home'
7081
}
7182
}
7283
options { timeout(time: 20, unit: 'MINUTES') }
@@ -77,7 +88,14 @@ pipeline {
7788

7889
steps {
7990
sh 'rm -rf ?'
80-
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/spring-data-maven-repository" ./mvnw -Pci,snapshot deploy -Dmaven.test.skip=true -B'
91+
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pci,artifactory ' +
92+
'-Dartifactory.server=https://repo.spring.io ' +
93+
"-Dartifactory.username=${ARTIFACTORY_USR} " +
94+
"-Dartifactory.password=${ARTIFACTORY_PSW} " +
95+
"-Dartifactory.staging-repository=libs-snapshot-local " +
96+
"-Dartifactory.build-name=spring-data-r2dbc " +
97+
"-Dartifactory.build-number=${BUILD_NUMBER} " +
98+
'-Dmaven.test.skip=true clean deploy -B'
8199
}
82100
}
83101
}

pom.xml

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -325,46 +325,6 @@
325325
</build>
326326

327327
<profiles>
328-
<profile>
329-
<id>snapshot</id>
330-
331-
<build>
332-
<plugins>
333-
<plugin>
334-
<groupId>org.jfrog.buildinfo</groupId>
335-
<artifactId>artifactory-maven-plugin</artifactId>
336-
<version>2.6.1</version>
337-
<inherited>false</inherited>
338-
<executions>
339-
<execution>
340-
<id>build-info</id>
341-
<goals>
342-
<goal>publish</goal>
343-
</goals>
344-
<configuration>
345-
<buildInfo>
346-
<buildUrl>{{BUILD_URL}}</buildUrl>
347-
</buildInfo>
348-
<deployProperties>
349-
<zip.name>spring-data-r2dbc</zip.name>
350-
<zip.displayname>spring-data-r2dbc</zip.displayname>
351-
<zip.deployed>false</zip.deployed>
352-
<archives>*:*:*:*@zip</archives>
353-
</deployProperties>
354-
<publisher>
355-
<contextUrl>https://repo.spring.io</contextUrl>
356-
<username>{{ARTIFACTORY_USR}}</username>
357-
<password>{{ARTIFACTORY_PSW}}</password>
358-
<repoKey>libs-snapshot-local</repoKey>
359-
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
360-
</publisher>
361-
</configuration>
362-
</execution>
363-
</executions>
364-
</plugin>
365-
</plugins>
366-
</build>
367-
</profile>
368328
<profile>
369329
<id>release</id>
370330
<build>

0 commit comments

Comments
 (0)