first commit

This commit is contained in:
2026-07-17 12:23:35 +02:00
commit 6769cce890
4 changed files with 11625 additions and 0 deletions
Vendored
+136
View File
@@ -0,0 +1,136 @@
pipeline {
agent any
environment {
PACKAGE_NAME = "espos-kernel"
APTLY_REPO = "espos-unstable"
APTLY_HOST = "ubuntu@elordenador.org"
DEB_FILE = "../*.deb"
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Install Build Dependencies') {
steps {
sh '''
sudo apt update
sudo apt install -y \
build-essential \
bc \
bison \
flex \
libssl-dev \
libelf-dev \
dwarves \
fakeroot \
rsync \
kmod \
cpio \
wget \
curl \
xz-utils \
debhelper \
lintian
'''
}
}
stage('Build Kernel') {
steps {
sh '''
chmod +x build-kernel.sh
./build-kernel.sh
echo "=== Generated packages ==="
ls -lah ../*.deb
'''
}
}
stage('Lintian Check') {
steps {
sh '''
lintian ../*.deb || true
'''
}
}
stage('Upload to Aptly') {
steps {
sshagent(['srv01_elordenador_org']) {
sh '''
mkdir -p ~/.ssh
ssh-keyscan -H elordenador.org >> ~/.ssh/known_hosts
scp ${DEB_FILE} ${APTLY_HOST}:/tmp/
'''
}
}
}
stage('Publish Repository') {
steps {
sshagent(['srv01_elordenador_org']) {
withCredentials([
string(
credentialsId: 'aptly_gpg_pass',
variable: 'GPG_PASS'
)
]) {
sh '''
ssh ${APTLY_HOST} "
aptly repo add ${APTLY_REPO} /tmp/*.deb
if aptly publish list | grep -q ${APTLY_REPO}
then
aptly publish update \
-passphrase='${GPG_PASS}' \
${APTLY_REPO}
else
aptly publish repo \
-distribution=${APTLY_REPO} \
-component=main \
-passphrase='${GPG_PASS}' \
${APTLY_REPO}
fi
rm -f /tmp/*.deb
"
'''
}
}
}
}
stage('Archive Packages') {
steps {
archiveArtifacts(
artifacts: '../*.deb',
fingerprint: true
)
}
}
}
post {
success {
echo 'Kernel publicado correctamente'
}
failure {
echo 'Error construyendo kernel'
}
}
}
+1
View File
@@ -0,0 +1 @@
6.18.38
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euxo pipefail
KERNEL_VERSION="$(cat VERSION)"
wget \
https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${KERNEL_VERSION}.tar.xz
tar -xf linux-${KERNEL_VERSION}.tar.xz
cd linux-${KERNEL_VERSION}
cp ../config/kernel.config .config
make olddefconfig
for patch in ../patches/*.patch
do
[ -f "$patch" ] || continue
patch -p1 < "$patch"
done
scripts/config --set-str LOCALVERSION "-espos"
fakeroot make -j"$(nproc)" bindeb-pkg
+11462
View File
File diff suppressed because it is too large Load Diff