updated jenkins-File

This commit is contained in:
Marcel Peterkau 2025-06-15 21:36:52 +02:00
parent c1513641fc
commit 2d26a92937

27
Jenkinsfile vendored
View File

@ -7,13 +7,7 @@ pipeline {
VENV_PATH = "${WORKSPACE}/Software/.venv"
}
parameters {
choice(
name: 'BUILD_ENV',
choices: ['pcb_rev_1-2_serial', 'pcb_rev_1-3_serial', 'pcb_rev_1-4_serial'],
description: 'Firmware-Umgebung auswählen'
)
}
def allEnvironments = ['pcb_rev_1-2_serial', 'pcb_rev_1-3_serial', 'pcb_rev_1-4_serial']
stages {
@ -42,22 +36,25 @@ wifi_ap_password = DummyAP
}
}
stage('🧪 Build Firmware') {
stage('🧱 Build Firmware for All Environments') {
steps {
dir('Software') {
sh """
${env.VENV_PATH}/bin/platformio run -e ${params.BUILD_ENV}
"""
script {
// Build Firmware for each environment
for (envName in allEnvironments) {
echo "🔧 Baue Firmware für: ${envName}"
sh "${env.VENV_PATH}/bin/platformio run -e ${envName}"
}
}
}
}
}
stage('📁 Build Filesystem (LittleFS)') {
stage('📁 Build Filesystem') {
steps {
dir('Software') {
sh """
${env.VENV_PATH}/bin/platformio run -t buildfs -e ${params.BUILD_ENV}
"""
echo "📁 Baue Filesystem für ${allEnvironments[0]} (repräsentativ)"
sh "${env.VENV_PATH}/bin/platformio run -t buildfs -e ${allEnvironments[0]}"
}
}
}