This repository was archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 261
/
Copy pathgsc.jenkinsfile
59 lines (59 loc) · 2.85 KB
/
gsc.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
59
pipeline {
agent { label 'sgx_bionic' }
stages {
stage('Build') {
steps {
sh '''
cd Tools/gsc/test
# Jenkins may automatically merge master into submitted commit (but
# maybe not): choose the original submitted commit for GSC (third
# commit in below git-log output if merged or first commit if not
# merged)
export COMMIT=`git log --pretty="%H %P" -n 1 | awk '{if(!$3) \
{print $1} else {print $3}}'`
make TESTCASES='python3 python3-trusted-args base-python3' \
DISTRIBUTIONS='ubuntu18.04' \
IMAGE_SUFFIX=-${COMMIT} GRAPHENE_BRANCH=${COMMIT}
'''
}
}
stage('Test') {
steps {
sh '''
cd Tools/gsc/test
# Jenkins may automatically merge master into submitted commit (but
# maybe not): choose the original submitted commit for GSC (third
# commit in below git-log output if merged or first commit if not merged)
export COMMIT=`git log --pretty="%H %P" -n 1 | awk '{if(!$3) \
{print $1} else {print $3}}'`
# Test Linux Pal
make test ENV_VARS='GSC_PAL=Linux' MAXTESTNUM=2 TESTCASES=python3 \
DISTRIBUTIONS='ubuntu18.04' IMAGE_SUFFIX=-${COMMIT}
# Test Linux-SGX PAL
make test MAXTESTNUM=3 TESTCASES='python3 python3-trusted-args' \
DISTRIBUTIONS='ubuntu18.04' IMAGE_SUFFIX=-${COMMIT}
# Test use of base Graphene Image
make test MAXTESTNUM=2 TESTCASES='python3' \
DISTRIBUTIONS='ubuntu18.04-base' IMAGE_SUFFIX=-${COMMIT}
# Test info image command
make test-info-image-ubuntu18.04
'''
}
}
}
post {
always {
sh '''
cd Tools/gsc/test
# Jenkins may automatically merge master into submitted commit (but
# maybe not): choose the original submitted commit for GSC (third
# commit in below git-log output if merged or first commit if not merged)
export COMMIT=`git log --pretty="%H %P" -n 1 | awk '{if(!$3) \
{print $1} else {print $3}}'`
make clean TESTCASES='python3 python3-trusted-args base-python3' \
DISTRIBUTIONS='ubuntu18.04' IMAGE_SUFFIX=-${COMMIT}
docker image prune -f
'''
}
}
}