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 pipeline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ pipeline{
script{
withDockerRegistry(credentialsId: 'docker', toolName: 'docker'){
sh "docker build --build-arg TMDB_V3_API_KEY=<yourtmdbapikey> -t netflix ."
sh "docker tag netflix nasi101/netflix:latest "
sh "docker push nasi101/netflix:latest "
sh "docker tag netflix sid2516/netflix:latest "
sh "docker push sid2516/netflix:latest "
}
}
}
}
stage("TRIVY"){
steps{
sh "trivy image nasi101/netflix:latest > trivyimage.txt"
sh "trivy image sid2516/netflix:latest > trivyimage.txt"
}
}
stage('Deploy to container'){
steps{
sh 'docker run -d -p 8081:80 nasi101/netflix:latest'
sh 'docker run -d -p 8081:80 sid2516/netflix:latest'
}
}
stage('Deploy to kubernets'){
Expand All @@ -91,8 +91,8 @@ pipeline{
body: "Project: ${env.JOB_NAME}<br/>" +
"Build Number: ${env.BUILD_NUMBER}<br/>" +
"URL: ${env.BUILD_URL}<br/>",
to: 'iambatmanthegoat@gmail.com', #change mail here
to: 'siddharth.as2516@gmail.com', #change mail here
attachmentsPattern: 'trivyfs.txt,trivyimage.txt'
}
}
}
}