... | ... | @@ -17,6 +17,12 @@ |
|
|
1. [Introduction](#1-introduction)
|
|
|
2. [Source Control of the Jenkins pipeline script](#2-source-control-of-the-jenkins-pipeline-script)
|
|
|
3. [Declarative Pipeline Script](#3-declarative-pipeline-script)
|
|
|
1. [Verify Parameters stage](#31-verify-parameters-stage)
|
|
|
2. [Build and Test stage](#32-build-and-test-stage)
|
|
|
3. [Terminate stages](#33-terminate-stages)
|
|
|
4. [Log Collection stages](#34-log-collection-stages)
|
|
|
5. [Final Post block](#35-final-post-block)
|
|
|
6. [Artifacts list](#36-artifacts-list)
|
|
|
4. [Python main script](#4-python-main-script)
|
|
|
5. [XML test case file](#5-xml-test-case-file)
|
|
|
|
... | ... | @@ -64,7 +70,38 @@ This file will be loaded by the Jenkins master job and executed. |
|
|
|
|
|
# 3. 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
|
|
|
- It is based on the parameter **pythonExecutor**
|
|
|
- Specify some generic options such as timestamping, using AnsiColor
|
|
|
|
|
|
The block where parameters are shown is commented out to provide a template for GUI configuration.
|
|
|
|
|
|
**THIS BLOCK SHALL NOT BE COMMENTED OUT.**
|
|
|
|
|
|
Stages are the following:
|
|
|
|
|
|
<img src="../images/enb-slave-pipeline.png" alt="" border=3>
|
|
|
|
|
|
## 3.1. Verify Parameters stage ##
|
|
|
|
|
|
## 3.2. Build and Test stage ##
|
|
|
|
|
|
## 3.3. Terminate stages ##
|
|
|
|
|
|
## 3.4. Log Collection stages ##
|
|
|
|
|
|
## 3.5. Final Post block ##
|
|
|
|
|
|
## 3.6. Artifacts list ##
|
|
|
|
|
|
<img src="../images/enb-slave-artifacts.png" alt="" border=3>
|
|
|
|
|
|
# 4. Python main script #
|
|
|
|
|
|
|
|
|
# 5. XML test case file #
|
|
|
|