Skip to main content

Posts

INTEGRATION OF JENKINS AND GITHUB REPOSITORY

One of the basic steps of implementing  CI/CD  is integrating your SCM (Source Control Management) tool with your CI tool. This saves you time and keeps your project updated all the time. One of the most popular and valuable SCM tools is GitHub. In this blog I will explain how to integrate  Jenkins  with GitHub projects.   Step 1:  Create a Repository in Git Hub . In my case I have created a repository named jenkinsdemo. Step 2:   Create a python file (.py) file in your Repository. In my case I have created check.py. Step 3:   Contents in  check.py. print("Entered Check") import time print ( "new python file" ) time . sleep ( 5 ) print ( "hello world" ) time . sleep ( 5 ) print ( "hi everyone" ) Step 4:  Save that python file and go to jenkins. Configuring Jenkins   Step 5:  In Jenkins, click on  ‘New Item’  to create a new project.     Step 6:  Give your project a name, then choose  ‘Freesty...

JENKINS BASICS

  Jenkins  – an open source automation server which enables developers around the world to reliably build, test, and deploy their software. Dashboard: " Dashboard " is the default view shown when you open Jenkins and shows an overview of all  projects configured on a  Jenkins  instance. Creating a New Project: Step 2:  In the next screen, enter the Item name, Choose the ‘Freestyle project option’ Step 3  − The following screen will come up in which you can specify the details of the job. Note  − If you repository if hosted on Github, you can also enter the url of that repository here. In addition to this, you would need to click on the Add button for the credentials to add a user name and password to the github repository so that the code can be picked up from the remote repository. Step 4 − Now go to the Build section and click on Add build step → Execute Windows batch command Before Executing and building a file. Let me describe the task which w...

GIT FOR BEGINNERS

 Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. git init This command turns a directory into an empty Git repository. This is the first step in creating a repository. After running git init, adding and committing files/directories is possible. Usage: # change directory to codebase $ cd /file/path/to/code # make directory a git repository $ git init In Practice: # change directory to codebase $ cd /Users/computer-name/Documents/website # make directory a git repository $ git init Initialized empty Git repository in /Users/computer-name/Documents/website/.git/ git add Adds files in the to the staging area for Git. Before a file is available to commit to a repository, the file needs to be added to the Git index (staging area). There are a few different ways to use git add, by adding entire directories, specific files, or all unstaged files. Usage: $ git add <file or direct...