鲲鹏社区首页
中文
注册
我要评分
文档获取效率
文档正确性
内容完整性
文档易理解
在线提单
论坛求助

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 -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”指待扫描的源码文件夹路径,请根据实际情况进行替换。