Jenkins: Drop redundant targets (#969)
This commit is contained in:
@@ -102,37 +102,6 @@ def buildMySensorsGw(config, sketches, String key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildArduinoNano(config, sketches, String key) {
|
|
||||||
def fqbn = '-fqbn arduino:avr:nano -prefs build.f_cpu=16000000 -prefs build.mcu=atmega328p'
|
|
||||||
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (Arduino Nano - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
|
|
||||||
try {
|
|
||||||
for (sketch = 0; sketch < sketches.size(); sketch++) {
|
|
||||||
if (sketches[sketch].path != config.library_root+'examples/GatewayESP8266/GatewayESP8266.ino' &&
|
|
||||||
sketches[sketch].path != config.library_root+'examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
|
|
||||||
sketches[sketch].path != config.library_root+'examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
|
|
||||||
sketches[sketch].path != config.library_root+'examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino') {
|
|
||||||
buildArduino(config, fqbn, sketches[sketch].path, key+'_ArduinoNano')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (ex) {
|
|
||||||
echo "Build failed with: "+ ex.toString()
|
|
||||||
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (Arduino Nano - '+key+')', 'Build error', '${BUILD_URL}')
|
|
||||||
throw ex
|
|
||||||
} finally {
|
|
||||||
parseWarnings(key+'_ArduinoNano')
|
|
||||||
}
|
|
||||||
if (currentBuild.currentResult == 'UNSTABLE') {
|
|
||||||
config.pr.setBuildStatus(config, 'ERROR', 'Toll gate (Arduino Nano - '+key+')', 'Warnings found', '${BUILD_URL}warnings2Result/new')
|
|
||||||
if (config.is_pull_request) {
|
|
||||||
error 'Termiated due to warnings found'
|
|
||||||
}
|
|
||||||
} else if (currentBuild.currentResult == 'FAILURE') {
|
|
||||||
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (Arduino Nano - '+key+')', 'Build error', '${BUILD_URL}')
|
|
||||||
} else {
|
|
||||||
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Arduino Nano - '+key+')', 'Pass', '')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def buildArduinoUno(config, sketches, String key) {
|
def buildArduinoUno(config, sketches, String key) {
|
||||||
def fqbn = '-fqbn arduino:avr:uno -prefs build.f_cpu=16000000 -prefs build.mcu=atmega328p'
|
def fqbn = '-fqbn arduino:avr:uno -prefs build.f_cpu=16000000 -prefs build.mcu=atmega328p'
|
||||||
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (Arduino Uno - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
|
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (Arduino Uno - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
|
||||||
@@ -164,37 +133,6 @@ def buildArduinoUno(config, sketches, String key) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildArduinoPro(config, sketches, String key) {
|
|
||||||
def fqbn = '-fqbn arduino:avr:pro -prefs build.f_cpu=8000000 -prefs build.mcu=atmega328p'
|
|
||||||
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (Arduino Pro/Mini - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
|
|
||||||
try {
|
|
||||||
for (sketch = 0; sketch < sketches.size(); sketch++) {
|
|
||||||
if (sketches[sketch].path != config.library_root+'examples/GatewayESP8266/GatewayESP8266.ino' &&
|
|
||||||
sketches[sketch].path != config.library_root+'examples/GatewayESP8266MQTTClient/GatewayESP8266MQTTClient.ino' &&
|
|
||||||
sketches[sketch].path != config.library_root+'examples/GatewayESP8266OTA/GatewayESP8266OTA.ino' &&
|
|
||||||
sketches[sketch].path != config.library_root+'examples/SensebenderGatewaySerial/SensebenderGatewaySerial.ino') {
|
|
||||||
buildArduino(config, fqbn, sketches[sketch].path, key+'_ArduinoPro')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (ex) {
|
|
||||||
echo "Build failed with: "+ ex.toString()
|
|
||||||
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (Arduino Pro/Mini - '+key+')', 'Build error', '${BUILD_URL}')
|
|
||||||
throw ex
|
|
||||||
} finally {
|
|
||||||
parseWarnings(key+'_ArduinoPro')
|
|
||||||
}
|
|
||||||
if (currentBuild.currentResult == 'UNSTABLE') {
|
|
||||||
config.pr.setBuildStatus(config, config, 'ERROR', 'Toll gate (Arduino Pro/Mini - '+key+')', 'Warnings found', '${BUILD_URL}warnings2Result/new')
|
|
||||||
if (config.is_pull_request) {
|
|
||||||
error 'Termiated due to warnings found'
|
|
||||||
}
|
|
||||||
} else if (currentBuild.currentResult == 'FAILURE') {
|
|
||||||
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (Arduino Pro/Mini - '+key+')', 'Build error', '${BUILD_URL}')
|
|
||||||
} else {
|
|
||||||
config.pr.setBuildStatus(config, 'SUCCESS', 'Toll gate (Arduino Pro/Mini - '+key+')', 'Pass', '')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def buildArduinoMega(config, sketches, String key) {
|
def buildArduinoMega(config, sketches, String key) {
|
||||||
def fqbn = '-fqbn arduino:avr:mega -prefs build.f_cpu=16000000 -prefs build.mcu=atmega2560'
|
def fqbn = '-fqbn arduino:avr:mega -prefs build.f_cpu=16000000 -prefs build.mcu=atmega2560'
|
||||||
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (Arduino Mega - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
|
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (Arduino Mega - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
|
||||||
|
|||||||
@@ -109,15 +109,9 @@ def call(Closure body) {
|
|||||||
stage('ESP8266 (tests)') {
|
stage('ESP8266 (tests)') {
|
||||||
arduino.buildEsp8266(config, config.tests, 'Tests')
|
arduino.buildEsp8266(config, config.tests, 'Tests')
|
||||||
}
|
}
|
||||||
stage('ArduinoNano (tests)') {
|
|
||||||
arduino.buildArduinoNano(config, config.tests, 'Tests')
|
|
||||||
}
|
|
||||||
stage('ArduinoUno (tests)') {
|
stage('ArduinoUno (tests)') {
|
||||||
arduino.buildArduinoUno(config, config.tests, 'Tests')
|
arduino.buildArduinoUno(config, config.tests, 'Tests')
|
||||||
}
|
}
|
||||||
stage('ArduinoProMini (tests)') {
|
|
||||||
arduino.buildArduinoPro(config, config.tests, 'Tests')
|
|
||||||
}
|
|
||||||
stage('ArduinoMega (tests)') {
|
stage('ArduinoMega (tests)') {
|
||||||
arduino.buildArduinoMega(config, config.tests, 'Tests')
|
arduino.buildArduinoMega(config, config.tests, 'Tests')
|
||||||
}
|
}
|
||||||
@@ -145,15 +139,9 @@ def call(Closure body) {
|
|||||||
stage('ESP8266 (examples)') {
|
stage('ESP8266 (examples)') {
|
||||||
arduino.buildEsp8266(config, config.examples, 'Examples')
|
arduino.buildEsp8266(config, config.examples, 'Examples')
|
||||||
}
|
}
|
||||||
stage('ArduinoNano (examples)') {
|
|
||||||
arduino.buildArduinoNano(config, config.examples, 'Examples')
|
|
||||||
}
|
|
||||||
stage('ArduinoUno (examples)') {
|
stage('ArduinoUno (examples)') {
|
||||||
arduino.buildArduinoUno(config, config.examples, 'Examples')
|
arduino.buildArduinoUno(config, config.examples, 'Examples')
|
||||||
}
|
}
|
||||||
stage('ArduinoProMini (examples)') {
|
|
||||||
arduino.buildArduinoPro(config, config.examples, 'Examples')
|
|
||||||
}
|
|
||||||
stage('ArduinoMega (examples)') {
|
stage('ArduinoMega (examples)') {
|
||||||
arduino.buildArduinoMega(config, config.examples, 'Examples')
|
arduino.buildArduinoMega(config, config.examples, 'Examples')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user