new manifest

This commit is contained in:
Jeff Carr 2018-06-07 14:32:46 -07:00
parent a242d52daf
commit 228183eb8a
2 changed files with 127 additions and 0 deletions

38
MANIFEST Executable file
View File

@ -0,0 +1,38 @@
https://github.com/coredns/unbound cloud/coredns-unbound
https://github.com/miekg/unbound.git cloud/coredns-miekg-unbound
https://github.com/ethereum-mining/ethminer.git crypto/mining-code/ethminer
https://github.com/ethereum/cpp-ethereum crypto/mining-code/cpp-ethereum
https://github.com/vthoang/cgminer.git crypto/mining-code/cgminer-vthoang
https://github.com/ckolivas/cgminer.git crypto/mining-code/cgminer-ckolivas
https://github.com/zcash/zcash.git crypto/mining-code/zcash
https://github.com/nicehash/sgminer.git crypto/mining-code/nicehash-sgminer
https://github.com/ReconfigureIO/examples fpga/ReconfigureIO-examples
https://github.com/anoek/webrtc-group-chat-example.git webrtc-group-chat-example
git@git.wit.com:wit/ping.wit.com.git ping.wit.com
git@git.wit.com:wit/resumes.git resumes
git@git.wit.com:wit/witcoin.git witcoin
git@git.wit.com:wit/witchain witchain
git@git.wit.com:kieran/witPhoneAndroid.git witPhoneAndroid
git@git.wit.com:Crypto-ICO/mining-binaries.git mining-binaries
git@git.wit.com:Crypto-ICO/realtime-crypto-data.git realtime-crypto-data
git@git.wit.com:Crypto-ICO/VirtexEval.git VirtexEval
git@git.wit.com:Crypto-ICO/gpupoller gpupoller
git@git.wit.com:jcarr/check.jcarr.wit.com.git check.jcarr.wit.com
git@git.wit.com:jcarr/1200-hugo-xmin.git 1200-hugo-xmin
git@git.wit.com:jcarr/1201-hugo-ananke.git 1201-hugo-ananke
git@git.wit.com:jcarr/1202-hugo-jefftest.git 1202-hugo-jefftest
git@git.wit.com:jcarr/3000-simple-trello.git 3000-simple-trello
git@git.wit.com:jcarr/8443-webrtc-example.git 8443-webrtc-example
git@git.wit.com:jcarr/jcarr-machine-check.git jcarr-machine-check
git@git.wit.com:jcarr/repo.git repo
git@git.wit.com:jcarr/bind9dnssec.git bind9dnssec
git@git.wit.com:jcarr/witcoredns.git witcoredns
git@git.wit.com:jcarr/old.db.wit.com old.db.wit.com
git@git.wit.com:jcarr/benchmarks benchmarks

89
update.pl Executable file
View File

@ -0,0 +1,89 @@
#!/usr/bin/perl
$STAMP=`date +%Y.%m.%d.%H%M%S`;
chomp $STAMP;
# find gogs:
# kubectl -n cloud-wit get pods
# kubectl -n cloud-wit describe pod gogs-7596dddd7-7j6zb # the old one? now it's:
# kubectl -n cloud-wit describe pod gogs-fbf5fd88f-9v45z
# kubectl -n cloud-wit get pv |grep gogs
#
sub my_system {
my $cmd = join " ", @_;
chomp $cmd;
print "$cmd\n";
if ($ARGV[0] ne "--dry-run") {
$return = system $cmd;
if ($return eq 2) {
print "SYSTEM RETURNED $return\n";
exit;
}
}
}
sub gitrepo {
my ($base, $name, $repo) = @_;
# print "$base,$name,$repo\n";
if (! -d "$base") {
my_system "mkdir -p $base/$dir\n";
}
if (-d "$base/$name") {
my_system "cd $base/$name; git pull\n";
} else {
my_system "cd $base; git clone $repo $name\n";
}
if ($ARGV[0] ne "--dry-run") {
if (! -d "$base/$name/.git") {
print "GIT FAILED for $repo\n";
my_system "rmdir $base/$name" if -d "$base/$name";
}
}
}
$basedir = `pwd`;
chomp $basedir;
if ($ARGV[0] eq "rsync") {
my_system("tar -c --use-compress-program=pigz -f archive.gogs.$STAMP.tgz mirrored-gogs/git/gogs-repositories/");
my_system("tar -c --use-compress-program=pigz -f archive.ping.$STAMP.tgz mirrored-ping/");
my_system("rsync -av --progress --delete vm10:/var/lib/kubelet/plugins/kubernetes.io/rbd/mounts/kube-pool-image-kubernetes-dynamic-pvc-7a6428c8-376e-11e8-85ad-0a580af40662/ mirrored-gogs/");
my_system("rsync -av --progress --delete mirrored-gogs/git/gogs-repositories/ gitweb:/var/lib/git/gogs/");
exit;
}
@lines = split "\n", `cat MANIFEST`;
foreach $line (@lines) {
my ($repo, $tmp) = split / +/, $line;
next if $repo eq "";
my @dirs = split /\//, $tmp;
my $name = pop @dirs;
my $dir = join '/', @dirs;
if ( 'git/' eq substr $repo, 0, 4 ) {
gitrepo ("cloned-ping/$dir", $name, "ssh://root\@ping.wit.com/var/lib/$repo");
# } elsif ( 'git@github.com:witst' eq substr $repo, 0, 20 ) {
# gitrepo ("cloned-github/$dir", $name, $repo);
} elsif ( 'git@git.wit.com' eq substr $repo, 0, 15 ) {
gitrepo ("cloned-jcarr/$dir", $name, $repo);
} else {
# print "$path, $dir\n";
}
}
foreach $dir (`ls mirrored-gogs/git/gogs-repositories/`) {
chomp $dir;
# print "$dir\n";
if (! -d "cloned-gogs/$dir") {
my_system "mkdir -p cloned-gogs/$dir\n";
}
foreach $name (`ls mirrored-gogs/git/gogs-repositories/$dir`) {
chomp $name;
next if ".git" ne substr $name, -4;
$name = substr $name, 0, -4;
gitrepo ("cloned-gogs/$dir", $name, "git\@git.wit.com:$dir/$name");
}
}