Enterprise-level application construction has high requirements on construction speed, code quality, build performance, pipeline ease of use, and easy maintenance. Enterprise R&D teams usually need to integrate third-party system tools or plug-ins to continuously improve the efficiency, quality, and experience of the entire construction process. Each team has different requirements for plug-in capabilities based on different management and build scenarios.
Recently, CODING in continuous integration provides users with more than 10 kinds of commonly used, on the basis of official plug-in, introduced a user-defined plug-in ability, let the team members will be handy tool or command encapsulated into “custom plug-in”, to facilitate rapid configuration in the build process required plug-in ability, and support for Shared within the team, Facilitate quick reuse by other team members.
Free custom
Custom plug-ins are not limited to the technology stack and language framework. Any command-line executable program can be encapsulated as a plug-in. The development team can develop or use open source plug-ins to meet the team’s build needs and meet diverse demands. Upload can be used, without official review.
Graphical arrangement
Based on the graphical programming capability of CODING continuous integration, plug-ins can be directly selected in the configuration step of the construction process, which is easy to use.
Enterprise level plug-in management capability
Customized plug-ins can be shared within an enterprise or a team. The plug-ins uploaded by team members can be disclosed to other members of the enterprise, which facilitates tool sharing among development team members, improves the creativity of developers, and saves time and energy in building wheels repeatedly.
How to use custom plugins?
1. View the build plug-in
Click “Feature Settings” → “Continuous Integration” → “Build Plugins” on the left side of the home page. You can see official plugins, team plugins, and individual submitted but undisclosed plugins here. View the name, description, and version number in plug-in details.
2. Develop plug-ins
Plug-in development is not limited to the development language and environment, but only to the plug-in directory structure specification (below) and declaration file specification requirements. When writing your plugin code, save the logic to the my-plugin-project/ SRC directory or any subdirectory, and run the entry file to make sure it matches the declaration file.
Plugin directory structure:
-my-plugin-project // Your project directory -my-script.xx // Build plug-in execution script or entry file, support any language organization (the execution environment is required to have, Yml // Build plug-in declaration file, which defines your build plug-in name, version, parameters and other informationCopy the code
Please click on the declaration document specification and more detailed development guidelines.
3. Upload the plug-in
After the development is complete, package the plug-in code (ZIP package) and upload it through “Feature setting” → “Continuous Integration” → “Build plug-in”. We will save your project files, and at build time, the build node will download the project and execute it. After uploading, confirm to publish the plug-in. After publishing, you can set it to be visible to members of the public team.
4. Use plug-ins
You can use plug-in functionality either by graphically choreographing the interface or by compiling the command line. When a plug-in is private, only the author can add it, and when the author marks the plug-in “public,” the rest of the team can see and use it.
- Graphical layout
Click the target “Build Plan” → “Settings” → “Process Configuration” to select whether to enable the official plug-in or the team’s custom plug-in when adding steps within the phase.
- Compile command line mode
You can directly edit Jenkinsfile using the command line interface (CLI). The following is a reference statement:
UseCustomStepPlugin (key: 'exec_py_script', version: '1.0', params: [site_packages:'false',requirements:'false']) // Key indicates the ID of the plug-in, version indicates the version number (the latest version is used by default and is automatically upgraded with the plug-in upgrade), and params indicates the parameter required by the current plug-in.Copy the code
The “custom plug-in” provided in this project expands the construction capability boundary of CODING continuous integration, meets more personalized software construction requirements, provides maximum flexibility to the r&d team, and improves the efficiency and ease of use of construction process configuration. In the future, CODING continuous integration will gradually be compatible with Drone and GitHub Action plug-ins, and continue to build the ecological capability of CODING continuous integration plug-ins.