updated jkf
This commit is contained in:
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
@@ -4,6 +4,14 @@ pipeline {
|
|||||||
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '1'))
|
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '1'))
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
|
stage('Prepare') {
|
||||||
|
steps {
|
||||||
|
// Get distrobuilder
|
||||||
|
copyArtifacts filter: 'bin/distrobuilder', fingerprintArtifacts: true, flatten: true, projectName: '/Public/DistroBuilder/BuildConfig=BrampCustom', selector: lastSuccessful()
|
||||||
|
// Setup Env
|
||||||
|
mkdir $WORKSPACE/REL
|
||||||
|
}
|
||||||
|
}
|
||||||
stage("Image Configs") {
|
stage("Image Configs") {
|
||||||
matrix {
|
matrix {
|
||||||
axes {
|
axes {
|
||||||
@@ -29,32 +37,23 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// all the stages here will run in parallel
|
// all the stages here will run in parallel
|
||||||
stages {
|
|
||||||
stage('Prepare') {
|
|
||||||
steps {
|
|
||||||
// Get distrobuilder
|
|
||||||
copyArtifacts filter: 'bin/distrobuilder', fingerprintArtifacts: true, flatten: true, projectName: '/Public/DistroBuilder/BuildConfig=BrampCustom', selector: lastSuccessful()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage('Build') {
|
|
||||||
steps {
|
steps {
|
||||||
copyArtifacts filter: 'bin/distrobuilder', fingerprintArtifacts: true, flatten: true, projectName: '/Public/DistroBuilder/BuildConfig=BrampCustom', selector: lastSuccessful()
|
copyArtifacts filter: 'bin/distrobuilder', fingerprintArtifacts: true, flatten: true, projectName: '/Public/DistroBuilder/BuildConfig=BrampCustom', selector: lastSuccessful()
|
||||||
// Build SH script
|
// Build SH script
|
||||||
sh ''' mkdir $WORKSPACE/REL
|
sh '''sudo $WORKSPACE/distrobuilder build-lxc Alpine.yaml $WORKSPACE/REL/$ImgRelease-$ImgVariant/ -o image.release=$ImgRelease -o image.variant=$ImgVariant
|
||||||
sudo $WORKSPACE/distrobuilder build-lxc Alpine.yaml $WORKSPACE/REL/$ImgRelease-$ImgVariant/ -o image.release=$ImgRelease -o image.variant=$ImgVariant
|
|
||||||
sudo chown jenkins:jenkins -R $WORKSPACE/REL
|
sudo chown jenkins:jenkins -R $WORKSPACE/REL
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
|
||||||
stage('Finish') {
|
}
|
||||||
steps {
|
}
|
||||||
// Save generated files
|
stage('Finish') {
|
||||||
archiveArtifacts artifacts: '*.tar.xz', followSymlinks: false
|
steps {
|
||||||
// Cleaning WorkSpace
|
// Save generated files
|
||||||
//cleanWs()
|
//archiveArtifacts artifacts: '/REL/**', followSymlinks: false
|
||||||
}
|
// Cleaning WorkSpace
|
||||||
}
|
//cleanWs()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user