---
title: Jenkins流水线示例代码
description: 示例代码如下：
url: "https://www.hikunpeng.com/document/detail/zh/nativedevp/userguide/pipeline/NativeDevelopment_0066.html"
---

# Jenkins流水线示例代码

示例代码如下：

```
stage('64-bit-running-mode-check') {
steps {
echo '====== 64位运行模式 ======'
sh '''
if [ ! -d "./report_dir" ]; then mkdir -p ./report_dir; fi
/usr/bin/rm -rf ./report_dir/*.html
devkit advisor run-mode -i
/opt/DevKit/testcase/affinity/precheck/test005
-c make -r html -o ./report_dir
mv ./report_dir/mode_check*.html ./report_dir/64-bit-running-mode-check.html
'''
}
post {
always {
publishHTML(target: [allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll              : true,
reportDir            : './report_dir',
reportFiles          : '64-bit-running-mode-check.html',
reportName           : '64-bit-running-mode-check Report']
)
}
}
}
```

- 使用64位运行模式检查建议放在构建流程节点前。
- “/opt/DevKit/testcase/affinity/precheck/test005”指待扫描的源码文件夹路径，请根据实际情况进行替换。
