forked from espos/rootfs
first commit
This commit is contained in:
Vendored
+112
@@ -0,0 +1,112 @@
|
||||
pipeline {
|
||||
|
||||
agent any
|
||||
|
||||
|
||||
environment {
|
||||
ROOTFS_ARTIFACT = "espos-openrc-rootfs.tar.xz"
|
||||
}
|
||||
|
||||
|
||||
stages {
|
||||
|
||||
|
||||
stage('Checkout') {
|
||||
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
stage('Install dependencies') {
|
||||
|
||||
steps {
|
||||
|
||||
sh '''
|
||||
sudo apt update
|
||||
|
||||
sudo apt install -y \
|
||||
debootstrap \
|
||||
xz-utils \
|
||||
tar \
|
||||
ca-certificates
|
||||
|
||||
'''
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
stage('Build rootfs') {
|
||||
|
||||
steps {
|
||||
|
||||
sh '''
|
||||
|
||||
chmod +x build-rootfs.sh
|
||||
|
||||
sudo ./build-rootfs.sh
|
||||
|
||||
'''
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
stage('Verify artifact') {
|
||||
|
||||
steps {
|
||||
|
||||
sh '''
|
||||
|
||||
test -f ${ROOTFS_ARTIFACT}
|
||||
ls -lh ${ROOTFS_ARTIFACT}
|
||||
|
||||
'''
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
stage('Archive artifact') {
|
||||
|
||||
steps {
|
||||
|
||||
archiveArtifacts \
|
||||
artifacts: "${ROOTFS_ARTIFACT}",
|
||||
fingerprint: true
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
post {
|
||||
|
||||
success {
|
||||
|
||||
echo "RootFS EspOS generado y guardado como artifact"
|
||||
|
||||
}
|
||||
|
||||
|
||||
failure {
|
||||
|
||||
echo "Error generando rootfs"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user