-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
58 lines (58 loc) · 1.97 KB
/
Jenkinsfile
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
49
50
51
52
53
54
55
56
57
58
pipeline {
agent none
stages {
stage("Test and Build") {
environment {
CARGO = "~/.cargo/bin/cargo"
OAUTH = credentials("GitHub")
}
when {
branch 'master'
}
stages {
stage("Debian") {
agent {
dockerfile {
dir "ci/debian"
}
}
steps {
sh """
$CARGO clean
$CARGO update
$CARGO test
$CARGO build --release
"""
sh '''
LIBC_VERSION=$(ldd --version | head -n1 | sed -r 's/(.* )//')
mkdir -p assets
tar -C target/release -zcvf assets/riffol-libc-$LIBC_VERSION.tar.gz riffol
ci/release.sh riboseinc/riffol
'''
}
}
stage("CentOS") {
agent {
dockerfile {
dir "ci/centos"
}
}
steps {
sh """
$CARGO clean
$CARGO update
$CARGO test
$CARGO build --release
"""
sh '''
LIBC_VERSION=$(ldd --version | head -n1 | sed -r 's/(.* )//')
mkdir -p assets
tar -C target/release -zcvf assets/riffol-libc-$LIBC_VERSION.tar.gz riffol
ci/release.sh riboseinc/riffol
'''
}
}
}
}
}
}