Linux-SGX 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 WERROR=1
  27. '''
  28. sh '''
  29. make SGX_RUN=1
  30. '''
  31. }
  32. }
  33. stage('Test') {
  34. steps {
  35. timeout(time: 15, unit: 'MINUTES') {
  36. sh '''
  37. cd Pal/regression
  38. make SGX=1
  39. make SGX_RUN=1
  40. make SGX_RUN=1 KEEP_LOG=1 regression
  41. '''
  42. }
  43. timeout(time: 5, unit: 'MINUTES') {
  44. sh '''
  45. cd LibOS/shim/test/regression
  46. make SGX=1
  47. make SGX_RUN=1
  48. make SGX_RUN=1 regression
  49. '''
  50. }
  51. timeout(time: 5, unit: 'MINUTES') {
  52. sh '''
  53. cd LibOS/shim/test/apps/python
  54. make SGX=1
  55. make SGX_RUN=1
  56. make SGX_RUN=1 regression
  57. '''
  58. }
  59. timeout(time: 5, unit: 'MINUTES') {
  60. sh '''
  61. cd LibOS/shim/test/apps/bash
  62. make SGX=1
  63. make SGX_RUN=1
  64. make SGX_RUN=1 regression
  65. '''
  66. }
  67. timeout(time: 5, unit: 'MINUTES') {
  68. sh '''
  69. cd LibOS/shim/test/apps/gcc
  70. make SGX=1
  71. make SGX_RUN=1
  72. make SGX_RUN=1 regression
  73. '''
  74. }
  75. timeout(time: 15, unit: 'MINUTES') {
  76. sh '''
  77. cd LibOS/shim/test/apps/lmbench
  78. make SGX=1
  79. make SGX_RUN=1
  80. make SGX_RUN=1 regression
  81. '''
  82. }
  83. sh '''
  84. cd LibOS/shim/test/apps/lighttpd
  85. make SGX=1
  86. make SGX_RUN=1
  87. make SGX_RUN=1 start-graphene-server &
  88. sleep 10
  89. ./benchmark-http.sh `hostname -I|tr -d '[:space:]'`:8000
  90. '''
  91. /*
  92. sh '''
  93. cd LibOS/shim/test/apps/apache
  94. make SGX=1
  95. make SGX_RUN=1
  96. make SGX_RUN=1 start-graphene-server &
  97. sleep 15 && ./benchmark-http.sh `hostname -I|tr -d '[:space:]'`:8001
  98. '''
  99. */
  100. }
  101. }
  102. stage('Deploy') {
  103. steps {
  104. sh 'echo Deploying code'
  105. }
  106. }
  107. }
  108. post {
  109. success {
  110. echo 'Deployment successful'
  111. }
  112. failure {
  113. echo 'Failure while on the pipeline'
  114. }
  115. unstable {
  116. echo 'Pipeline marked as "unstable"'
  117. }
  118. }
  119. }