构建亲和
stage('affinity-check') {
steps {
echo '====== 构建亲和 ======'
sh '''
if [ ! -d "./report_dir" ]; then mkdir -p ./report_dir; fi
/usr/bin/rm -rf ./report_dir/*.html
devkit advisor constr-check -i /opt/testcase/affinity/build/wtdbg2-2.5 -c make -r html -o ./report_dir
mv ./report_dir/constr-check*.html ./report_dir/affinity-check.html
'''
}
post {
always {
publishHTML(target: [allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll : true,
reportDir : './report_dir',
reportFiles : 'affinity-check.html',
reportName : 'vaffinity-check Report']
)
}
}
}
具体参数如表1所示。
参数 |
参数选项 |
参数说明 |
---|---|---|
-i/--input |
package_path |
必选参数。对应的源码文件夹路径。 |
-c/--cmd |
cmd |
必选参数。源码的构建命令。 |
-o/--output |
output_path |
可选参数。报告存放路径。报告默认存放在当前执行路径下,名称默认为“特性名称_时间戳”。 |
-b/--build-tool |
make,cmake |
可选参数。构建工具,默认为make。 |
-l/--log-level |
0,1,2,3 |
可选参数。设置日志等级,0(DEBUG)、1(INFO)、2(WARNING)、3(ERROR),默认为1(INFO)。 |
-r/--report-type |
all,json,html,csv |
可选参数。扫描报告的格式。默认为all,即默认生成json、html、csv三种报告。 |
--set-timeout |
time |
可选参数。任务超时时间。默认无超时时间,任务将持续执行直到结束。 |
父主题: Jenkins流水线