mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 05:41:37 +00:00
[CI] Fix gsc.jenkinsfile
- remove unnecessary parts - fix whitespace and style
This commit is contained in:
+53
-67
@@ -1,71 +1,57 @@
|
||||
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}
|
||||
'''
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sh 'echo Deploying code'
|
||||
}
|
||||
}
|
||||
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}
|
||||
'''
|
||||
}
|
||||
}
|
||||
post {
|
||||
success {
|
||||
echo 'Deployment successful'
|
||||
}
|
||||
failure {
|
||||
echo 'Failure while on the pipeline'
|
||||
}
|
||||
unstable {
|
||||
echo 'Pipeline marked as "unstable"'
|
||||
}
|
||||
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
|
||||
'''
|
||||
}
|
||||
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}
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
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
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user