... | ... | @@ -31,6 +31,8 @@ The following picture is an overview of the currently chosen architecture. |
|
|
|
|
|
<img src="../images/OAI-eNB-CI-architecture.png" alt="" border=3>
|
|
|
|
|
|
**Note that in the previous picture, the term `node` is used in the Jenkins terminology as a remote server where the processing is "farmed out". It is not related to the 4G eNB / 5G gNB terminology.**
|
|
|
|
|
|
# 2. Server Details #
|
|
|
|
|
|
## 2.1. Jenkins server ##
|
... | ... | @@ -75,8 +77,12 @@ The first method is fundamental for the master CI job since it requires a remote |
|
|
|
|
|
* A lot of processing power
|
|
|
* Pre-installed uvt-kvm tool with pre-downloaded VM images
|
|
|
* See [this page](http://manpages.ubuntu.com/manpages/trusty/man1/uvt-kvm.1.html) for details
|
|
|
* For optimization of the network Internet usage, we have installed the `apt-cacher` package.
|
|
|
* It sets up a repository cache on this remote node so that once a package is downloaded from an official repository, all created Virtual Machines will download it from the remote node.
|
|
|
* See more details on [this help page](https://help.ubuntu.com/community/Apt-Cacher-Server)
|
|
|
|
|
|
The second method is fundamental for the slave jobs since scripts are template and most of the job information are parameters of the Jenkins job.
|
|
|
The second method is fundamental for the slave jobs since scripts are template and most of the job information are parameters of the Jenkins job. It allows us to have a modular approach.
|
|
|
|
|
|
## 2.3. EPC server dedicated for eNB CI ##
|
|
|
|
... | ... | @@ -129,9 +135,35 @@ The eNB-CI master job may be configured without any parameter. In that case no s |
|
|
|
|
|
At time of writing, the eNB-CI master job hosted at Eurecom is using the following parameters:
|
|
|
|
|
|
- *pipelineUsesSlack* : the master job will send notifications to OAI Slack workspace
|
|
|
- *RedHatRemoteServer*
|
|
|
- *RedHatRemoteCredentials*
|
|
|
- *RedHatWorkingPath* : temporaly CentOS build is done on a real server and not a virtual machine. These parameters will be removed once VM CentOS build is available.
|
|
|
- **pipelineUsesSlack** : the master job will send notifications to OAI Slack workspace
|
|
|
- **RedHatRemoteServer**
|
|
|
- **RedHatRemoteCredentials**
|
|
|
- **RedHatWorkingPath** : temporaly CentOS build is done on a real server and not a virtual machine. These parameters will be removed once VM CentOS build is available.
|
|
|
|
|
|
**IMPORTANT: the Jenkins Declarative Pipeline script file is retrieved from Source Control Management (SCM) under GIT w/ the `develop` branch.**
|
|
|
|
|
|
**It means that a temporary clone of the openairinterface5g repository is made on the latest version of `develop` branch to retrieve one file: `ci-scripts/Jenkinsfile-gitlab`. This file will be loaded by the Jenkins master job and executed. During a Merge-Request, if modifications to this particular file are made, they WON'T taken into account.**
|
|
|
|
|
|
### 3.1.1 Declarative Pipeline Script ###
|
|
|
|
|
|
The script is written in `Groovy`, a Java-derivative language, using the Declarative Pipeline syntax. It does not prevent us to use some Scripted Pipeline syntax elements when needed.
|
|
|
|
|
|
The first few blocks are written to:
|
|
|
|
|
|
- Specify the node to work on
|
|
|
- Specify some generic options such as timestamping, using AnsiColor, preparing the connection with the GitLab server.
|
|
|
- Using gitlabBuilds keyword with a set of stages sends a message to the GitLab server. The latter performs the following steps:
|
|
|
- Create a GitLab pipeline
|
|
|
- Associate this pipeline with the corresponding commit or Merge-Request that triggered the Jenkins job
|
|
|
- Associate this GitLab pipeline with the Jenkins master job
|
|
|
- Create an `external job` for each stage specified and put them in a `pending` stage.
|
|
|
|
|
|
### 3.1.2 Verify Parameter stage ###
|
|
|
|
|
|
In this stage we are verifying the parameters are consistent.
|
|
|
|
|
|
At the time of writing:
|
|
|
|
|
|
- Redhat - CentOS parameter check: if 3 needed parameters are present in the Jenkins Master job configuration, CentOS build will be performed on a remote CentOS server. If not, no CentOS build will be scheduled.
|
|
|
|
|
|
## 3.2. eNB Slave Jobs ## |