Update Jenkinsfile

This commit is contained in:
Siwat Sirichai 2023-12-07 16:02:28 +07:00
parent 1988bc953e
commit bc85bcf601
1 changed files with 4 additions and 8 deletions

12
Jenkinsfile vendored
View File

@ -2,22 +2,18 @@ pipeline {
agent any
stages {
stage('Clone') {
steps {
git branch: 'main', url: 'https://git.siwatsystem.com/ise-senior-iot/iot-firmware.git'
}
}
stage('Build') {
steps {
git branch: 'main', url: 'https://git.siwatsystem.com/ise-senior-iot/iot-firmware.git'
sh 'export PLATFORMIO_PATH=/root/.platformio/penv/bin/platformio'
sh '/usr/bin/python3 gen_release.py'
stash includes: 'release/**/*', name: 'release_binaries'
}
}
stage('Publish') {
steps {
sh 'mkdir -p artifacts'
sh 'cp -r release/ artifacts/'
archiveArtifacts artifacts: 'artifacts/**/*', fingerprint: true
unstash 'release_binaries'
archiveArtifacts artifacts: 'release/**/*', fingerprint: true
}
}
}