Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions java-maven-sonar-argocd-helm-k8s/spring-boot-app/JenkinsFile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pipeline {
agent {
docker {
image 'abhishekf5/maven-abhishek-docker-agent:v1'
image 'deepasreetk/maven-abhishek-docker-agent:v1'
args '--user root -v /var/run/docker.sock:/var/run/docker.sock' // mount Docker socket to access the host's Docker daemon
}
}
Expand All @@ -21,7 +21,7 @@ pipeline {
}
stage('Static Code Analysis') {
environment {
SONAR_URL = "http://34.201.116.83:9000"
SONAR_URL = "http://192.168.1.10/:9000"
}
steps {
withCredentials([string(credentialsId: 'sonarqube', variable: 'SONAR_AUTH_TOKEN')]) {
Expand All @@ -31,7 +31,7 @@ pipeline {
}
stage('Build and Push Docker Image') {
environment {
DOCKER_IMAGE = "abhishekf5/ultimate-cicd:${BUILD_NUMBER}"
DOCKER_IMAGE = "deepasreetk/ultimate-cicd:${BUILD_NUMBER}"
// DOCKERFILE_LOCATION = "java-maven-sonar-argocd-helm-k8s/spring-boot-app/Dockerfile"
REGISTRY_CREDENTIALS = credentials('docker-cred')
}
Expand All @@ -48,13 +48,13 @@ pipeline {
stage('Update Deployment File') {
environment {
GIT_REPO_NAME = "Jenkins-Zero-To-Hero"
GIT_USER_NAME = "iam-veeramalla"
GIT_USER_NAME = "deepasreetk"
}
steps {
withCredentials([string(credentialsId: 'github', variable: 'GITHUB_TOKEN')]) {
sh '''
git config user.email "abhishek.xyz@gmail.com"
git config user.name "Abhishek Veeramalla"
git config user.email "deepasree.rajeev@gmail.com"
git config user.name "deepasreetk"
BUILD_NUMBER=${BUILD_NUMBER}
sed -i "s/replaceImageTag/${BUILD_NUMBER}/g" java-maven-sonar-argocd-helm-k8s/spring-boot-app-manifests/deployment.yml
git add java-maven-sonar-argocd-helm-k8s/spring-boot-app-manifests/deployment.yml
Expand Down