!36 【添加】Jenkinsfile CI 脚本
Merge pull request !36 from 国际哥/jenkins_build
This commit is contained in:
commit
fed16349f9
|
@ -0,0 +1,9 @@
|
|||
### How is this problem caused?
|
||||
|
||||
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
|
||||
|
||||
### Error message
|
|
@ -0,0 +1,9 @@
|
|||
### 该问题是怎么引起的?
|
||||
|
||||
|
||||
|
||||
### 重现步骤
|
||||
|
||||
|
||||
|
||||
### 报错信息
|
|
@ -0,0 +1,9 @@
|
|||
### 該問題是怎麽引起的?
|
||||
|
||||
|
||||
|
||||
### 重現步驟
|
||||
|
||||
|
||||
|
||||
### 報錯信息
|
|
@ -0,0 +1,29 @@
|
|||
## PR description
|
||||
|
||||
[
|
||||
The content in this square bracket must be filled in and replaced, otherwise PR can not be merged. The contents outside square brackets need not be changed, but please read them carefully.
|
||||
|
||||
Please fill in your PR description here, which can include one of the following items: why to submit this PR; what is the problem solved and what is your solution;
|
||||
|
||||
And confirm in which case or board have been tested.
|
||||
]
|
||||
|
||||
The following content must not be changed in submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use web browser to visit PR, and check items one by one, and ticked them if no problem.
|
||||
|
||||
### Intent for your PR
|
||||
|
||||
Choose one (Mandatory):
|
||||
|
||||
- [ ] This PR is for a code-review and is intended to get feedback
|
||||
- [ ] This PR is mature, and ready to be integrated into the repo
|
||||
|
||||
### Code Quality:
|
||||
|
||||
As part of this pull request, I've considered the following:
|
||||
|
||||
- [ ] Already check the difference between PR and old code
|
||||
- [ ] Style guide is adhered to, including spacing, naming and other style
|
||||
- [ ] All redundant code is removed and cleaned up
|
||||
- [ ] BSP All modifications are justified and not affect other components or BSP
|
||||
- [ ] I've commented appropriately where code is tricky
|
||||
- [ ] Code in this PR is of high quality
|
|
@ -0,0 +1,29 @@
|
|||
## 拉取/合并请求描述:
|
||||
|
||||
[
|
||||
这段方括号里的内容是您**必须填写并替换掉**的,否则PR不可能被合并。**方括号外面的内容不需要修改,但请仔细阅读。**
|
||||
|
||||
请在这里填写您的PR描述,可以包括以下之一的内容:为什么提交这份PR;解决的问题是什么,你的解决方案是什么;
|
||||
|
||||
并确认并列出已经在什么情况或板卡上进行了测试。
|
||||
]
|
||||
|
||||
以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
|
||||
|
||||
### 当前拉取/合并请求的状态:
|
||||
|
||||
必须选择一项:
|
||||
|
||||
- [ ] 本拉取/合并请求是一个草稿版本
|
||||
- [ ] 本拉取/合并请求是一个成熟版本
|
||||
|
||||
### 代码质量:
|
||||
|
||||
我在这个拉取/合并请求中已经考虑了:
|
||||
|
||||
- [ ] 已经仔细查看过代码改动的对比
|
||||
- [ ] 代码风格正确,包括缩进空格,命名及其他风格
|
||||
- [ ] 没有垃圾代码,代码尽量精简,不包含`#if 0`代码,不包含已经被注释了的代码
|
||||
- [ ] 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或
|
||||
- [ ] 对难懂代码均提供对应的注释
|
||||
- [ ] 本拉取/合并请求代码是高质量的
|
|
@ -0,0 +1,29 @@
|
|||
## 拉取/合並請求描述:
|
||||
|
||||
[
|
||||
這段方括號裏的內容是您**必須填寫並替換掉**的,否則PR不可能被合並。**方括號外面的內容不需要修改,但請仔細閱讀。**
|
||||
|
||||
請在這裏填寫您的PR描述,可以包括以下之壹的內容:為什麽提交這份PR;解決的問題是什麽,妳的解決方案是什麽;
|
||||
|
||||
並確認並列出已經在什麽情況或板卡上進行了測試。
|
||||
]
|
||||
|
||||
以下的內容不應該在提交PR時的message修改,修改下述message,PR會被直接關閉。請在提交PR後,瀏覽器查看PR並對以下檢查項逐項check,沒問題後逐條在頁面上打鉤。
|
||||
|
||||
### 當前拉取/合並請求的狀態:
|
||||
|
||||
必須選擇壹項:
|
||||
|
||||
- [ ] 本拉取/合並請求是壹個草稿版本
|
||||
- [ ] 本拉取/合並請求是壹個成熟版本
|
||||
|
||||
### 代碼質量:
|
||||
|
||||
我在這個拉取/合並請求中已經考慮了:
|
||||
|
||||
- [ ] 已經仔細查看過代碼改動的對比
|
||||
- [ ] 代碼風格正確,包括縮進空格,命名及其他風格
|
||||
- [ ] 沒有垃圾代碼,代碼盡量精簡,不包含`#if 0`代碼,不包含已經被註釋了的代碼
|
||||
- [ ] 所有變更均有原因及合理的,並且不會影響到其他軟件組件代碼或
|
||||
- [ ] 對難懂代碼均提供對應的註釋
|
||||
- [ ] 本拉取/合並請求代碼是高質量的
|
|
@ -0,0 +1,157 @@
|
|||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image 'ubuntu_ci:latest'
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('build') {
|
||||
steps {
|
||||
sh '''
|
||||
|
||||
uname -a
|
||||
cat /etc/issue
|
||||
apt-get update
|
||||
apt-get install -y -qq lib32ncurses5 lib32z1 > /dev/null
|
||||
|
||||
curl -s http://download.isrc.rt-thread.com/download/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 | sudo tar xjf - -C /opt
|
||||
/opt/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc --version
|
||||
'''
|
||||
|
||||
script {
|
||||
def bsp_array = [
|
||||
['CME_M7', 'sourcery-arm'],
|
||||
// ['apollo2', 'sourcery-arm'], /* CI compile not support */
|
||||
['asm9260t', 'sourcery-arm'],
|
||||
['at91sam9260', 'sourcery-arm'],
|
||||
['allwinner_tina', 'sourcery-arm'],
|
||||
['efm32', 'sourcery-arm'],
|
||||
// ['gd32e230k-start', 'sourcery-arm'], /* CI compile not support */
|
||||
['gd32303e-eval', 'sourcery-arm'],
|
||||
// ['gd32450z-eval', 'sourcery-arm'], /* CI link not support */
|
||||
['gkipc', 'sourcery-arm'],
|
||||
['imx6sx/cortex-a9', 'sourcery-arm'],
|
||||
// ['imxrt/imxrt1052-atk-commander', 'sourcery-arm'], /* CI compile not support */
|
||||
// ['imxrt/imxrt1052-fire-pro', 'sourcery-arm'], /* CI compile not support */
|
||||
// ['imxrt/imxrt1052-nxp-evk', 'sourcery-arm'], /* CI compile not support */
|
||||
['lm3s8962', 'sourcery-arm'],
|
||||
['lm3s9b9x', 'sourcery-arm'],
|
||||
['lm4f232', 'sourcery-arm'],
|
||||
['tm4c129x', 'sourcery-arm'],
|
||||
// ['lpc43xx/M4', 'sourcery-arm'], /* CI compile not support */
|
||||
['lpc176x', 'sourcery-arm'],
|
||||
['lpc178x', 'sourcery-arm'],
|
||||
['lpc408x', 'sourcery-arm'],
|
||||
['lpc1114', 'sourcery-arm'],
|
||||
['lpc2148', 'sourcery-arm'],
|
||||
['lpc2478', 'sourcery-arm'],
|
||||
['lpc5410x', 'sourcery-arm'],
|
||||
// ['lpc54114-lite', 'sourcery-arm'], /* CI link not support */
|
||||
['mb9bf500r', 'sourcery-arm'],
|
||||
['mb9bf506r', 'sourcery-arm'],
|
||||
['mb9bf618s', 'sourcery-arm'],
|
||||
['mb9bf568r', 'sourcery-arm'],
|
||||
['mini2440', 'sourcery-arm'],
|
||||
['nuvoton_nuc472', 'sourcery-arm'],
|
||||
['nuvoton_m05x', 'sourcery-arm'],
|
||||
['qemu-vexpress-a9', 'sourcery-arm'],
|
||||
['qemu-vexpress-gemini', 'sourcery-arm'],
|
||||
['sam7x', 'sourcery-arm'],
|
||||
// ['stm32/stm32f072-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f091-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-atk-nano', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-atk-warshipv3', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-dofly-lyc8', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-dofly-M3S', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-fire-arbitrary', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-hw100k-ibox', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-mini-system', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-onenet-nbiot', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f103-yf-ufun', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f107-uc-eval', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f401-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f405-smdz-breadfruit', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f407-atk-explorer', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f407-st-discovery', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f410-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f411-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f411-weact-MiniF4', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f413-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f427-robomaster-a', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f429-armfly-v6', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f429-atk-apollo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f429-fire-challenger', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f429-st-disco', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f446-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f469-st-disco', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32f746-st-disco', 'sourcery-arm'], /* CI compile -mcpu= not support */
|
||||
// ['stm32/stm32f767-atk-apollo', 'sourcery-arm'], /* CI compile -mcpu= not support */
|
||||
// ['stm32/stm32f767-fire-challenger', 'sourcery-arm'], /* CI compile -mcpu= not support */
|
||||
// ['stm32/stm32f767-st-nucleo', 'sourcery-arm'], /* CI compile -mcpu= not support */
|
||||
// ['stm32/stm32g071-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32g431-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32h743-atk-apollo', 'sourcery-arm'], /* CI compile -mcpu= not support */
|
||||
// ['stm32/stm32h743-st-nucleo', 'sourcery-arm'], /* CI compile -mcpu= not support */
|
||||
// ['stm32/stm32h747-st-discovery', 'sourcery-arm'], /* CI compile -mcpu= not support */
|
||||
// ['stm32/stm32l4r9-st-eval', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l010-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l053-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l412-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l432-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l433-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l475-atk-pandora', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l475-st-discovery', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l476-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l496-ali-developer', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
// ['stm32/stm32l496-st-nucleo', 'sourcery-arm'], /* CI compile C99 not support */
|
||||
['stm32f20x', 'sourcery-arm'],
|
||||
['swm320-lq100', 'sourcery-arm'],
|
||||
['beaglebone', 'sourcery-arm'],
|
||||
['zynq7000', 'sourcery-arm'],
|
||||
['frdm-k64f', 'sourcery-arm'],
|
||||
['fh8620', 'sourcery-arm'],
|
||||
['xplorer4330/M4', 'sourcery-arm'],
|
||||
// ['at32/at32f403a-start', 'sourcery-arm'],/* CI link not support */
|
||||
// ['at32/at32f407-start', 'sourcery-arm']/* CI compile C99 not support */
|
||||
]
|
||||
|
||||
for (int i in bsp_array) {
|
||||
|
||||
sh """
|
||||
|
||||
export RTT_BSP=${i.getAt(0)}
|
||||
export RTT_TOOL_CHAIN=${i.getAt(1)}
|
||||
export RTT_EXEC_PATH=/opt/gcc-arm-none-eabi-5_4-2016q3/bin/
|
||||
export RTT_CC='gcc'
|
||||
export RTT_ROOT=`pwd`
|
||||
|
||||
echo \$RTT_EXEC_PATH
|
||||
|
||||
scons -C bsp/\$RTT_BSP
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
addGiteeMRComment(comment: """:x: Jenkins CI 构建失败。\n\n \
|
||||
查看更多日志详细信息: \
|
||||
<a href="${env.RUN_DISPLAY_URL}">Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]</a> \
|
||||
<hr /> \
|
||||
:x: The Jenkins CI build failed.\n\n \
|
||||
Results available at: \
|
||||
<a href="${env.RUN_DISPLAY_URL}">Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]</a>""")
|
||||
}
|
||||
success {
|
||||
addGiteeMRComment(comment: """:white_check_mark: Jenkins CI 构建通过。\n\n \
|
||||
查看更多日志详细信息: \
|
||||
<a href="${env.RUN_DISPLAY_URL}">Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]</a> \
|
||||
<hr /> \
|
||||
:white_check_mark: The Jenkins CI build passed.\n\n \
|
||||
Results available at: \
|
||||
<a href="${env.RUN_DISPLAY_URL}">Jenkins[${env.JOB_NAME} # ${env.BUILD_NUMBER}]</a>""")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue