1
0
mirror of https://github.com/lxsang/DiyaSDK.git synced 2024-12-27 03:48:20 +01:00

Update Jenkinsfile

This commit is contained in:
Dany LE 2022-08-07 00:24:57 +02:00 committed by GitHub
parent f2ca4cc988
commit 9af3fa7d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

34
Jenkinsfile vendored
View File

@ -1,11 +1,3 @@
def remote = [:]
remote.name = 'workstation'
remote.host = 'workstation'
remote.user = 'dany'
remote.identityFile = '/var/jenkins_home/.ssh/id_rsa'
remote.allowAnyHosts = true
remote.agent = false
remote.logLevel = 'INFO'
pipeline{ pipeline{
agent { node{ label'master' }} agent { node{ label'master' }}
options { options {
@ -18,7 +10,7 @@ pipeline{
// Enable timestamps in build log console // Enable timestamps in build log console
timestamps() timestamps()
// Maximum time to run the whole pipeline before canceling it // Maximum time to run the whole pipeline before canceling it
timeout(time: 1, unit: 'HOURS') timeout(time: 10, unit: 'HOURS')
// Use Jenkins ANSI Color Plugin for log console // Use Jenkins ANSI Color Plugin for log console
ansiColor('xterm') ansiColor('xterm')
// Limit build concurrency to 1 per branch // Limit build concurrency to 1 per branch
@ -26,13 +18,18 @@ pipeline{
} }
stages stages
{ {
stage('Build diya image') { stage('Build image') {
agent {
docker {
image 'xsangle/ci-yocto:focal'
// args '-v /var/jenkins_home/workspace/ant-http:/var/jenkins_home/workspace/ant-http'
reuseNode true
}
}
steps { steps {
sshCommand remote: remote, command: ''' sh '''#!/bin/bash
set -e printenv
export WORKSPACE=$(realpath "./jenkins/workspace/Diya-image") source ./env.sh
cd $WORKSPACE
source ./env.sh || true
diya -c 32 diya -c 32
diya -c 64 diya -c 64
diya -b 32 diya -b 32
@ -40,5 +37,12 @@ pipeline{
''' '''
} }
} }
stage('Archive') {
steps {
script {
//archiveArtifacts artifacts: 'build/tmp/deploy/images/', fingerprint: true
}
}
}
} }
} }