Ignore:
Timestamp:
2014-10-01T20:24:42+13:00 (10 years ago)
Author:
ak19
Message:

Creating release binaries and not just nightly caveat binaries using envi from now on. Needed because a GS3 release bin generated on windows could not successfully build the lucene demo collection whereas in the caveat it was properly built. Caveat uses envi and release binary process doesn't. And since only the caveats are tested against the tutorials and not release binaries, we want them to go through an identical binary-generation process and have an identical environment when generated. Tested on Windows.

Location:
other-projects/nightly-tasks/snapshot/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/snapshot/trunk/aliases.txt

    r21709 r29346  
     1release
    12gs2-caveat
    23gs2-stable
  • other-projects/nightly-tasks/snapshot/trunk/lib.pl

    r28299 r29346  
    2525    }
    2626    return get_date();
     27}
     28
     29sub create_release {
     30
     31    die "Must provide parameter to create_release\n" unless (exists $_[0]);
     32   
     33    my $release_folder_name = $_[0];
     34    my $release_dir = "$ENV{'DATA_DIR'}${sep}$release_folder_name";     
     35   
     36    my $release_version = $release_folder_name;
     37    $release_version =~ s/^gs-?//;
     38    $release_version =~ s/rc\d$//;
     39    my $major_version = $release_version;
     40    $major_version =~ s/^(3|2).*/$1/;   
     41    $release_version =~ s/^($major_version)\.?(\d*).*/$1.$2/;
     42    my $rk = "rk".$major_version;
     43   
     44    my $release_version_extra;
     45    if ($release_folder_name =~ m/(rc\d)$/) {
     46        $release_version_extra = $1;
     47    }
     48    if ($release_folder_name !~ m/^gs/) { # prefix gs
     49        $release_folder_name = "gs".$release_folder_name;
     50    }
     51   
     52    print "major_version: $major_version\n";
     53    print "version: $release_version\n";
     54    print "versionextra: $release_version_extra\n";
     55    print "release_folder_name: $release_folder_name\n";   
     56   
     57    print "about to clean up old snapshots (Ctrl-C to cancel)";
     58    local $| = 1;
     59    for ( my $i=0; $i<5; $i++ ) {
     60        print ".";
     61        sleep 1;
     62    }
     63    $| = 0;
     64
     65    print "cleaning up previous release snapshot $release_dir\n";
     66   
     67    if(-d $release_dir) {
     68        if ( $^O eq "MSWin32" ) {
     69            system("rd /q /s \"$release_dir\"");
     70        } else {
     71            system("rm -rf \"$release_dir\"");
     72        }
     73    }
     74       
     75    print "creating the release dir\n";
     76    mkdir $release_dir or die "couldn't create release directory\n";
     77
     78    print "changing to the release dir\n";
     79    chdir $release_dir;
     80
     81    #version property
     82    print "setting up todays properties\n";
     83    `echo version:$release_version> $rk-build.properties`;
     84
     85    if($release_version_extra) {
     86        `echo version-extra:$release_version_extra>> $rk-build.properties`;
     87    }   
     88   
     89    #processor propertylocal $| = 1;
     90    if ( $^O eq "darwin" ) {
     91        print "setting processor\n";
     92        if ( `uname -p` eq "i386" ) {
     93            `echo processor:intel>> $rk-build.properties`;
     94        } elsif ( `uname -p` eq "powerpc" ) {
     95            `echo processor:ppc>> $rk-build.properties`;
     96        } else {
     97            print "unable to determine processor type, using intel\n";
     98            `echo processor:intel>> $rk-build.properties`;
     99        }
     100    } elsif ( $^O eq "linux" ) {
     101        if(`uname -m` =~ m/64$/) {
     102            print "Setting linux architecture to 64 bit";
     103            `echo x64:true>> $rk-build.properties`;
     104        }       
     105    }
     106
     107    #branch path property
     108    if ( $ENV{'branch_path'} ) {
     109        `echo branch.path:$ENV{'branch_path'}>> $rk-build.properties`;
     110    }
     111
     112    #server.exe.location
     113    if ( $major_version eq "2" && exists $ENV{'SERVER_EXE_LOCATION'} ) {
     114        `echo server.exe.location:$ENV{'SERVER_EXE_LOCATION'}>> $rk-build.properties`;
     115    }
     116
     117    print "creating the snapshot using $rk\n";
     118    system( $rk );
    27119}
    28120
  • other-projects/nightly-tasks/snapshot/trunk/task.pl

    r28321 r29346  
    4949
    5050#choose the parameters of the build based on the task name
    51 if ( $ENV{'TASK_NAME'} =~ "gs2-(caveat|stable)" ) {
     51if ( $ENV{'TASK_NAME'} =~ "release" ) { # run as release 306rc1 (or as different as gs-3.06-rc1)
     52    if(exists $ARGV[0] && $ARGV[0] =~ m/^(gs-?)?(3|2)\.?\d\d+-?rc\d$/) {       
     53        create_release($ARGV[0]);
     54        exit;
     55    } else {
     56        die "Run snapshot task with gs<full-version>[rc#]\n";
     57    }   
     58} elsif ( $ENV{'TASK_NAME'} =~ "gs2-(caveat|stable)" ) {
    5259    $major_version = 2;
    5360    $prefix="2s";
Note: See TracChangeset for help on using the changeset viewer.