Supervise Bifrost Persona feedback deployment
This commit is contained in:
parent
ecaac7f835
commit
ed48185fb1
2 changed files with 85 additions and 1 deletions
14
scripts/deploy-yggdrasil-bifrost-persona-feedback.ps1
Normal file
14
scripts/deploy-yggdrasil-bifrost-persona-feedback.ps1
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[CmdletBinding()]
|
||||
param([string] $SshTarget = "gamecultadmin@yggdrasil.gamecult.org")
|
||||
$ErrorActionPreference = "Stop"
|
||||
if ($env:IDUNN_ACTUATOR -ne "1" -or $env:IDUNN_COMMAND_AUTHORITY -ne "idunn-daemon") {
|
||||
throw "This command is owned by Idunn's deployment actuator."
|
||||
}
|
||||
if ($env:IDUNN_DEPLOYMENT_REQUEST_ID -notmatch '^deploy:yggdrasil-bifrost-persona-feedback:.+') {
|
||||
throw "Idunn deployment request identity is absent or targets another daemon."
|
||||
}
|
||||
$requestId = $env:IDUNN_DEPLOYMENT_REQUEST_ID
|
||||
if ($requestId -notmatch '^[A-Za-z0-9._:-]+$') { throw "Idunn deployment request identity contains unsafe characters." }
|
||||
$remote = "sudo -n env IDUNN_ACTUATOR=1 IDUNN_COMMAND_AUTHORITY=idunn-daemon IDUNN_DEPLOYMENT_REQUEST_ID='$requestId' /usr/local/sbin/idunn-deploy-bifrost-persona-feedback-yggdrasil"
|
||||
& ssh.exe $SshTarget $remote
|
||||
if ($LASTEXITCODE -ne 0) { throw "Yggdrasil Bifrost Persona-feedback deployment failed with exit code $LASTEXITCODE." }
|
||||
Loading…
Reference in a new issue