added SRIDHAR

This commit is contained in:
sridhar 2023-09-15 12:38:50 +05:30
parent db8e7134e6
commit fc082aa4ed

53
Jenkinsfile vendored
View file

@ -20,7 +20,7 @@ pipeline{
stage('SonarQube Scan') {
steps {
withSonarQubeEnv('SONAR_CLOUD') {
sh 'mvn clean package sonar:sonar -Dsonar.organization=sridhardevops -Dsonar.token=94fa8a4b44707c54a1aae9c4894e0cd8bf0d18d6 -Dsonar.host.url=https://sonarcloud.io -Dsonar.projectKey=sridhardevops006'
sh 'mvn clean package sonar:sonar -Dsonar.organization=sridhardevops -Dsonar.token=94fa8a4b44707c54a1aae9c4894e0cd8bf0d18d6 -Dsonar.host.url=https://sonarcloud.io -Dsonar.projectKey=sridhardevops006'
}
}
@ -48,8 +48,8 @@ pipeline{
}
stage('docker login'){
steps{
withCredentials([string(credentialsId: 'DOCKER_HUB_PASSWORD1',variable: 'PASSWORD')]) {
sh 'docker login -u sridhar006 -p $PASSWORD'
withCredentials([string(credentialsId: 'DOCKER_HUB_PASSWORD1',variable: 'SRIDHAR')]) {
sh 'docker login -u sridhar006 -p $SRIDHAR'
}
}
}
@ -108,51 +108,4 @@ pipeline{
// pipeline{
// agent{label 'java-17'}
// stages{
// stage('VCS'){
// steps{
// git credentialsId: 'GIT_HUB_CREDENTIALS',
// url: 'https://github.com/Cloud-and-devops-notes/spring-petclinic-jenkins.git',
// branch: 'main'
// }
// }
// stage('artifact build'){
// steps{
// sh 'docker image build -t spc-mvn .'
// sh 'docker image list'
// }
// }
// stage('artifact') {
// steps {
// archiveArtifacts artifacts: '**/target/spring-petclinic-3.1.0-SNAPSHOT.jar',
// onlyIfSuccessful: true
// junit testResults: '**/surefire-reports/TEST-*.xml'
// }
// }
// stage('docker login'){
// steps{
// withCredentials([string(credentialsId: 'DOCKER_HUB_PASSWORD',variable: 'PASSWORD')]) {
// sh 'docker login -u sridhar006 -p $PASSWORD'
// }
// }
// }
// stage('docker push image '){
// steps{
// sh 'docker image tag spc-mvn sridhar006/spc-mvn:${BUILD_ID}'
// sh 'docker push sridhar006/spc-mvn:${BUILD_ID}'
// }
// }
// stage("kubernetes deployment"){
// steps{
// sh 'kubectl apply -f deployement.yaml'
// }
// }
// }
// }