diff --git a/Jenkinsfile b/Jenkinsfile index cbfe84e..fe8b3ca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,40 +12,19 @@ pipeline { repo sync """ stage('Fetch') { - script { - if(params.MACHINE == 'beaglebone-yocto') { - echo "Fetch for beaglebone-yocto" - sh """#!/bin/bash - source bbb-init-build-env - bitbake console-image --runall=fetch - """ - } - else if(params.MACHINE == 'raspberrypi3-64') { - echo "Fetch for raspberrypi3-64" - sh """#!/bin/bash - source rpi-init-build-env - bitbake console-image --runall=fetch - """ - } - } + echo "Fetch ${params.MACHINE}" + sh """#!/bin/bash + MACHINE=${params.MACHINE} source blackfinn-init-build-env + bitbake console-image --runall=fetch + """ } stage('Build') { - script { - if(params.MACHINE == 'beaglebone-yocto') { - echo "Build for beaglebone-yocto" - sh """#!/bin/bash - source bbb-init-build-env - bitbake console-image - """ - } - else if(params.MACHINE == 'raspberrypi3-64') { - echo "Build for raspberrypi3-64" - sh """#!/bin/bash - source rpi-init-build-env - bitbake console-image - """ - } - } + echo "Build ${params.MACHINE}" + sh """#!/bin/bash + MACHINE=${params.MACHINE} source blackfinn-init-build-env + bitbake console-image + """ + stash name: "download_bz2", includes: "**/build/downloads/*.tar.bz2", excludes: "**/build/downloads/*.tar.bz2.*" stash name: "download_gz", includes: "**/build/downloads/*.tar.gz", excludes: "**/build/downloads/*.tar.gz.*" stash name: "download_xz", includes: "**/build/downloads/*.tar.xz", excludes: "**/build/downloads/*.tar.xz.*" @@ -56,6 +35,7 @@ pipeline { } } } + stage('Deploy downloads') { agent { label 'deploy' @@ -70,6 +50,7 @@ pipeline { sh "rm -rf *" } } + stage('Deploy packages') { agent { label 'deploy' @@ -83,6 +64,7 @@ pipeline { sh "rm -rf *" } } + stage('Deploy images') { agent { label 'deploy'