diff --git a/Jenkinsfile b/Jenkinsfile index a6ec4d8..2f8e622 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,13 +2,9 @@ pipeline { agent any environment { - BUILD_ENV = "pcb_rev_1-4_serial" PIO_HOME_DIR = "${WORKSPACE}/.pio" VENV_PATH = "${WORKSPACE}/Software/.venv" } - - def allEnvironments = ['pcb_rev_1-2_serial', 'pcb_rev_1-3_serial', 'pcb_rev_1-4_serial'] - stages { stage('🧰 Setup PlatformIO') { @@ -40,11 +36,12 @@ wifi_ap_password = DummyAP steps { dir('Software') { script { - // Build Firmware for each environment + def allEnvironments = ['pcb_rev_1-2_serial', 'pcb_rev_1-3_serial', 'pcb_rev_1-4_serial'] for (envName in allEnvironments) { echo "🔧 Baue Firmware für: ${envName}" sh "${env.VENV_PATH}/bin/platformio run -e ${envName}" } + env.REPRESENTATIVE_ENV = allEnvironments[0] } } } @@ -53,8 +50,10 @@ wifi_ap_password = DummyAP stage('📁 Build Filesystem') { steps { dir('Software') { - echo "📁 Baue Filesystem für ${allEnvironments[0]} (repräsentativ)" - sh "${env.VENV_PATH}/bin/platformio run -t buildfs -e ${allEnvironments[0]}" + script { + echo "📁 Baue Filesystem für ${env.REPRESENTATIVE_ENV} (repräsentativ)" + sh "${env.VENV_PATH}/bin/platformio run -t buildfs -e ${env.REPRESENTATIVE_ENV}" + } } } }