Jenkins-- continuous integration (CI)

Jenkins describes
Jenkins is an open source software project, continuous integration tool is based on a Java development for continuous monitoring duplication of work, it aims to provide an open and easy to use software platform that enables continuous integration software becomes possible.
Jenkins features include:
1, continuous software release / test project.
2, external monitor to call the work performed.
 
jenkins is based on one developed in Java continuous integration tools
can be used in the operation and maintenance of each script to integrate, and can be centrally managed through the page mode, and can be achieved and gitlab, github interaction can be achieved automatically compile, deploy program.
 
Continuous Integration
 
Continuous Integration is a software development practice, that members of the development team integrate their work frequently, integrated by each member at least once a day, which means integration may occur several times a day.
Each integration automated build (including the compilation, publishing, automated testing) to verify that all through, so find integration errors as early as possible.
 
Continuous Integration: Continuous Intergration (CI)
Continuous Delivery: Continuous Delivery (CD)
continued deployment: Continuous Deployment (CD)
 
integration refers to the software personally developed partial deliveries to the software an integral part, in order to identify problems of personal development section as soon as possible;
deployment is the code delivery as soon as possible to the development / test section can be run in order to test as soon as possible;
delivery refers to the development delivered to customers as soon as possible, in order to detect problems in the production environment as soon as possible.
If you say wait until everything is completed before delivery down a link, causing all the problems had only finally burst out, even to solve the enormous costs can not be solved.
The so-called sustained, that is an integral part of each completed it down a part of the delivery, identify problems and can be adjusted immediately. The problem is not enlarged to other parts and the back part.
 
Continuous integration (CI) Process
1. Submit (Git)
2. Test
3. Construction (Jenkins)
4. Test
5. Deployment (ansible, the shell, Puppet)
6. The rollback (ansible)
Installation and deployment jenkins: http: //pkg.jenkins.io/ # to the site to download the corresponding version jenkins you want.
jenkins java-based development, it is necessary to install java environment
yum the install java -Y
[CentOS the root @ ~] # LS | grep jenkins
jenkins-2.138.3-1.1.noarch.rpm
[CentOS the root @ ~] # 2.138 RPM -ivh-jenkins .3-1.1.noarch.rpm
Jenkins is listening on port 8080
vim / etc / sysconfig / jenkins
change = JENKINS_USER "root"
systemctl restart Jenkins
then a browser to access ip + port to enter the installation interface.
[root @ CentOS ~] # CAT / var / lib / Jenkins / Secrets / initialAdminPassword
f10ee04f771042638d1c152355efc8c8
copy to the administrator password prompt box
then the next step, skip the plug-in installed, and then create your user and password.
Finally, save the configuration, select Administration -> Plugin Manager
manually download the plugin and install: #http: //updates.jenkins-ci.org/ find your jenkins corresponding version, download the plug.
[root@centos ~]# tar xf plugins-2.138.3.tar.gz
[root@centos ~]# cp plugins/* /var/lib/jenkins/plugins/ -a
Restart Jenkins:
systemctl restart Jenkins
then enter the web interface: System Management -> Plugin Manager # discovery has been installed plug-ins
In jenkins create a project, such as a test project, in fact, is in / var / lib / jenkins / workspace / below creates a test directory,
if you want to achieve jenkins project version management, you need to download the git, git will test directory is initialized to work table of Contents.

Jenkins credentials presentation
 
there are many third-party sites and applications that can interact with Jenkins, such as program code storage, storage systems and cloud services.
System administrators can configure this type of application credentials in your application to use exclusively for Jenkins.
Typically by access controls to these credentials to do the job in order to "lock" application functionality Jenkins area available.
Once Jenkins administrator (ie user management Jenkins Jenkins sites) Add / configure these credentials in Jenkins, Pipeline project can use these credentials with third-party applications to interact.
 
Jenkins saved the credentials can be used for:
any applicable anywhere in Jenkins' (ie a global certificate)
specific Pipeline project
specific user Jenkins
 
created Jenkins credentials
 
can create a voucher to gitlab, the user is gitlab user name, password is the password gitlab so when calling git to do continuous integration can directly use the credential the
creation credentials: jenkins into your home page, click on the left column of credentials -> system -> global Document -> Add credentials -> fill gitlab user and password
 
Jenkins use
Jenkins + Git + Gitlab + Ansible achieve continuous integration automated deployment
to be continued........

Guess you like

Origin www.cnblogs.com/getbird/p/11670582.html