Changeset 24272
- Timestamp:
- 10/24/19 20:58:34 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/jenkins/jenkins.sh ¶
r24271 r24272 1 1 #!/bin/bash 2 #This bash script calls the nightlyrun.m matlab file to run our nightly test decks. 3 #It then processes the results and sends an email to the Ice developpers. 2 ################################################################################ 3 # This bash script manages installation of ISSM on a given Jenkins node using a 4 # configuration file passed as the only argument. This file also contains 5 # details about which nightly run tests should be executed after the build has 6 # been completed. Finally, results of the build and tests are emailed to the 7 # members of the ISSM development team. 8 # 9 # TODO: 10 # - Rename TEMP to something more descriptive 11 # - Ensure first that other parts of the build system do not rely on this 12 # name 13 # - Investigate refactoring parsing of list of changed files 14 ################################################################################ 4 15 5 16 echo "Cleaning up execution directory" … … 53 64 echo "Current revision number: $SVN_CURRENT" 54 65 55 #Get changes from jenkins itself (svn requires credentials) 66 # Get list of changed files 67 # 68 56 69 #svn --non-interactive --no-auth-cache --trust-server-cert diff -r $SVN_PREVIOUS:$SVN_CURRENT --summarize $ISSM_DIR | awk '{print $NF}' > $ISSM_DIR/TEMP 70 71 # Get list of changes from Jenkins itself as svn requires credentials 57 72 rm -rf changes 58 73 wget $SERVER/job/$JOB_NAME/$BUILD_NUMBER/changes > /dev/null 2>&1 59 74 60 # Process html page and get the list of files that has changed (tricky...)75 # Process html page and get the list of files that has changed (tricky...) 61 76 #cat changes | grep '="The file was modified"' | sed -e 's/.*<\/td><td><a>\(.*\)<\/a><\/td><td>.*/\1/' > $ISSM_DIR/TEMP 62 77 #cat changes | grep 'document_edit' |sed -e 's/document_edit.png/document_edit.png\ 63 78 #/g' | sed -e 's/.*<\/a><\/td><td>\(.*\)<\/td><\/tr>.*/\1/' | grep -v 'document_edit.png' > $ISSM_DIR/TEMP 64 cat changes | tr " " "\n" | grep trunk | 65 66 # Print list offiles79 cat changes | tr " " "\n" | grep trunk | sed -e 's/.*<a>\(.*\)<\/a>.*/\1/' > $ISSM_DIR/TEMP 80 81 # Print list of changed files 67 82 echo " " 68 83 echo "List of updated files" … … 70 85 echo " " 71 86 72 #Do we need to reinstall externalpackages? 87 ################################### 88 ### Determine installation type ### 89 ################################### 73 90 echo "Determining installation type" 91 92 # If the contents of the externalpackages directory were modified in any 93 # way, check for changed external packages 74 94 if [ ! -z "$(cat $ISSM_DIR/TEMP | grep externalpackages)" ] ; then 75 95 echo " -- checking for changed externalpackages... yes"; … … 80 100 fi 81 101 82 #Do we need to reconfigure 102 # If the Makefile or m4 diirectory were changed in any way or if certain 103 # binary files from a previous compilation do not exist, reconfigure 83 104 if [ ! -z "$(cat $ISSM_DIR/TEMP | grep -e "Makefile.am" -e "m4" )" ] || 84 [ ! -f "$ISSM_DIR/bin/issm.exe" ] ||105 [ ! -f "$ISSM_DIR/bin/issm.exe" ] && [ ! -f "$ISSM_DIR/bin/issm-bin.js" ] || 85 106 [ "$ISSM_EXTERNALPACKAGES" == "yes" ] ; 86 107 then … … 92 113 fi 93 114 94 # Do we need torecompile115 # If source files were changed in any way, recompile 95 116 if [ ! -z "$(cat $ISSM_DIR/TEMP | grep -e "\.cpp" -e "\.h" )" ] || 96 117 [ "$ISSM_RECONFIGURE" == "yes" ] ; … … 102 123 ISSM_COMPILATION="no" 103 124 fi 104 #ISSM_COMPILATION="yes" 125 126 # Cleanup 105 127 rm changes 106 128 rm $ISSM_DIR/TEMP 107 108 129 else 109 130 echo "Previous revision not found, this must be a fresh install" … … 115 136 ISSM_COMPILATION="yes" 116 137 fi 138 117 139 echo " " 118 140 echo "Recording current svn version: $SVN_REVISION_1"
Note:
See TracChangeset
for help on using the changeset viewer.