-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
29 lines (29 loc) · 780 Bytes
/
Jenkinsfile
File metadata and controls
29 lines (29 loc) · 780 Bytes
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
pipeline {
agent {
docker { image 'ubuntu:xenial'
args '-u 0 --privileged'
}
}
stages {
stage('prepre') {
steps {
sh '''
apt-get update
apt-get install -y build-essential sudo qemu kvm python
groupadd -r jenkins -g 6958
useradd -u 6930 -r -g jenkins -m -d /jenkins -c "Jenkins" jenkins
usermod -aG kvm jenkins
chown root:kvm /dev/kvm
id jenkins
'''
}
}
stage('build') {
steps {
sh '''
sudo -u jenkins make grade
'''
}
}
}
}