Skip to content

Added DevSecOps Jenkinsfile with Email Notifications #9

Open
Nehabisen21 wants to merge 2 commits intoLondheShubham153:mainfrom
Nehabisen21:patch-4
Open

Added DevSecOps Jenkinsfile with Email Notifications #9
Nehabisen21 wants to merge 2 commits intoLondheShubham153:mainfrom
Nehabisen21:patch-4

Conversation

@Nehabisen21
Copy link
Copy Markdown

Added DevSecOps pipeline

@Nehabisen21 Nehabisen21 changed the title Create Jenkinsfile Create DevSecOps Jenkinsfile with Email Notifications Jan 15, 2024
@Nehabisen21 Nehabisen21 changed the title Create DevSecOps Jenkinsfile with Email Notifications Added DevSecOps Jenkinsfile with Email Notifications Jan 15, 2024
steps{
dir("/var/lib/jenkins/workspace/App/frontend"){
//ECR Login
sh 'aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/m5h4e3m3'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how will the login credentials be passed?

the use of environment variables is needed

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No sir, its for AWS ECR.

It worked fine.

Copy link
Copy Markdown
Owner

@LondheShubham153 LondheShubham153 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the DevSecOps pipeline needs prerequisites

  • SonarQube Installation
  • Env Variables
  • Readme Changes

We need to add it as DevOps Engineers, else the end user will be confused

sh 'kubectl create namespace workshop'
sh 'kubectl apply -f secrets.yaml'
sh 'kubectl apply -f deploy.yaml'
sh 'kubectl apply -f service.yaml'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need readme docs for kubeconfig adding to Jenkins,

<li>Build Logs: ${BUILD_URL}</li>
</body>
</html>''',
to: 'bisen.neha21@gmail.com',
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be hardcoded

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally we use this way only sir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants