|
| 1 | +# Continuous Integration |
| 2 | + |
| 3 | +## Retrigger |
| 4 | + |
| 5 | +Put a comment with "bot:retest" |
| 6 | + |
| 7 | +## More details |
| 8 | + |
| 9 | +After create Pull Request CI runs automatically within 5 mins. |
| 10 | +The CI results can be found under link Details on PR page in github. |
| 11 | + |
| 12 | +There are two main sections: Build Artifacts and Blue Ocean. |
| 13 | + |
| 14 | +* Build Artifacts has log files with output each stage. |
| 15 | +* On Blue Ocean page you can see a graph with CI steps. Each stage can be success(green) or fail(red). |
| 16 | + |
| 17 | +## CI/CD |
| 18 | + |
| 19 | +This CD/CD pipeline based on ci-demo. All information can be found in main ci-demo repository. |
| 20 | +This is Jenkins CI/CD based project. You can create custom workflows to automate your project software life cycle process. |
| 21 | + |
| 22 | +You need to configure workflows using YAML syntax, and save them as workflow files in your repository. |
| 23 | +Once you've successfully created a YAML workflow file and triggered the workflow - Jenkins parse flow and execute it. |
| 24 | + |
| 25 | +[Read more](https://github.com/Mellanox/ci-demo/blob/master/README.md) |
| 26 | + |
| 27 | +## Update Jenkins |
| 28 | + |
| 29 | +If proj_jjb.yaml was changed pipline configuration should be updated |
| 30 | + |
| 31 | +``` |
| 32 | + cd .ci |
| 33 | + make jjb |
| 34 | +``` |
| 35 | + |
| 36 | +## Job Matrix yaml |
| 37 | + |
| 38 | +The main CI steps are described in `job_matrix.yaml` file. |
| 39 | +Full list of supported features and syntax is given below. |
| 40 | +For more information please refer to [official ci-demo repository](https://github.com/Mellanox/ci-demo/) |
| 41 | + |
| 42 | +## How to run Docker image on local machine |
| 43 | + 1. Make sure you have docker engine installed: `docker --version` |
| 44 | + 2. If there is no docker, please install it this way ): |
| 45 | + ```sh |
| 46 | + apt update && apt install -y apt-transport-https ca-certificates curl software-properties-common |
| 47 | + curl -sSL https://get.docker.com/ | sh |
| 48 | + ``` |
| 49 | + 3. Pull and run container by the following command (use correct image for your case): |
| 50 | + ```sh |
| 51 | + # Find top level dir of the git project: |
| 52 | + WORKSPACE=$(git rev-parse --show-toplevel) |
| 53 | +
|
| 54 | + # run ubuntu2004 image on x86_64: |
| 55 | + docker run -it -d --rm --privileged -e WORKSPACE=$WORKSPACE -v $WORKSPACE:$WORKSPACE -v /var/lib/hugetlbfs:/var/lib/hugetlbfs --ulimit memlock=819200000:819200000 -v /auto/mtrswgwork:/auto/mtrswgwork -v /hpc/local/commercial:/hpc/local/commercial -v /auto/sw_tools/Commercial:/auto/sw_tools/Commercial -v /hpc/local/etc/modulefiles:/hpc/local/etc/modulefiles harbor.mellanox.com/swx-infra/x86_64/ubuntu20.04/builder:mofed-5.2-2.2.0.0 bash |
| 56 | +
|
| 57 | + # run toolbox image on x86_64: |
| 58 | + docker run -it -d --rm --privileged -e WORKSPACE=$WORKSPACE -v $WORKSPACE:$WORKSPACE -v /var/lib/hugetlbfs:/var/lib/hugetlbfs --ulimit memlock=819200000:819200000 -v /auto/mtrswgwork:/auto/mtrswgwork -v /hpc/local/commercial:/hpc/local/commercial -v /auto/sw_tools/Commercial:/auto/sw_tools/Commercial -v /hpc/local/etc/modulefiles:/hpc/local/etc/modulefiles harbor.mellanox.com/toolbox/ngci-centos:7.9.2009.2 bash |
| 59 | + ``` |
| 60 | + 4. Login to running docker image: |
| 61 | + ```sh |
| 62 | + docker exec -it ${IMAGE_NAME} bash |
| 63 | + ``` |
| 64 | +Navigate to `$WORKSPACE` directory inside the image |
| 65 | + |
0 commit comments