forked from lacostej/puavo-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile.imagebuild
48 lines (41 loc) · 1.07 KB
/
Jenkinsfile.imagebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
pipeline {
agent {
docker {
image 'debian:stretch'
// XXX could you do most operations as normal user?
args '-u root --mount type=bind,source=/etc/jenkins-docker-config,destination=/etc/jenkins-docker-config,readonly --env-file=/etc/jenkins-docker-config/environment --privileged'
}
}
stages {
stage('Prepare for build') {
steps {
sh '''
apt-get update
apt-get -y dist-upgrade
apt-get install -y devscripts dpkg-dev make
make setup-buildhost
'''
}
}
stage('Bootstrap image') {
steps { sh 'make rootfs-debootstrap' }
}
stage('Build and configure image') {
steps { sh 'make rootfs-update' }
}
stage('Make the squashfs image') {
steps { sh 'make release_name="Jenkinsbuild-$(date +%s)" rootfs-image' }
}
stage('Test') {
steps { sh 'echo XXX make test the image maybe' }
}
stage('Upload image') {
steps { sh 'echo XXX maybe upload image here somehow somewhere' }
}
}
post {
always {
cleanWs()
}
}
}