Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Jenkinsfile #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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: '[email protected]',
from: '[email protected]',
replyTo: '[email protected]',
mimeType: 'text/html'
)
stage('Docker deploy') {
steps {
script{
withDockerRegistry(credentialsId: 'docker-cred') {

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




}