diff --git a/Jenkinsfile b/Jenkinsfile index eadbfc9..f904b34 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,11 +41,11 @@ pipeline { } } } - // all the stages here will run in parallel stages { stage('Build image') { steps { - //echo "Do Build for ${$ImgRelease} - ${ImgVariant}" + // Dbug MSG + 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 diff --git a/Jenkinsfile Squential b/Jenkinsfile Squential new file mode 100644 index 0000000..fb543b7 --- /dev/null +++ b/Jenkinsfile Squential @@ -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() + } + } + } +} \ No newline at end of file diff --git a/Jenkinsfile-Sequential b/Jenkinsfile-Sequential deleted file mode 100644 index a36bb93..0000000 --- a/Jenkinsfile-Sequential +++ /dev/null @@ -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() - } - } - } -} \ No newline at end of file