DevOps continuous integration solution of SkyEye and Jenkins

With the rapid development of technology, with the changes in requirements brought about by the increase in the complexity of software logic in various industries, traditional testing has been unable to meet a series of corresponding testing tasks. It is necessary to introduce an automated, sustainable integrated construction DevOps platform to solve such problems. This article will mainly introduce the continuous integration solution of SkyEye and Jenkins.

What is DevOps? DevOps is a culture and methodology of software development and operation and maintenance, which aims to strengthen the cooperation and coordination between developers (Development) and operation and maintenance teams (Operations) to achieve more efficient, faster, more stable software delivery and The deployment process emphasizes the seamless connection of software development, testing, deployment and operation and maintenance through automation and continuous feedback, as well as continuous improvement and optimization of the entire delivery process.

Building a continuous integration environment must meet the following three conditions:

(1) An automatic construction process, including automatic compilation, distribution, deployment and testing, etc.;

(2) A code repository, which requires version control software to ensure the maintainability of the code, as well as a material library for the construction process;

(3) A continuous integration server.

Continuous integration requires the combination of multiple tools to complete the entire workflow. The functions and related technologies of the toolchain are shown in the table below:

▲ Correspondence between business process and tool chain

01. Introduction to SkyEye

SkyEye, the Chinese full name of Tianmu all-digital real-time simulation software, is a domestically-controlled and controllable hardware behavior-level simulation platform based on visual modeling. It can provide a virtualized operating environment for embedded software. Developers and testers can use this virtual operating environment Perform software development, software testing, and software verification activities.

The flow chart of continuous integration based on SkyEye is shown in the figure below:

▲ Demonstration diagram of continuous integration process based on SkyEye full digital simulation software

The tool chains involved in the continuous integration process based on SkyEye are:

▲ Embedded software testing tool chain implementation technology

02. Introduction to Jenkins

Jenkins is an open source automation server tool for building, testing, and deploying software projects. It is also a tool for continuous integration (CI) and continuous delivery (CD), which can help development teams automate various tasks in the software development process .

The main features and functions of Jenkins are:

Automated builds: Allows development teams to trigger automated build processes when code is committed to a version control repository such as Git. Whenever new code is submitted, Jenkins will automatically pull the latest code and build the project to ensure the compilability of the project.

Continuous integration: Supports continuous integration by integrating developers' code into a shared code base and building and testing each code commit. It can be integrated with various version control systems (such as Git, Subversion, etc.) to monitor The code changes and automatically triggers the build process.

Plug-in ecosystem: It has a huge plug-in ecosystem that can extend its functions and integrate other development and deployment tools; plug-ins can be used for building tools, testing frameworks, static code analysis, and deploying to cloud platforms.

Extensibility: It can be customized according to project needs, allowing users to create custom build processes, add custom scripts and commands, and integrate with other tools and services.

Visual interface: Provides an easy-to-use web interface, users can manage and monitor the build process, view build history, set build triggers, monitor build output, etc.

Distributed build: Allows build tasks to be distributed to multiple agent nodes for execution, helping to speed up the build process and improve overall performance.

Reports and notifications: Detailed build reports can be generated, including test results, code coverage, and static code analysis results, and build status and notifications can be sent to team members via email, instant message, and other channels.

The flexibility and customizability of Jenkins make it an important tool in continuous integration and continuous delivery processes. It automates complex build tasks, provides timely feedback and reporting, and facilitates teamwork and collaborative development. Whether it's a small project or a large enterprise application, Jenkins can help development teams improve efficiency, reduce risk, and deliver high-quality software.

03. Continuous integration between SkyEye and Jenkins

The integration of SkyEye and Jenkins has many advantages:

Get rid of specific hardware limitations: multiple models of embedded software testing can be performed on a PC; 

Scripted configuration: reduce the complicated configuration process and make the operation process easier;

Automated testing: The Jenkins continuous integration tool can automate the construction process, and at the same time, detect defects as early as possible to avoid directional errors by increasing the frequency of integration;

Reduce risk: multiple integration simulation tests can be performed in one day, which is beneficial to check defects and understand the status of software;

Not limited by time and place: Deployable software can be generated at any time and any place. Using continuous integration, small changes can be made to the source code at any time, and these changes can be integrated with other codes for timely testing.

The continuous integration process between SkyEye and Jenkins is as follows:

1. Source code management/SkyEye project/test data management:

Build the corresponding project through SkyEye, upload the built project to the project branch of the Gitea warehouse, and upload the source code to the code branch of the Gitea warehouse.

2. Code modification:

Through the git add/git commit/git push operation, the git push command triggers the webhock to notify Jenkins to perform an automatic build task.

3. Jenkins receives the instruction to build the task:

Pull the source code and project in the Gitea warehouse, compile the source code through CCS and generate a binary file.

4. Binary deployment:

Copy the binary file into the SkyEye project.

5. Automated testing through SkyEye:

Automated testing is performed through Python scripts or command line instructions, and test results are generated.

6. Jenkins automatically sends emails:

Notify the task construction status and test results by email.

Among them, the Jenkins configuration process is shown in the following figure:

(1) Configure the slave node to ensure that the server is connected to the test server;

▲ slave node configuration

(2) Create a new continuous integration task;

▲ New task configuration

(3) Clone source codes, test scripts, and simulation projects;

▲ Clone source code configuration

▲ Clone test data configuration

▲Clone test project configuration

(4) Configure compilation scripts and automated test scripts;

▲ Compilation scripts, automated test script configuration

(5) Email configuration;

▲ Mail template configuration

(6) Implementation process;

▲ Test case execution in Jenkins

(7) Notification of test results.

Use Python scripts to organize the test results, and notify the test results through the email plug-in that comes with Jenkins.

▲Mail reception test results

Guess you like

Origin blog.csdn.net/digi2020/article/details/131981124
Recommended