Linux-SGX 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. pipeline {
  2. agent {
  3. dockerfile { filename 'Jenkinsfiles/ubuntu-16.04.dockerfile'
  4. label 'sgx_slave'
  5. args "-v /lib/modules:/lib/modules:ro -v /usr/src:/usr/src:ro -v /var/run/aesmd/aesm.socket:/var/run/aesmd/aesm.socket --device=/dev/gsgx:/dev/gsgx --device=/dev/isgx:/dev/isgx"
  6. }
  7. }
  8. stages {
  9. stage('Build') {
  10. steps {
  11. sh '''
  12. cd Pal/src/host/Linux-SGX/signer/ && openssl genrsa -3 -out enclave-key.pem 3072
  13. '''
  14. sh '''
  15. cd /opt/intel
  16. git clone https://github.com/01org/linux-sgx-driver.git
  17. cd linux-sgx-driver
  18. git checkout sgx_driver_1.9
  19. make
  20. '''
  21. sh '''
  22. cd Pal/src/host/Linux-SGX/sgx-driver
  23. ISGX_DRIVER_PATH=/opt/intel/linux-sgx-driver ISGX_DRIVER_VERSION=1.9 make
  24. '''
  25. sh '''
  26. make SGX=1
  27. '''
  28. sh '''
  29. make SGX_RUN=1
  30. '''
  31. }
  32. }
  33. stage('Test') {
  34. steps {
  35. /*
  36. timeout(time: 15, unit: 'MINUTES') {
  37. sh '''
  38. cd Pal/regression
  39. make SGX=1
  40. make SGX_RUN=1
  41. make SGX_RUN=1 KEEP_LOG=1 regression
  42. '''
  43. }
  44. */
  45. timeout(time: 5, unit: 'MINUTES') {
  46. sh '''
  47. cd LibOS/shim/test/regression
  48. make SGX=1
  49. make SGX_RUN=1
  50. make SGX_RUN=1 regression
  51. '''
  52. }
  53. timeout(time: 5, unit: 'MINUTES') {
  54. sh '''
  55. cd LibOS/shim/test/apps/python
  56. make SGX=1
  57. make SGX_RUN=1
  58. make SGX_RUN=1 regression
  59. '''
  60. }
  61. timeout(time: 5, unit: 'MINUTES') {
  62. sh '''
  63. cd LibOS/shim/test/apps/gcc
  64. make SGX=1
  65. make SGX_RUN=1
  66. make SGX_RUN=1 regression
  67. '''
  68. }
  69. timeout(time: 15, unit: 'MINUTES') {
  70. sh '''
  71. cd LibOS/shim/test/apps/lmbench
  72. make SGX=1
  73. make SGX_RUN=1
  74. make SGX_RUN=1 regression
  75. '''
  76. }
  77. sh '''
  78. cd LibOS/shim/test/apps/lighttpd
  79. make SGX=1
  80. make SGX_RUN=1
  81. make SGX_RUN=1 start-graphene-server &
  82. sleep 10
  83. ./benchmark-http.sh `hostname -I|tr -d '[:space:]'`:8000
  84. '''
  85. /*
  86. sh '''
  87. cd LibOS/shim/test/apps/apache
  88. make SGX=1
  89. make SGX_RUN=1
  90. make SGX_RUN=1 start-graphene-server &
  91. sleep 15 && ./benchmark-http.sh `hostname -I|tr -d '[:space:]'`:8001
  92. '''
  93. */
  94. }
  95. }
  96. stage('Deploy') {
  97. steps {
  98. sh 'echo Deploying code'
  99. }
  100. }
  101. }
  102. post {
  103. success {
  104. echo 'Deployment successful'
  105. }
  106. failure {
  107. echo 'Failure while on the pipeline'
  108. }
  109. unstable {
  110. echo 'Pipeline marked as "unstable"'
  111. }
  112. }
  113. }