From e623e4e710ad445b8b72b5822358478b22c48da9 Mon Sep 17 00:00:00 2001 From: Neil Davis Date: Wed, 8 Nov 2017 15:30:31 -0500 Subject: [PATCH] Jenkins (#91) * Added Jenkinsfile for testing * Got rid of sudo * Adding new Jenkinsfile for testing Jenkins * Edit to Test stage for Python pipeline * Fixed a name typo * Added new line to check the directory in the new stage * Add commands to return to directory to execute files * Added sudo to execute manifest file * Testing a modifier * Fixed option from sudo to sh * Got rid of sh options flag * Rewrote commands to run the Python code * Testing to see if ./python-manifest executes * Testing to see if ./python-manifest executes * Testing Jenkinsfile-Python * Testing Jenkinsfile-Python * Testing Jenkins-Python * Testing Jenkins-Python * Checking how sh commands work * Initializing make * Testing file * Testing file * Testing file * Jenkinsfile for LMBench tests * Jenkinsfile for GCC * Jenkinsfile for GCC * Jenkinsfile for GCC * Jenkinsfile for GCC * Got rid of ./gcc-huge.manifest * First SGX file for Python * Adding lines to support keys * Adding lines to support keys * Chanaged the ordering to make * Chanaged the ordering to make * Checking variables in Makefile * Add a print statement * Print out SAVED and BUILD Target variables * Print out SAVED in a different part of the code in order to see output in a different context * Change print location of SAVED_TARGET * Change print location of SAVED_TARGET * Change print location of SAVED_TARGET * Edit Makefile to see if SAVED_TARGET is assigned when not running SGX=1 *this is only meant to run the build stage* * Testing Jenkinsfile after installing Intel SGX * Got rid of ifndef for SAVED_TARGET * Adding an environmental variable * Adding an environmental variable * Removed environment variable * Testing use of 'sh' commands * Testing use of 'sh' commands * Testing use of 'sh' commands * Changed ordering of sh executions * Add regression to make for Python files * Add regression to make for all files * Removed the 'regression' terms after make, running 'make regression' didn't work * Initializing Apache Jenkinsfile * Initializing Lighttpd Jenkinsfile * Initializing Lighttpd Jenkinsfile * Added regression * Run regression * Moved all Jenkinsfiles into their own directory * Added LMBench into the code for testing * Edited error in specifying directory for LMBench * Added background process for the server * Added 'make regression' * Changed client execution file on line 18 * Added background process for Apache * Output the host and port after bulding Lighttpd * Removed specifying the IP and Port * Added output of a manifest file * Added output of a manifest file * Added output of lighttpd-server.conf file * Combined IP address and port on line 18 * Added tests for lighttpd and apache * Removed unnecessary files and added files to ignore in .gitignore * Modifications to Makefile * Removed logging in Pal/src/Makefile * Removed my Makefile * Put Makefile back in * Reinserted contents of Makefile from main repository * Revert "Reinserted contents of Makefile from main repository" This reverts commit d36508709ab38489ae1fc939859e7952b8d56cd9. * Added new tests for non-SGX Jenkinsfile * Added DEBUG=1 to make command * Fixed Makefile spacing errors --- .gitignore | 2 ++ Jenkinsfiles/Jenkinsfile | 71 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 Jenkinsfiles/Jenkinsfile diff --git a/.gitignore b/.gitignore index f29f06e4..1f3e8bc4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /Runtime/ *~ +/Jenkinsfiles/Jenkinsfile-* +/Jenkinsfiles/JenkinsfileSGX-* diff --git a/Jenkinsfiles/Jenkinsfile b/Jenkinsfiles/Jenkinsfile new file mode 100644 index 00000000..842973d0 --- /dev/null +++ b/Jenkinsfiles/Jenkinsfile @@ -0,0 +1,71 @@ +pipeline { + agent any + stages { + stage('Build') { + steps { + sh ''' + make DEBUG=1 + ''' + } + } + stage('Test') { + steps { + sh ''' + cd LibOS/shim/test/apps/gcc + make regression + ''' + sh ''' + cd LibOS/shim/test/apps/lmbench + make regression + ''' + sh ''' + cd LibOS/shim/test/apps/python + make regression + ''' + sh ''' + cd LibOS/shim/test/apps/lighttpd + make + make start-graphene-server & + ./benchmark-http.sh 127.0.0.1:8000 + ''' + sh ''' + cd LibOS/shim/test/apps/apache + make + make start-graphene-server & + ./benchmark-http.sh 127.0.0.1:8000 + ''' + sh ''' + cd Pal/regression + make regression + ''' + sh ''' + cd LibOS/shim/test/regression + make regression + ''' + sh ''' + cd LibOS/shim/test/apps/ltp + make + ./syscalls.sh + ''' + input 'Tests complete. Do you wish to deploy?' + } + } + stage('Deploy') { + steps { + sh 'echo Deploying code' + } + } + } + post { + success { + echo 'Deployment successful' + } + failure { + echo 'Failure while on the pipeline' + } + unstable { + echo 'Pipeline marked as "unstable"' + } + } +} +