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 pipeline.txt #13

Open
wants to merge 1 commit into
base: main
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
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'
}
}
}
}