Automated sql code deployment using Github and Jenkins DevOps
Install GitHub
Download Git
https://git-scm.com/download/win
Installation Steps










After finish,Please create repository where code will be saved


There is no code now

I am creating sample code in c:\mygitrep directory


We need to again login to git from program and rescan.

Now stage unchanged


Now sign off

Please commit now

Now we will get this screen.

Please create a github repository to store code in central repository online.I login with my user.You can also create your user in github.

Now take the url and put into arbitrary url


Now you can push the code to git hub

Install Jenkins
https://jenkins.io/download/thank-you-downloading-windows-installer-stable/




You can get admin password from below location

Default plugin as well as github integration plugin needs to be installed.


Jenkins is ready with default url localhost:8080


Please provide git local installation file details in below



Please now go to create new job and provide git location

Please enable Poll scm which will poll and check if code is modified

This Build section is very important.You need to put DB tns names and power shell command to run sqlplus

Please create following file under your local repository->.git->hooks.

The content of the file will be as following

Now we need to test if change in code configured in git repository will trigger the Jenkins job






Great.The change in sql code trigger the Jenkins job automatically kick off.

You may view job result fail or successfully

Please check that you have two version of same sql in github repository

Related
About the Author
12+ years of rich experience on Database Administrations and on Infrastructure Solution Architect.
AWS Certified Solution Architect and Senior Oracle DBA
Great post I will try to implement this in our environment thanks great info to learn devops culture we requesting guide us more related to devops culture
Thanks for sharing basic things in automation world.
Nice explanation Debasis. thanks for sharing.