Day 24 Task: Complete Jenkins CI/CD Project

Day 24 Task: Complete Jenkins CI/CD Project

Let's make a beautiful CI/CD Pipeline for your Node JS Application?

Task-01

Fork?this?repository:

No alt text provided for this image

Create a connection to your Jenkins job and your GitHub Repository via GitHub Integration.

Steps:

Generate the SSH keys for integrating your Jenkins project with your git repository. Use ssh-keygen command to create public and private key.

No alt text provided for this image

Configuring GitHub

1.Go to your GitHub account settings.

2. Go to?SSH and GPG keys, Add public key that we created using ssh-keygen and select key-type Authentication key.

No alt text provided for this image

For GitHub-Webhook:

1.Go to your GitHub repository and click on?Settings.

2.Click on?Webhooks?and then click on?Add webhook.

3. In the?‘Payload URL’?field, paste your Jenkins environment URL. At the end of this URL add?/github-webhook/. In the?‘Content type’?select:?‘application/json’?and leave the?‘Secret’?field empty.

No alt text provided for this image

For Installing GitHub Integration plugin in Jenkins

1.Open your jenkins dashboard.

2.Click on the?Manage Jenkins?button on your Jenkins dashboard

3.Click on?Manage Plugins

4. Install GitHub Integration plugin

No alt text provided for this image

Configuring Jenkins:

1. Create a jenkins job

No alt text provided for this image

2. Create node-todo-app freestyle project

3. In Configure, GitHub project URL write your project GitHub URL

No alt text provided for this image

4.In Git, add credentials for jenkins

No alt text provided for this image

5. Add private key which we created using ssh-keygen command.

No alt text provided for this image

6. Click on the?‘Build Triggers’?tab and then on the?‘GitHub hook trigger for GITScm polling’.

No alt text provided for this image

Task 2:

In the Execute shell run the application using Docker compose

No alt text provided for this image

You will have to make a Docker Compose file for this Project

No alt text provided for this image

After build you can check console output.

No alt text provided for this image

Using docker ps command, you can see container is created.

Browse public IP address with port no.8000

No alt text provided for this image


Happy Learning :)

要查看或添加评论,请登录

Deepika D的更多文章

  • Day 28 Task: Jenkins Agents

    Day 28 Task: Jenkins Agents

    Jenkins Master (Server) Jenkins’s server or master node holds all key configurations. Jenkins master server is like a…

    4 条评论
  • Day 27 Task: Jenkins Declarative Pipeline with Docker

    Day 27 Task: Jenkins Declarative Pipeline with Docker

    Use your Docker Build and Run Knowledge docker build - you can use sh docker build . -t in your pipeline stage block…

    1 条评论
  • Day 26 Task: Jenkins Declarative Pipeline

    Day 26 Task: Jenkins Declarative Pipeline

    One of the most important parts of your DevOps and CICD journey is a Declarative Pipeline Syntax of Jenkins Some terms…

  • Day 23 Task: Jenkins Freestyle Project for DevOps Engineers.

    Day 23 Task: Jenkins Freestyle Project for DevOps Engineers.

    What is CI/CD? CI or Continuous Integration is the practice of automating the integration of code changes from multiple…

  • Day-22 : Getting Started with Jenkins

    Day-22 : Getting Started with Jenkins

    1. What is Jenkins? Jenkins is an open source continuous integration-continuous delivery and deployment (CI/CD)…

  • Day 21 Task: Docker Important interview Questions.

    Day 21 Task: Docker Important interview Questions.

    Docker Interview Docker is a good topic to ask in DevOps Engineer Interviews, mostly for freshers. One must surely try…

    6 条评论
  • Day 20 Task : Docker commands Cheat-Sheet

    Day 20 Task : Docker commands Cheat-Sheet

    Docker commands: # docker build: Builds an image from a Dockerfile. docker build [OPTIONS] PATH | URL | docker build…

  • Day 19 Task: Docker for DevOps Engineers

    Day 19 Task: Docker for DevOps Engineers

    Docker-Volume Docker allows you to create something called volumes. Volumes are like separate storage areas that can be…

    3 条评论
  • Day 18 Task: Docker for DevOps Engineers

    Day 18 Task: Docker for DevOps Engineers

    Docker Compose Docker Compose is a tool that was developed to help define and share multi-container applications. With…

  • Day 17 Task: Docker Project for DevOps Engineers.

    Day 17 Task: Docker Project for DevOps Engineers.

    Dockerfile Docker is a tool that makes it easy to run applications in containers. Containers are like small packages…

社区洞察

其他会员也浏览了