59 lines
No EOL
1.2 KiB
Groovy
59 lines
No EOL
1.2 KiB
Groovy
pipeline {
|
|
agent any
|
|
|
|
options {
|
|
buildDiscarder(
|
|
logRotator(
|
|
numToKeepStr: '5'
|
|
)
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage("Clean Up") {
|
|
agent {
|
|
label 'arch'
|
|
}
|
|
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
git clean -xfd
|
|
git reset --hard
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
|
|
stage("Build ISO") {
|
|
agent {
|
|
label 'arch'
|
|
}
|
|
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
mkdir -pv /tmp/archisotmp
|
|
cp -rv server /tmp/archisotmp/server
|
|
|
|
|
|
mkarchiso -v -w "/tmp/archisotmp/work" -o /tmp/archisotmp/out "/tmp/archisotmp/server"
|
|
|
|
cp -rv /tmp/archisotmp/out ./out
|
|
rm -rf /tmp/archisotmp
|
|
'''
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "out/*.iso"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |