mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
added nexus
This commit is contained in:
parent
9af20edfea
commit
e40a00821b
1 changed files with 18 additions and 8 deletions
26
Jenkinsfile
vendored
26
Jenkinsfile
vendored
|
@ -10,22 +10,32 @@ pipeline{
|
|||
branch: 'spcbranch'
|
||||
}
|
||||
}
|
||||
// stage('nexus'){
|
||||
// steps{
|
||||
// nexusArtifactUploader artifacts: [[artifactId: 'spring-petclinic', classifier: '', file: '/home/ubuntu/spring-petclinic/target/spring-petclinic-3.1.0-SNAPSHOT.jar', type: 'jar']], credentialsId: 'nexus', groupId: 'org.springframework.samples', nexusUrl: '54.237.114.152:8081', nexusVersion: 'nexus3', protocol: 'http', repository: 'maven-snapshots', version: '3.1.0-SNAPSHOT'
|
||||
// }
|
||||
// }
|
||||
stage('Build & SonarQube Scan') {
|
||||
steps {
|
||||
sh 'ls'
|
||||
// sh 'cd spring-petclinic-jenkins'
|
||||
sh 'mvn --version'
|
||||
sh 'mvn package'
|
||||
// withSonarQubeEnv('SONAR_CLOUD') {
|
||||
// sh 'mvn clean install sonar:sonar -Dsonar.organization=qtdevopssohail123 -Dsonar.token=8c15adacf466a5ccd721f4f7cdb2c4bf17df84ab -Dsonar.projectKey=qtdevopssohail123'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('nexus'){
|
||||
steps{
|
||||
// nexusArtifactUploader artifacts: [[artifactId: 'spring-petclinic', classifier: '', file: '/home/ubuntu/spring-petclinic/target/spring-petclinic-3.1.0-SNAPSHOT.jar', type: 'jar']], credentialsId: 'nexus', groupId: 'org.springframework.samples', nexusUrl: '54.237.114.152:8081', nexusVersion: 'nexus3', protocol: 'http', repository: 'maven-snapshots', version: '3.1.0-SNAPSHOT'
|
||||
nexusArtifactUploader credentialsId: 'nexus', groupId: 'org.springframework.samples', nexusUrl: '100.26.252.177:8081', nexusVersion: 'nexus3', protocol: 'http', repository: 'maven-snapshots', version: '3.1.0-SNAPSHOT'
|
||||
}
|
||||
|
||||
}
|
||||
// stage('Build & SonarQube Scan') {
|
||||
// steps {
|
||||
// sh 'ls'
|
||||
// // sh 'cd spring-petclinic-jenkins'
|
||||
// sh 'mvn --version'
|
||||
// sh 'mvn package'
|
||||
// // withSonarQubeEnv('SONAR_CLOUD') {
|
||||
// // sh 'mvn clean install sonar:sonar -Dsonar.organization=qtdevopssohail123 -Dsonar.token=8c15adacf466a5ccd721f4f7cdb2c4bf17df84ab -Dsonar.projectKey=qtdevopssohail123'
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue