blob: 650beb4e7e09b044bef55352708431c64ce2546e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/env python
from os import system
from sys import argv
project = "ivory-infusion-209508"
zone = "europe-west1-b"
instance = "miaou"
def local(cmd):
print(cmd)
system(cmd)
def remote(cmd):
cmd = 'gcloud compute --project "{}" ssh --zone "{}" "{}" -- "{}"'.format(project, zone, instance, cmd)
print(cmd)
system(cmd)
def localToRemote(source, target):
remote("rm -rf target")
cmd = 'gcloud compute --project "{}" scp --zone "{}" {} {}:{}'.format(project, zone, source, instance, target)
print(cmd)
system(cmd)
#local("sbt test &")
local("python -c 'from os import system; system(\"(sbt test >> sbtTest.txt) &\")'")
#python -c 'from os import system; system("sbt test")' &
|