Added code to artifacts debug packages in build piplines

I also took time to fix spaces in all jenkins piplines
This commit is contained in:
ericbsd
2021-08-19 13:45:46 -03:00
parent 45add1f092
commit 3be1ccd5a0
6 changed files with 41 additions and 35 deletions

View File

@@ -1,14 +1,14 @@
pipeline {
agent {
node {
label 'SCALE-Build'
label 'SCALE-Build'
}
}
stages {
stage('SCM') {
steps {
dir('src') {
checkout scm
checkout scm
}
}
}
@@ -25,24 +25,25 @@ pipeline {
stage('Packages') {
steps {
sh 'cd src && make packages'
}
}
}
stage('Update') {
steps {
sh 'cd src && make update'
}
}
}
stage('ISO') {
steps {
sh 'cd src && make iso'
}
}
}
stage('Artifact') {
steps {
sh 'rm -rf artifacts || true'
sh 'mkdir -p artifacts'
sh 'mkdir -p artifacts/pkg_dbg'
sh 'mv src/tmp/release/* artifacts/'
}
sh 'cp src/tmp/pkgdir/*dbg* artifacts/pkg_dbg/'
}
}
}
post {
@@ -53,6 +54,6 @@ pipeline {
failure {
archiveArtifacts artifacts: 'src/logs/**', fingerprint: false
mail bcc: '', body: "<b>Jenkins: TrueNAS SCALE Nightly Build Failure</b><br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: Project name -> ${env.JOB_NAME}", to: "kris@ixsystems.com,william@ixsystems.com";
}
}
}
}

View File

