无盘系统 CI/CD:Jenkins - ZJUSCT OpenDocs
本仓库是 ZJUSCT 无盘系统 CI/CD 平台(Jenkins)的配置文件。
This repository contains the configuration files for the ZJUSCT diskless system CI/CD platform (Jenkins).
./chroot-installation.sh <DISTRO> [RELEASE]
DISTRO
must match the name in /etc/os-release
. Refer to which-distro/os-release: A collection of /etc/os-release from various distros.
Distribution | Supported Releases |
---|---|
debian | stable , testing |
ubuntu | oracular (latest), noble (LTS) |
arch | latest |
openEuler | 24.09 (latest), 24.03 (LTS) |
Our goal is to implement a unified system build process, so that the built systems are as consistent as possible in terms of functionality and software environment. That is, the build process is fixed, and each step in the process is customized for each distribution, rather than designing a separate process and configuration for each distribution.
make_rootfs
execute_module
: modularized build steps, including software installation, configuration, etc.
These steps usually require chroot environment. Depending on the environment where the script is executed, two methods are supported:
chroot
: If running inside docker, use simplechroot
because docker has provided some isolation.systemd
: If running on the host, usesystemd-nspawn
to create a more isolated environment.
We now determine the environment based on PID 1. If PID 1 is:
tini
: We are in docker. Jenkins docker now use this, but can't tell if it's a docker containersystemd
: We are on the host running systemd.
This repository mainly contains Shell scripts, so please follow the following coding style:
- Use the EditorConfig plugin, or view the
.editorconfig
file yourself. Shell Script uses Tab indentation. - Use the ShellCheck plugin to check if the Shell script is compliant.
The following files are ignored because they contain sensitive information and need to be created manually when used. An .template
file is provided as a template.
File | Description |
---|---|
jenkins/jenkins_jobs.ini |
Jenkins Job Builder configuration file, including the address, username, and password of the Jenkins server. |
jenkins/.env |
Docker Compose environment variable file, including the Token required for Jenkins to run. |