Jenkins Pipeline Sample Code
The sample code is as follows:
stage('software-migration-assessment') {
steps {
echo '====== Software porting assessment ======'
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']
)
}
}
}
- impala-2.9.0+cdh5.12.1+0-1.cdh5.12.1.p0.3.el7.x86_64.rpm indicates the path to the software package to be scanned. Replace it with the actual path.
- You are advised to assess software porting after the build process.
- For details about the software porting assessment report, see Viewing Analysis Results.
Parent topic: Software Porting Assessment