added manual secuential file

This commit is contained in:
2021-02-19 04:44:27 +01:00
parent 97d71be8d2
commit a8e3ac9877
3 changed files with 55 additions and 69 deletions

4
Jenkinsfile vendored
View File

@@ -41,11 +41,11 @@ pipeline {
} }
} }
} }
// all the stages here will run in parallel
stages { stages {
stage('Build image') { stage('Build image') {
steps { steps {
//echo "Do Build for ${$ImgRelease} - ${ImgVariant}" // Dbug MSG
echo "Do Build for ${$ImgRelease} - ${ImgVariant}"
// Build script // Build script
sh '''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 sudo chown jenkins:jenkins -R $WORKSPACE/REL

53
Jenkinsfile Squential Normal file
View File

@@ -0,0 +1,53 @@
pipeline {
agent { label 'LXCBuilder' }
options {
skipDefaultCheckout()
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '1'))
}
stages {
stage('Prepare') {
steps {
// Cleanup before starting
cleanWs()
// Checkout the repository
checkout scm
// Get distrobuilder
copyArtifacts filter: 'bin/distrobuilder', fingerprintArtifacts: true, flatten: true, projectName: '/Public/DistroBuilder/BuildConfig=BrampCustom', selector: lastSuccessful()
// Setup Env
sh '''mkdir $WORKSPACE/REL'''
}
}
stage('Build image 3.13,default') {
steps {
// Build script
sh '''sudo $WORKSPACE/distrobuilder build-lxc Alpine.yaml $WORKSPACE/REL/3.13-default/ -o image.release=3.13 -o image.variant=default
sudo chown jenkins:jenkins -R $WORKSPACE/REL
'''
}
}
stage('Build image; 3.13,extended') {
steps {
// Build script
sh '''sudo $WORKSPACE/distrobuilder build-lxc Alpine.yaml $WORKSPACE/REL/3.13-extended/ -o image.release=3.13 -o image.variant=extended
sudo chown jenkins:jenkins -R $WORKSPACE/REL
'''
}
}
stage('Build image: edge,default') {
steps {
// Build script
sh '''sudo $WORKSPACE/distrobuilder build-lxc Alpine.yaml $WORKSPACE/REL/edge-default/ -o image.release=edge -o image.variant=default
sudo chown jenkins:jenkins -R $WORKSPACE/REL
'''
}
}
stage('Finish') {
steps {
// Save generated files
archiveArtifacts artifacts: 'REL/**', followSymlinks: false
// Cleaning WorkSpace
//cleanWs()
}
}
}
}

View File

@@ -1,67 +0,0 @@
pipeline {
agent { label 'LXCBuilder' }
options {
skipDefaultCheckout()
buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '1'))
}
stages {
stage('Prepare') {
steps {
// Cleanup before starting
cleanWs()
// Checkout the repository
checkout scm
// Get distrobuilder
copyArtifacts filter: 'bin/distrobuilder', fingerprintArtifacts: true, flatten: true, projectName: '/Public/DistroBuilder/BuildConfig=BrampCustom', selector: lastSuccessful()
// Setup Env
sh '''mkdir $WORKSPACE/REL'''
}
}
stage("Image Configs") {
matrix {
axes {
axis {
name 'ImgRelease'
values '3.13', 'edge'
}
axis {
name 'ImgVariant'
values 'default', 'extended'
}
}
excludes {
exclude {
axis {
name 'ImgRelease'
values 'edge'
}
axis {
name 'ImgVariant'
notValues 'default'
}
}
}
// all the stages here will run in parallel
stages {
stage('Build image') {
steps {
//echo "Do Build for ${$ImgRelease} - ${ImgVariant}"
// Build script
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: 'REL/**', followSymlinks: false
// Cleaning WorkSpace
//cleanWs()
}
}
}
}