dustin
/
jenkinsagent
Archived
1
0
Fork 0

Compare commits

...

1 Commits

Author SHA1 Message Date
Dustin f168c0e561 ci: Begin CI pipeline 2022-03-15 15:57:09 -05:00
6 changed files with 92 additions and 0 deletions

30
Makefile Normal file
View File

@ -0,0 +1,30 @@
BUILDROOT_SRC ?= ~/src/buildroot
.PHONY: all
all: initramfs rootfs
.PHONY: rootfs
rootfs: _build/rootfs/.config
$(MAKE) -C _build/rootfs -j $(shell nproc)
.PHONY: initramfs
initramfs: _build/initramfs/.config
$(MAKE) -C _build/initramfs -j $(shell nproc)
.PHONY: publish
publish:
rsync -rtliO \
_build/rootfs/images/rpi-firmware/ \
_build/rootfs/images/Image \
_build/rootfs/images/*.dtb \
_build/initramfs/images/rootfs.cpio.lz4 \
pxe0.pyrocufflink.blue:/var/lib/tftpboot/jenkinsagent-aarch64/
rsync -P --no-W \
_build/rootfs/images/rootfs.squashfs \
pxe0.pyrocufflink.blue:/var/lib/nbd/jenkinsagent-aarch64.squashfs
_build/rootfs/.config:
$(MAKE) -C $(BUILDROOT_SRC) O=${PWD}/_build/rootfs BR2_EXTERNAL=${PWD} jenkinsagent_defconfig
_build/initramfs/.config:
$(MAKE) -C $(BUILDROOT_SRC) O=${PWD}/_build/initramfs BR2_EXTERNAL=${PWD} jenkinsagent_initramfs_defconfig

52
ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,52 @@
pipeline {
agent {
docker {
image 'registry.fedoraproject.io/fedora'
args '--privileged -u 0:0'
}
}
stages {
stage('Prepare') {
steps {
checkout poll: false, scm: [
$class: 'GitSCM',
branches: [[name: '2022.02.x']],
doGenerateSubmoduleConfigurations: false,
userRemoteConfigs: [[url: 'git://git.buildroot.net/buildroot']],
extensions: [
[
$class: 'RelativeTargetDirectory',
relativeTargetDir: 'buildroot',
],
],
]
steps {
sh '. ci/prepare.sh'
}
}
}
parallel {
stage('Build Initramfs') {
steps {
sh '. ci/build-initramfs.sh'
}
}
stage('Build Rootfs') {
steps {
sh '. ci/build-rootfs.sh'
}
}
}
stage('Publish') {
steps {
sshagent(['jenkins-pxe']) {
sh '. ci/publish.sh'
}
}
}
}
}

3
ci/build-initramfs.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
make initramfs

3
ci/build-rootfs.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
make rootfs

1
ci/prepare.sh Normal file
View File

@ -0,0 +1 @@
#!/bin/sh

3
ci/publish.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/sh
make publish