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
36 changes: 12 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,40 +66,28 @@ pipeline {
steps {
script{
withDockerRegistry(credentialsId: 'docker-cred') {
sh "docker tag santa123 adijaiswal/santa123:latest"
sh "docker push adijaiswal/santa123:latest"
sh "docker tag santa123 snreddyboggu/santa123:latest"
sh "docker push snreddyboggu/santa123:latest"

}
}
}
}


stage('Docker Image Scan') {
steps {
sh "trivy image adijaiswal/santa123:latest "
}
}}


post {
always {
emailext (
subject: "Pipeline Status: ${BUILD_NUMBER}",
body: '''<html>
<body>
<p>Build Status: ${BUILD_STATUS}</p>
<p>Build Number: ${BUILD_NUMBER}</p>
<p>Check the <a href="${BUILD_URL}">console output</a>.</p>
</body>
</html>''',
to: 'jaiswaladi246@gmail.com',
from: 'jenkins@example.com',
replyTo: 'jenkins@example.com',
mimeType: 'text/html'
)
stage('Docker deploy') {
steps {
script{
withDockerRegistry(credentialsId: 'docker-cred') {

sh "docker run -d -p 8081:8000 snreddyboggu/dotnet-demoapp"
}
}
}
}




}