Skip to content

Commit 5024f17

Browse files
Updated Jenkinsfile
1 parent 964a45c commit 5024f17

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

JenkinsFileKubernetes

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ pipeline
3030
}
3131
}
3232

33-
stage("Build Docker Image")
33+
stage('Build Docker Image')
3434
{
3535
steps()
3636
{
3737
sh 'docker build -t 149536451818.dkr.ecr.ap-south-1.amazonaws.com/maven-web-application:${buildNumber} .'
3838
}
3939
}
4040

41-
stage("Authenticate and Push Docker Image to AWS ECR")
41+
stage('Authenticate and Push Docker Image to AWS ECR')
4242
{
4343
steps()
4444
{
@@ -54,5 +54,13 @@ pipeline
5454
sh 'docker rmi -f 149536451818.dkr.ecr.ap-south-1.amazonaws.com/maven-web-application:${buildNumber}'
5555
}
5656
}
57+
58+
stage('Update Image Tag in Kubernetes Manifest')
59+
{
60+
steps()
61+
{
62+
sh "sed -i 's/Build_Tag/${buildNumber}/g' MavenWebApplication.yaml"
63+
}
64+
}
5765
}
5866
}

0 commit comments

Comments
 (0)