ci: build in kubernetes
dustin/mqttdpms/pipeline/pr-master This commit looks good Details
dustin/mqttdpms/pipeline/head This commit looks good Details

We can use the same pod definition for both the x86_64 and aarch64
stages, since the `kubernetes` agent block can override the node
selector.
master
Dustin 2022-12-12 13:38:58 -06:00
parent dc65ca444c
commit 76b2c0dd48
3 changed files with 16 additions and 19 deletions

View File

@ -1,13 +0,0 @@
FROM rust:1.59.0-slim
RUN apt-get update && \
apt-get install -y \
cmake \
git \
libssl-dev \
libx11-dev \
libxext-dev \
pkg-config \
&& \
apt-get clean && \
rm -rf /var/cache/apt /var/lib/apt

14
ci/Jenkinsfile vendored
View File

@ -10,9 +10,10 @@ pipeline {
parallel { parallel {
stage('Build: x86_64') { stage('Build: x86_64') {
agent { agent {
dockerfile { kubernetes {
label 'x86_64' yamlFile 'ci/podTemplate.yaml'
dir 'ci' nodeSelector 'kubernetes.io/arch=amd64'
defaultContainer 'build'
} }
} }
steps { steps {
@ -27,9 +28,10 @@ pipeline {
stage('Build: aarch64') { stage('Build: aarch64') {
agent { agent {
dockerfile { kubernetes {
label 'aarch64' yamlFile 'ci/podTemplate.yaml'
dir 'ci' nodeSelector 'kubernetes.io/arch=arm64'
defaultContainer 'build'
} }
} }
steps { steps {

8
ci/podTemplate.yaml Normal file
View File

@ -0,0 +1,8 @@
spec:
containers:
- name: build
image: git.pyrocufflink.net/containerimages/build/mqttdpms
command:
- cat
stdin: true
tty: true