repositories

This commit is contained in:
VSAzima 2021-04-26 17:59:56 +04:00
parent 985890245a
commit 6fe90c30d1
2 changed files with 28 additions and 10 deletions

20
Jenkinsfile vendored
View file

@ -31,16 +31,15 @@ pipeline {
//
// }
// stage('build') {
// steps {
// script {
// docker.image('maven:3.8.1-jdk-8').inside {
// sh 'cp /var/jenkins_home/.m2/settings.xml 6859117773ac:/usr/share/maven/ref/'
// sh 'mvn -B clean package'
// }
// }
// }
// }
stage('build') {
steps {
script {
docker.image('maven:3.8.1-jdk-8').inside {
sh 'mvn -B clean package'
}
}
}
}
// stage("publish to nexus") {
// steps {
// script {
@ -94,6 +93,7 @@ pipeline {
withCredentials([usernameColonPassword(credentialsId: 'nexus-deployment-user', variable: 'DEPLOYMENT')]) {
sh '''
curl -u "$DEPLOYMENT" http://${NEXUS_URL}/repository/${NEXUS_REPOSITORY}/org/springframework/samples/spring-petclinic/2.4.2/spring-petclinic-2.4.2.jar >output
(java -jar spring-petclinic-2.4.2.jar --server.port=8083>> server.log 2>&1&)
nohup java -jar spring-petclinic-2.4.2.jar --server.port=8083>> server.log 2>&1&
'''
}

18
pom.xml
View file

@ -341,6 +341,24 @@
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>maven-central</id>
<name>maven-central</name>
<url>http://172.19.0.3:8081/repository/maven-nexus-repo/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>maven-central</id>
<name>maven-central</name>
<url>http://172.19.0.3:8081/repository/maven-nexus-repo/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>