ci: Add CI pipeline
dustin/metricspi/pipeline/head This commit looks good
Details
dustin/metricspi/pipeline/head This commit looks good
Details
parent
50d2f3459b
commit
6176e86eff
|
@ -0,0 +1,25 @@
|
||||||
|
FROM registry.fedoraproject.org/fedora:30
|
||||||
|
|
||||||
|
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 \
|
||||||
|
bc \
|
||||||
|
bzip2 \
|
||||||
|
cpio \
|
||||||
|
diffutils \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
|
make \
|
||||||
|
ncurses-devel \
|
||||||
|
openssh-clients \
|
||||||
|
patch \
|
||||||
|
perl-ExtUtils-MakeMaker \
|
||||||
|
perl-Thread-Queue \
|
||||||
|
rsync \
|
||||||
|
wget \
|
||||||
|
which \
|
||||||
|
&& dnf clean all
|
|
@ -0,0 +1,77 @@
|
||||||
|
// vim: set ft=groovy :
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
dockerfile {
|
||||||
|
dir 'ci'
|
||||||
|
args '''
|
||||||
|
-v /etc/ssh/ssh_known_hosts:/etc/ssh/ssh_known_hosts
|
||||||
|
--pids-limit 16384
|
||||||
|
'''
|
||||||
|
additionalBuildArgs '''\
|
||||||
|
--build-arg UID=$(id -u) \
|
||||||
|
--build-arg GID=$(id -g) \
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
options {
|
||||||
|
buildDiscarder logRotator(numToKeepStr: '5')
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
}
|
||||||
|
|
||||||
|
triggers {
|
||||||
|
pollSCM ''
|
||||||
|
}
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
booleanParam \
|
||||||
|
name: 'Clean',
|
||||||
|
description: 'Clean the workspace and perform a full rebuild'
|
||||||
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
BUILDROOT_SRC = "${env.WORKSPACE}/buildroot"
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Prepare') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
if (params.Clean) {
|
||||||
|
sh 'rm -rf _build'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkout poll: false, scm: [
|
||||||
|
$class: 'GitSCM',
|
||||||
|
branches: [[name: '2022.05.x']],
|
||||||
|
doGenerateSubmoduleConfigurations: false,
|
||||||
|
userRemoteConfigs: [[url: 'git://git.buildroot.net/buildroot']],
|
||||||
|
extensions: [
|
||||||
|
[
|
||||||
|
$class: 'RelativeTargetDirectory',
|
||||||
|
relativeTargetDir: 'buildroot',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build') {
|
||||||
|
parallel {
|
||||||
|
stage('Build Initramfs') {
|
||||||
|
steps {
|
||||||
|
sh 'make initramfs'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build Rootfs') {
|
||||||
|
steps {
|
||||||
|
sh 'make rootfs'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue