edited archiv step in Jenkinsfile
This commit is contained in:
parent
cf032fe516
commit
051796b19b
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
@ -54,13 +54,22 @@ wifi_ap_password = DummyAP
|
|||||||
|
|
||||||
stage('📦 Find & Archive Firmware') {
|
stage('📦 Find & Archive Firmware') {
|
||||||
steps {
|
steps {
|
||||||
|
dir('Software') {
|
||||||
script {
|
script {
|
||||||
def buildPath = "Software/.pio/build/${params.BUILD_ENV}"
|
echo "🔍 Suche nach Firmware (.fw.bin) und Filesystem (.fs.gz) Artefakten..."
|
||||||
def files = findFiles(glob: "${buildPath}/*.bin")
|
|
||||||
if (files.length == 1) {
|
def firmwareFiles = findFiles(glob: '.pio/build/**/*.fw.bin')
|
||||||
archiveArtifacts artifacts: files[0].path, fingerprint: true
|
def fsFiles = findFiles(glob: '.pio/build/**/*.fs.gz')
|
||||||
|
|
||||||
|
if (firmwareFiles.length == 0 && fsFiles.length == 0) {
|
||||||
|
echo "⚠️ Keine passenden Artefakte (.fw.bin / .fs.gz) gefunden – nichts zu archivieren."
|
||||||
} else {
|
} else {
|
||||||
error "❌ Konnte keine eindeutige Firmware-Datei finden!"
|
firmwareFiles.each { echo "📦 Firmware: ${it.path}" }
|
||||||
|
fsFiles.each { echo "📦 Filesystem: ${it.path}" }
|
||||||
|
|
||||||
|
def allArtifacts = (firmwareFiles + fsFiles).collect { it.path }
|
||||||
|
archiveArtifacts artifacts: allArtifacts.join(', ')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user