---
title: GitLab流水线示例代码
description: "流水线示例代码如下："
url: https://www.hikunpeng.com/document/detail/zh/nativedevp/userguide/pipeline/NativeDevelopment_0097.html
sourcePath: /source/zh/nativedevp/userguide/pipeline/NativeDevelopment_0097.html
indexId: cd75df6a9221acfab2dbfe258fd51cb865f8f52c7ae233e297e453b7f974176668
---
# GitLab流水线示例代码

流水线示例代码如下：

```
stages:
- build
- affinity-analysis
affinity-check:
stage: affinity-analysis
tags:
- kunpeng_scanner  # 对应gitlab-runner注册时的标签，可选择多个
script:
- echo '====== 构建亲和 ======'
# 示例 devkit advisor affi-check -i /opt/testcase/affinity/build/wtdbg2-2.5 -c make -r html
- devkit advisor affi-check -i
待扫描的源码路径
-c
源码的构建命令
-r html
- mv ./affi-check*.html ./affinity-check.html
artifacts:
paths:
- affinity-check.html
name: affi-check
```

- 使用构建亲和功能建议放在构建流程节点前。
- “/opt/testcase/affinity/build/wtdbg2-2.5”指待分析的源码文件夹路径，请根据实际情况进行替换。
