From bc898e664f145a2bbe39151a1969d4e0edfe3951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E5=BC=80=E5=AE=89?= Date: Tue, 19 Mar 2024 15:51:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4jenkins=E9=85=8D=E7=BD=AEdevk?= =?UTF-8?q?it=E5=91=BD=E4=BB=A4=E8=A1=8C=E6=8C=87=E5=AF=BC=E8=B5=84?= =?UTF-8?q?=E6=96=99=E4=B8=AD=E7=9A=84=E7=B3=BB=E7=BB=9F=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...62\345\222\214\351\227\250\347\246\201.md" | 70 ------------------- 1 file changed, 70 deletions(-) diff --git "a/document/Jenkins\345\256\211\350\243\205\351\203\250\347\275\262/Jenkins\346\265\201\346\260\264\347\272\277\351\205\215\347\275\256\350\277\201\347\247\273\343\200\201\344\272\262\345\222\214\351\227\250\347\246\201.md" "b/document/Jenkins\345\256\211\350\243\205\351\203\250\347\275\262/Jenkins\346\265\201\346\260\264\347\272\277\351\205\215\347\275\256\350\277\201\347\247\273\343\200\201\344\272\262\345\222\214\351\227\250\347\246\201.md" index 0e8e139..465439a 100644 --- "a/document/Jenkins\345\256\211\350\243\205\351\203\250\347\275\262/Jenkins\346\265\201\346\260\264\347\272\277\351\205\215\347\275\256\350\277\201\347\247\273\343\200\201\344\272\262\345\222\214\351\227\250\347\246\201.md" +++ "b/document/Jenkins\345\256\211\350\243\205\351\203\250\347\275\262/Jenkins\346\265\201\346\260\264\347\272\277\351\205\215\347\275\256\350\277\201\347\247\273\343\200\201\344\272\262\345\222\214\351\227\250\347\246\201.md" @@ -114,76 +114,6 @@ stage('source-code-migration') { | -r/--report-type | all,json,html,csv | 可选参数。 扫描报告的格式。默认为all,选择all的时候json、csv和html报告都会生成。 | | --ignore | /opt/ignore.json | 可选参数。屏蔽扫描规则信息。 | -- - ##### 系统迁移: - -```groovy -# devkit porting sys-mig -# 示例 stmt模式: devkit porting sys-mig -c stmt -cf porting/resources/sysmig_default.conf -o ./ -# 示例 sbom模式: devkit porting sys-mig -c sbom -cf porting/resources/sysmig default.conf -o ./ - -# stmt模式 -stage('system-migration') { - steps { - echo '====== 系统迁移 ======' - sh ''' - /usr/bin/rm -rf ./stmt*.csv - devkit porting sys-mig -c stmt -cf porting/resources/sysmig_default.conf -o ./ - mv ./stmt*.csv ./SystemMigration.csv - ''' - } - post { - always { - publishHTML(target: [allowMissing: false, - alwaysLinkToLastBuild: false, - keepAll : true, - reportDir : '.', - reportFiles : 'SystemMigration.csv', - reportName : 'SystemMigration Report'] - ) - } - } - } - -# sbom模式 -stage('system-migration') { - steps { - echo '====== 系统迁移 ======' - sh ''' - /usr/bin/rm -rf ./sbom*.html - devkit porting sys-mig -c sbom -cf porting/resources/sysmig_default.conf -o ./ - mv ./sbom*.html ./SystemMigration.html - ''' - } - post { - always { - publishHTML(target: [allowMissing: false, - alwaysLinkToLastBuild: false, - keepAll : true, - reportDir : '.', - reportFiles : 'SystemMigration.html', - reportName : 'SystemMigration Report'] - ) - } - } - } -``` - -具体参数如下(均为可选参数) - -| 参数 | 参数选项 | 说明 | -| ------------------- | -------------------- | ------------------------------------------------------------ | -| -c/--command | stmt/sbom | 收集信息的模式。stmt:收集台账信息。sbom:收集sbom信息。 | -| -cf/--config | configure_file_path | 输入参数配置文件路径。 | -| -d/--directory | scan_path | 输入扫描文件目录,支持输入多个目录,多个目录间以空格分隔。 | -| -t/--template | stmt_template_path | stmt模式参数,输入台账扫描结果模板路径,默认按照程序内置模板生成扫描结果。 | -| -o/--output | report_dir | 报告输出目录,默认为二进制所在report目录。 | -| -f/--format | html/json | sbom模式参数,输入生成报告格式,支持选择html、json格式,可以选择多个报告格式,默认为HTML格式,多个报告格式以空格间隔。 | -| -e/--exclude-fields | version/checkOutPath | sbom模式参数,表示需要隐藏的参数信息,可选参数范围:version和checkOutPath,支持同时选择。version表示成分版本号checkOutPath表示成分检出路径,多个参数信息以空格间隔。 | -| -v/--version | - | 展示程序版本信息,无输入参数。 | -| -h/--help | - | 帮助查询,无输入参数。 | -| -l/--log-level | 0,1,2,3 | 日志等级,可选参数:0(DEBUG)、1(INFO)、2(WARNING)、3(ERROR),默认为1(INFO)。 | - - ##### 64位运行模式检查: ```groovy -- Gitee