Jenkins Pipeline Sample Code
The sample code is as follows:
stage('byte-alignment-check') {
steps {
echo '====== Byte alignment check ======'
sh '''
if [ ! -d "./report_dir" ]; then mkdir -p ./report_dir; fi
/usr/bin/rm -rf ./report_dir/*.html
devkit advisor addr-align -i /opt/DevKit/wtdbg2-2.5 -c make -r html -o ./report_dir
mv ./report_dir/addr-align*.html ./report_dir/byte-alignment-check.html
'''
}
post {
always {
publishHTML(target: [allowMissing: false,
alwaysLinkToLastBuild: false,
keepAll : true,
reportDir : './report_dir',
reportFiles : 'byte-alignment-check.html',
reportName : 'byte-alignment-check Report']
)
}
}
}
- You are advised to perform the byte alignment check before the build process.
- /opt/DevKit/wtdbg2-2.5 indicates the path to the source code folder to be scanned. Replace it with the actual path.
Parent topic: Byte Alignment Check