Add --once argument, which should cause the agent to never try to run a second job

This commit is contained in:
Matt Galbraith 2020-03-12 13:12:18 -07:00
Родитель a8407009a2
Коммит 38a7e54d29
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -36,7 +36,7 @@ cp -f -r $HELIX_CORRELATION_PAYLOAD/* $workspace_path
cp -f $HELIX_WORKITEM_PAYLOAD/.agent $workspace_path
cp -f $HELIX_WORKITEM_PAYLOAD/.credentials $workspace_path
$workspace_path/run.sh
$workspace_path/run.sh --once
# Expect an exit code of 2, which is what is given when the agent connection is revoked
lastexitcode=$?

Просмотреть файл

@ -35,7 +35,7 @@ mkdir %WORKSPACEPATH%
xcopy /Y /S /I %HELIX_CORRELATION_PAYLOAD%\* %WORKSPACEPATH%
copy /Y %HELIX_WORKITEM_PAYLOAD%\.agent %WORKSPACEPATH%
copy /Y %HELIX_WORKITEM_PAYLOAD%\.credentials %WORKSPACEPATH%
call %WORKSPACEPATH%\run.cmd
call %WORKSPACEPATH%\run.cmd --once
set LASTEXITCODE=%errorlevel%