@@ -1,14 +1,14 @@
pipeline {
agent {
node {
label 'SCALE-Build'
label 'SCALE-Build'
}
}
stages {
stage('SCM') {
steps {
dir('src') {
checkout scm
checkout scm
}
}
}
@@ -25,12 +25,12 @@ pipeline {
stage('Packages') {
steps {
sh 'cd src && make packages'
}
}
}
stage('Update') {
steps {
sh 'cd src && make update'
}
}
}
stage('ISO') {
steps {
@@ -46,9 +46,10 @@ pipeline {
stage('Artifact') {
steps {
sh 'rm -rf artifacts || true'
sh 'mkdir -p artifacts'
sh 'mkdir -p artifacts/pkg_dbg'
sh 'mv src/tmp/release/* artifacts/'
}
sh 'cp src/tmp/pkgdir/*dbg* artifacts/pkg_dbg/'
}
}
}
post {
@@ -59,6 +60,6 @@ pipeline {
failure {
archiveArtifacts artifacts: 'src/logs/**', fingerprint: false
mail bcc: '', body: "<b>Jenkins: TrueNAS SCALE Nightly Build Failure</b><br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: Project name -> ${env.JOB_NAME}", to: "kris@ixsystems.com,william@ixsystems.com";
}
}
}
}

View File

@@ -1,17 +1,17 @@
pipeline {
agent {
node {
label 'SCALE-Build'
label 'SCALE-Build'
}
}
environment {
BDIR = "/root/truenas-build"
BDIR = "/root/truenas-build"
}
stages {
stage('SCM') {
steps {
sh '[ -d "${BDIR}" ] || git clone --depth=1 https://github.com/truenas/truenas-build ${BDIR}'
sh 'cd ${BDIR} && git reset --hard && git pull'
sh '[ -d "${BDIR}" ] || git clone --depth=1 https://github.com/truenas/truenas-build ${BDIR}'
sh 'cd ${BDIR} && git reset --hard && git pull'
}
}
stage('Checkout') {
@@ -22,7 +22,7 @@ pipeline {
stage('Packages') {
steps {
sh 'cd ${BDIR} && make packages'
}
}
}
stage('Upload Packages') {
steps {
@@ -32,12 +32,12 @@ pipeline {
stage('Update') {
steps {
sh 'cd ${BDIR} && make update'
}
}
}
stage('ISO') {
steps {
sh 'cd ${BDIR} && make iso'
}
}
}
}
post {
@@ -46,6 +46,8 @@ pipeline {
sh 'mkdir -p artifacts/logs'
sh 'mv ${BDIR}/tmp/release/* artifacts/'
sh 'cp -r ${BDIR}/logs/* artifacts/logs/'
sh 'mkdir -p artifacts/pkg_dbg'
sh 'cp ${BDIR}/tmp/pkgdir/*dbg* artifacts/pkg_dbg/'
archiveArtifacts artifacts: 'artifacts/**', fingerprint: false
}
failure {
@@ -54,6 +56,6 @@ pipeline {
sh 'cp -r ${BDIR}/logs/* artifacts/logs/'
archiveArtifacts artifacts: 'artifacts/**', fingerprint: false
mail bcc: '', body: "<b>Jenkins: TrueNAS SCALE Build Failure</b><br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: Project name -> ${env.JOB_NAME}", to: "kris@ixsystems.com,william@ixsystems.com";
}
}
}
}

View File

@@ -1,7 +1,7 @@
pipeline {
agent {
node {
label 'SCALE-Build'
label 'SCALE-Build'
}
}
environment {
@@ -15,7 +15,7 @@ pipeline {
copyArtifacts filter: '**/*.json', fingerprintArtifacts: true, flatten: true, projectName: 'Build - TrueNAS SCALE (Incremental)', selector: lastSuccessful(), target: 'upload/files'
sh 'scp upload/files/manifest.json upload/files/TrueNAS-SCALE.update scale@update-master.freenas.org:/tank/www/scale/TrueNAS-SCALE-Angelfish-Nightlies/'
sh 'rm -rf upload/files'
}
}
}
}
}

View File

@@ -1,17 +1,17 @@
pipeline {
agent {
node {
label 'SCALE-Build'
label 'SCALE-Build'
}
}
environment {
BDIR = "/root/truenas-build"
BDIR = "/root/truenas-build"
}
stages {
stage('SCM') {
steps {
sh '[ -d "${BDIR}" ] || git clone --depth=1 https://github.com/truenas/truenas-build ${BDIR}'
sh 'cd ${BDIR} && git reset --hard && git pull'
sh '[ -d "${BDIR}" ] || git clone --depth=1 https://github.com/truenas/truenas-build ${BDIR}'
sh 'cd ${BDIR} && git reset --hard && git pull'
}
}
stage('Checkout') {
@@ -22,7 +22,7 @@ pipeline {
stage('Packages') {
steps {
sh 'cd ${BDIR} && make packages'
}
}
}
stage('Upload Packages') {
steps {
@@ -32,17 +32,17 @@ pipeline {
stage('Update') {
steps {
sh 'cd ${BDIR} && make update'
}
}
}
stage('ISO') {
steps {
sh 'cd ${BDIR} && make iso'
}
}
}
stage('Upload') {
steps {
sh 'scp ${BDIR}/tmp/release/manifest.json ${BDIR}/tmp/release/TrueNAS-SCALE.update scale@update-master.freenas.org:/tank/www/scale/TrueNAS-SCALE-Angelfish-Nightlies/'
}
}
}
}
post {
@@ -51,6 +51,8 @@ pipeline {
sh 'mkdir -p artifacts/logs'
sh 'mv ${BDIR}/tmp/release/* artifacts/'
sh 'cp -r ${BDIR}/logs/* artifacts/logs/'
sh 'mkdir -p artifacts/pkg_dbg'
sh 'cp ${BDIR}/tmp/pkgdir/*dbg* artifacts/pkg_dbg/'
archiveArtifacts artifacts: 'artifacts/**', fingerprint: false
}
failure {
@@ -59,6 +61,6 @@ pipeline {
sh 'cp -r ${BDIR}/logs/* artifacts/logs/'
archiveArtifacts artifacts: 'artifacts/**', fingerprint: false
mail bcc: '', body: "<b>Jenkins: TrueNAS SCALE Build Failure</b><br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: Project name -> ${env.JOB_NAME}", to: "kris@ixsystems.com,william@ixsystems.com";
}
}
}
}

View File

@@ -1,7 +1,7 @@
pipeline {
agent {
node {
label 'SCALE-Build'
label 'SCALE-Build'
}
}
stages {