Archived
1
0
Fork 0

Merge branch 'master' of ssh://cpp/liblerdorf

This commit is contained in:
Root Cpp Charlie 2013-11-03 01:19:26 +01:00
commit 2f7839952c
4 changed files with 18 additions and 10 deletions

View file

@ -111,7 +111,7 @@ if ($ref =~ m<^refs/tags/(.+)$>)
"id" => $id_project,
"rendu" => $tag,
"login" => $repo_login,
"path" => $ENV{GL_REPO_BASE_ABS}."/".$ENV{GL_REPO}.".git",
# "path" => "ssh://git@localhost/".$ENV{GL_REPO},
});
};
if ($@) {

View file

@ -100,6 +100,8 @@ sub receive_std
my $file = $args->{param}{file};
my $login = $args->{param}{login} // "ref";
log INFO, "Receiving student tarball: $login, for $year-$project_id-$rendu";
croak "No file named '$file' given" if (!exists $args->{files}{$file});
my $tempdir = tempdir(DIR => '/data/tmp');
@ -200,6 +202,7 @@ sub run_moulette
copy("$filesdir/$login.ff", "$workdir/$login.ff") or croak "Cannont copy $login.ff";
next if ($login eq "ref" && ! -f "$workdir/$login.ft");
croak "Unable to find a relevant $login.ft, abort moulette start." if (! -f "$workdir/$login.ft");
log WARN, "There is no ref for $project_id $rendu" if (! -f "$filesdir/ref.ff");

View file

@ -20,14 +20,14 @@ sub process
my $rendu = $args->{param}{rendu};
my $login = $args->{param}{login};
my $path = $args->{param}{path} // "/srv/git/repositories/$year/$project_id/$login.git";
croak "$path is not a valid path." if (! -d $path);
my $path = $args->{param}{path} // "ssh://git@localhost/$year/$project_id/$login.git";
my $tempdir = tempdir();
qx/git clone -b '$rendu' '$path' '$tempdir'/;
croak "$path is not a valid repository." if (! $?);
my $tar;
open my $fh, "tar -czf - -C '$tempdir' . |";
$tar .= $_ while(<$fh>);

View file

@ -55,12 +55,17 @@ fi
if [ "$ACTION" = "stop" ] || [ "$ACTION" = "restart" ]
then
# Kill old liblersorf screen sessions
if [ "$HOSTNAME" = "ksh" ]
then
killall screen
else
echo "$SCREEN -ls" | $SU intradmin | $GREP '[0-9]+\.lerdorf_[a-zA-Z0-9_-]+' |
while read LINE
do
SNAME=`echo $LINE | $SED "s/^[^0-9]*([0-9]+\.[^ \t]+).*$/\1/"`
echo "$SCREEN -S \"$SNAME\" -X kill" | $SU intradmin
done
fi
fi