Updated pom with jfrog details and updated jenkins file

This commit is contained in:
Maharshi Patel 2021-01-10 15:26:10 -08:00
parent 25aa2103b9
commit bf42f47b0c
2 changed files with 28 additions and 18 deletions

18
Jenkinsfile vendored
View file

@ -24,24 +24,6 @@ pipeline {
stages {
stage('build maven package') {
steps {
rtServer (
id: "ARTIFACTORY_SERVER",
url: "$artifactory_url"
)
rtMavenDeployer (
id: "MAVEN_DEPLOYER",
serverId: "ARTIFACTORY_SERVER",
releaseRepo: "spring-petclinic",
snapshotRepo: "spring-petclinic-snapshot"
)
rtMavenResolver (
id: "MAVEN_RESOLVER",
serverId: "ARTIFACTORY_SERVER",
releaseRepo: "spring-petclinic",
snapshotRepo: "spring-petclinic-snapshot"
)
sh "mvn validate compile test package"
}
}

28
pom.xml
View file

@ -311,6 +311,10 @@
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>Maven-Artifactory-Plugin</id>
<url>https://petclinic.jfrog.io</url>
</pluginRepository>
</pluginRepositories>
<profiles>
@ -363,6 +367,30 @@
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.2.1</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<publisher>
<contextUrl>https://petclinic.jfrog.io/artifactory</contextUrl>
<username>jfroguser</username>
<password>AdminPassword1</password>
<repoKey>spring-petclinic</repoKey>
<snapshotRepoKey>spring-petclinic-snapshot</snapshotRepoKey>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>