软件迁移评估
stage('software-migration-assessment') { steps { echo '====== 软件迁移评估 ======' sh ''' if [ ! -d "./report_dir" ]; then mkdir -p ./report_dir; fi /usr/bin/rm -rf ./report_dir/*.html devkit porting pkg-mig -i impala-2.9.0+cdh5.12.1+0-1.cdh5.12.1.p0.3.el7.x86_64.rpm -r html -o ./report_dir mv ./report_dir/pkg-mig*.html ./report_dir/SoftwareMigrationAssessment.html ''' } post { always { publishHTML(target: [allowMissing: false, alwaysLinkToLastBuild: false, keepAll : true, reportDir : './report_dir', reportFiles : 'SoftwareMigrationAssessment.html', reportName : 'SoftwareMigrationAssessment Report'] ) } } }
具体参数如表1所示。
参数 |
参数选项 |
参数说明 |
---|---|---|
-i/--input |
package_path |
必选参数。待扫描的软件包路径,若存在多个扫描路径需使用英文逗号分割。支持的软件包格式有RPM、DEB、JAR/WAR包、TAR、ZIP、GZIP压缩文件等。 例如:/home/test1.jar, /home/test2.jar。 |
-t/--target-os |
target-os |
可选参数。待扫描的目标操作系统。 |
-o/--output |
output_path |
可选参数。报告存放路径,报告默认存放在当前执行路径下,名称默认为“特性名称_时间戳”。 |
--set-timeout |
time |
可选参数。任务超时时间,默认无超时时间,任务将持续执行直到结束。 |
-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三种报告。 |
父主题: Jenkins流水线