Initial commit

This commit is contained in:
2022-03-07 08:53:58 -06:00
commit 2437e6e467
25 changed files with 498 additions and 0 deletions

18
ci/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM registry.fedoraproject.org/fedora:35
ARG UID
ARG GID
RUN groupadd -g ${GID} jenkins \
&& useradd -u ${UID} -g ${GID} -m -d /var/lib/jenkins -l jenkins
RUN dnf install -y \
findutils \
make \
openssh-clients \
rsync \
squashfs-tools \
tar \
unzip \
util-linux \
&& dnf clean all

67
ci/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,67 @@
DOCKER_BUILD_ARGS = '''\
--build-arg UID=$(id -u) \
--build-arg GID=$(id -g) \
'''
pipeline {
agent {
label 'docker && aarch64'
}
options {
buildDiscarder logRotator(numToKeepStr: '5')
disableConcurrentBuilds()
}
triggers {
pollSCM ''
}
parameters {
booleanParam \
name: 'Clean',
description: 'Clean the workspace and perform a full rebuild'
}
stages {
stage('Build') {
agent {
dockerfile {
reuseNode true
dir 'ci'
args '--privileged -u 0:0'
additionalBuildArgs DOCKER_BUILD_ARGS
}
}
steps {
script {
if (params.Clean) {
sh 'rm -rf _build'
}
}
sh 'make rootfs initramfs'
}
}
stage('Publish') {
when {
not {
changeRequest()
}
}
agent {
dockerfile {
reuseNode true
dir 'ci'
args '-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts'
additionalBuildArgs DOCKER_BUILD_ARGS
}
}
steps {
sshagent(['jenkins-pxe']) {
sh 'make publish'
}
}
}
}
}