Continuous integration, continuous delivery, and continuous deployment
Based on our usual workflow, we can simply understand what is integration, delivery and deployment
- “Integration” : Merge our development branch into the main branch to resolve issues that may arise after the merge as early as possible, such as merge conflicts, unit regression testing
- “Delivery” : After the integration is fine, test the code functionality in the class line environment to see if there are any bugs
- Deploy: Synchronizes changes to the online environment for verification
So what difference does the former make with continuing Chi Jiu? The main difference is that the latter is automated frequently (periodically).
What you mean, for example, we received a demand iteration, electricity system involves the homepage, shang detailed, orders and other subsystem, in order to guarantee product quality and delivery speed, the original interactive unchanged under the premise of the agreement of each subsystem, we usually will iteration of each subsystem in the function of each branch to complete development and testing, and release link, Problems after their own reconstruction can be found and solved as soon as possible in the links of their respective functional branches. In this way, each iteration of a subsystem can be delivered to the next one, and problems can be corrected as soon as they are found, so that problems will not be magnified to other subsystems and subsequent links.
To put it bluntly, instead of waiting for all the code to be written and tested, and then releasing it online at the same time, we might end up with a lot of problems and slow progress. Instead, we write and test and then send. And we will use some automation tools to help us improve efficiency and avoid risks.
2 Jenkins+Github Automated build deployment practice
Jenkins, Github, Nginx, Github, Github, Github, Nginx, Jenkins, Github, Nginx, Jenkins, Github, Nginx, Jenkins, Github, Nginx, Jenkins, Github
Install Jenkins
First of all, you can download the latest version of your system from Jenkins’ official website. I downloaded the Windows version, which will be opened in the browser via http://localhost:8080 by default after installation.
After a few minutes, the initial unlock page is displayed. You can enter the administrator password as prompted
Then come to the plug-in installation interface, because the default source of the plug-in is foreign, the general download is very slow, so it is suggested to click the close in the upper right corner to directly skip
Next, we use the administrator account to enter Jenkins, and the image here is the tuna Jenkins image. You can download the plug-in on this website and install it by importing it, or you can directly replace the source of the plug-in in the Jenkins plug-in setting panel
“https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json“
Then search for plug-ins to install in the Optional plug-ins panel.
- localization-zh-cn
- publish-over-ssh
- git-parameter
Remember to reboot Jenkins after the installation and log in again to start the rest of the configuration.
Start the Nginx service on the remote server
This here is not said, there are many online tutorials. After we open the server, and then record the port and HTML path of the service for standby
Configuration Jenkins
If you do not have an amway Ali cloud service, you can use it for free for new users. If you do not have an Amway Ali Cloud service, you can configure the following information for Jenkins
Then we need to create a new project and go to project configuration
After adding the description and configuring the source, the link is the home PAGE URL of our repository code
To connect to GitHub, you need to add a credential first. After filling in and saving the credential, select the credential and use it
Next, add the SSH service we configured above to the Jenkins project configuration
Finally, add the shell needed for the build, click Save, and use it
Now for the exciting moment, click Build and you’ll see the log in the console
Access the address of our server nginx service and you’re done!
If there are mistakes, please correct!
This article is formatted using MDNICE