This commit is contained in:
1 parent
01e47be7b8
commit
ffdf8d053c
1 file changed
+6
@@ -12,13 +12,19 @@ Log "host reachable, copying"
|
||||
$remote = "/tmp/prism-import"
|
||||
try {
|
||||
ssh -o BatchMode=yes -o StrictHostKeyChecking=no root@$hostIp "mkdir -p $remote" | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) { throw "remote mkdir failed" }
|
||||
scp -o BatchMode=yes -o StrictHostKeyChecking=no -r (Join-Path $base "pc-results-merged-clean") "root@${hostIp}:$remote/" | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) { throw "copy clean failed" }
|
||||
if (Test-Path (Join-Path $base "pc-results-night")) {
|
||||
scp -o BatchMode=yes -o StrictHostKeyChecking=no -r (Join-Path $base "pc-results-night") "root@${hostIp}:$remote/" | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) { throw "copy night failed" }
|
||||
}
|
||||
scp -o BatchMode=yes -o StrictHostKeyChecking=no (Join-Path $base "yealink-current-staging.yaml") "root@${hostIp}:$remote/" | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) { throw "copy yealink yaml failed" }
|
||||
scp -o BatchMode=yes -o StrictHostKeyChecking=no (Join-Path $base "other-vendors-staging.yaml") "root@${hostIp}:$remote/" | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) { throw "copy other yaml failed" }
|
||||
ssh -o BatchMode=yes -o StrictHostKeyChecking=no root@$hostIp "cd /root/buryan-infra; mkdir -p ops/combine/staging/ingest-pc-clean; cp $remote/yealink-current-staging.yaml $remote/other-vendors-staging.yaml ops/combine/staging/ingest-pc-clean/; if [ -d $remote/pc-results-night ]; then rm -rf ops/combine/staging/raw-night; cp -r $remote/pc-results-night ops/combine/staging/raw-night; fi; /opt/work-hub/venv/bin/python ops/combine/research-pack/ingest_extracted.py --in $remote/pc-results-merged-clean --out ops/combine/staging/ingest-pc-clean >> /tmp/prism-sync.log 2>&1; echo done" | Out-Null
|
||||
if ($LASTEXITCODE -ne 0) { throw "remote ingest failed" }
|
||||
Log "ingested"
|
||||
exit 0
|
||||
} catch {
|
||||
|
||||
Reference in new issue
Block a user