fixed JenkinsFIle for sh

This commit is contained in:
Marcel Peterkau 2025-06-02 09:49:24 +02:00
parent 8c022188c6
commit b276d74907

25
Jenkinsfile vendored
View File

@ -15,22 +15,22 @@ pipeline {
} }
stages { stages {
stage('🧹 Cleanup') { stage('🧹 Cleanup') {
steps { steps {
deleteDir() deleteDir()
} }
} }
// Kein Checkout nötig SCM ist über UI definiert
stage('🧰 Setup PlatformIO') { stage('🧰 Setup PlatformIO') {
steps { steps {
dir('Software') { dir('Software') {
sh ''' sh """
#!/bin/bash
python3 -m venv .venv python3 -m venv .venv
. .venv/bin/activate source .venv/bin/activate
pip install --upgrade pip platformio pip install --upgrade pip platformio
''' """
} }
} }
} }
@ -52,10 +52,11 @@ wifi_ap_password = DummyAP
stage('🧪 Build Firmware') { stage('🧪 Build Firmware') {
steps { steps {
dir('Software') { dir('Software') {
sh ''' sh """
. .venv/bin/activate #!/bin/bash
source .venv/bin/activate
platformio run -e ${params.BUILD_ENV} platformio run -e ${params.BUILD_ENV}
''' """
} }
} }
} }
@ -68,14 +69,14 @@ wifi_ap_password = DummyAP
stage('🔌 Flash Hardware (Dummy)') { stage('🔌 Flash Hardware (Dummy)') {
steps { steps {
echo "TODO: Flashen mit z.B. esptool oder PySerial in Hardware/flash.py" echo "TODO: Flash-Script aufrufen, z.B.: python3 Hardware/flash.py /dev/ttyUSB0"
} }
} }
stage('🧠 Run Tests (Dummy)') { stage('🧠 Run Tests (Dummy)') {
steps { steps {
dir('Testing') { dir('Testing') {
echo "TODO: Starte Tests mit Testing/test_runner.py oder pytest" echo "TODO: Testing mit z.B.: python3 test_runner.py oder pytest starten"
} }
} }
} }
@ -83,10 +84,10 @@ wifi_ap_password = DummyAP
post { post {
success { success {
echo "✅ CI abgeschlossen Firmware gebaut, Tests vorbereitet" echo "✅ CI abgeschlossen Firmware gebaut, Dummy-Stages vorbereitet"
} }
failure { failure {
echo "❌ Fehler im Build schau in die Logs, Commander" echo "❌ Fehler im Build schau in die Logs, Commander Seraphon"
} }
} }
} }