---
title: GitLab流水线示例代码
description: "示例代码如下："
url: https://www.hikunpeng.com/document/detail/zh/nativedevp/userguide/pipeline/NativeDevelopment_0106.html
sourcePath: /source/zh/nativedevp/userguide/pipeline/NativeDevelopment_0106.html
indexId: f3da9e7f0f9e2d3414605cc2201df9fa9d471003d0807b2159b088a06fe30afc68
---
# GitLab流水线示例代码

示例代码如下：

```
stages:
- build
- migrating-applications
software-migration-assessment:
stage: migrating-applications
tags:
- kunpeng_scanner # 对应gitlab-runner注册时的标签，可选择多个
script:
- echo '====== 软件迁移评估 ======'
# 示例 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 || [ $? -eq 1 ] && echo 'Warning:扫描报告包含建议项'
- devkit porting pkg-mig -i
待扫描软件包路径
-r html || [ $? -eq 1 ] && echo 'Warning:扫描报告包含建议项'
- mv ./pkg-mig*.html ./SoftwareMigrationAssessment.html
artifacts:
paths:
- SoftwareMigrationAssessment.html
name: pkg-mig
```

- “impala-2.9.0+cdh5.12.1+0-1.cdh5.12.1.p0.3.el7.x86_64.rpm”指待扫描的软件包路径，请根据实际情况进行替换。
- 使用软件迁移评估建议放到构建流程节点后。
- 软件迁移评估报告结果详细内容请参见  查看分析结果(https://www.hikunpeng.com/document/detail/zh/kunpengdevkithistory/devkit_24_t50/Plugins_UserGuide/DevKit_Porting_0008.html)
。
