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