added manual secuential file
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -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
53
Jenkinsfile Squential
Normal 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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user