Changeset 16661


Ignore:
Timestamp:
11/07/13 14:33:12 (11 years ago)
Author:
Eric.Larour
Message:

CHG: adding a new capability to skip externalpackage install if nothing was modified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/jenkins/jenkins.sh

    r16651 r16661  
    9898
    9999                cd $PACKAGENAME
    100                 echo "======================================================";
    101                 echo "       Installing $PACKAGENAME                        ";
    102                 echo "======================================================";
    103                 ./$PACKAGEINST |  tee compil.log
    104                 if [ $? -ne 0 ]; then
     100
     101                #tricky part here. We do not want to reinstall this package if it's already installed
     102                #and the svn file which does the install has not be modified! To keep track of
     103                #this, we check the current svn version against the "last changed" revision number.  If they
     104                #are the same, we reinstall the package.
     105                current_version=`svnversion $PACKAGEINST`
     106                last_changed_version=`svn info $PACKAGEINST | grep "Last Changed Rev" | awk '{printf("%s\n",$4);}'`
     107
     108                if [[ $current_version == $last_changed_version ]]; then
     109                        #go ahead and reinstall.
    105110                        echo "======================================================";
    106                         echo "    ERROR: installation of $PACKAGENAME failed        ";
     111                        echo "       Installing $PACKAGENAME                        ";
     112                        echo "======================================================";
     113                        ./$PACKAGEINST |  tee compil.log
     114                        if [ $? -ne 0 ]; then
     115                                echo "======================================================";
     116                                echo "    ERROR: installation of $PACKAGENAME failed        ";
     117                                echo "======================================================";
     118                        fi
     119                        source $ISSM_DIR/etc/environment.sh
     120                else
     121                        echo "======================================================";
     122                        echo "       Skipping install of $PACKAGENAME                        ";
    107123                        echo "======================================================";
    108124                fi
    109                 source $ISSM_DIR/etc/environment.sh
    110125                cd ..
    111126        done
Note: See TracChangeset for help on using the changeset viewer.