fix in JenkinsFIle

This commit is contained in:
Marcel Peterkau 2025-06-15 21:41:01 +02:00
parent 2d26a92937
commit 546e4a1885

13
Jenkinsfile vendored
View File

@ -2,13 +2,9 @@ pipeline {
agent any agent any
environment { environment {
BUILD_ENV = "pcb_rev_1-4_serial"
PIO_HOME_DIR = "${WORKSPACE}/.pio" PIO_HOME_DIR = "${WORKSPACE}/.pio"
VENV_PATH = "${WORKSPACE}/Software/.venv" VENV_PATH = "${WORKSPACE}/Software/.venv"
} }
def allEnvironments = ['pcb_rev_1-2_serial', 'pcb_rev_1-3_serial', 'pcb_rev_1-4_serial']
stages { stages {
stage('🧰 Setup PlatformIO') { stage('🧰 Setup PlatformIO') {
@ -40,11 +36,12 @@ wifi_ap_password = DummyAP
steps { steps {
dir('Software') { dir('Software') {
script { 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) { for (envName in allEnvironments) {
echo "🔧 Baue Firmware für: ${envName}" echo "🔧 Baue Firmware für: ${envName}"
sh "${env.VENV_PATH}/bin/platformio run -e ${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') { stage('📁 Build Filesystem') {
steps { steps {
dir('Software') { dir('Software') {
echo "📁 Baue Filesystem für ${allEnvironments[0]} (repräsentativ)" script {
sh "${env.VENV_PATH}/bin/platformio run -t buildfs -e ${allEnvironments[0]}" echo "📁 Baue Filesystem für ${env.REPRESENTATIVE_ENV} (repräsentativ)"
sh "${env.VENV_PATH}/bin/platformio run -t buildfs -e ${env.REPRESENTATIVE_ENV}"
}
} }
} }
} }