fix(cli): artifact-deploy commands exit 1 when any site failed
site deploy-artifacts and deploy artifacts rendered the per-site summary and always exited 0, so a script could not tell a failed site (unreachable, missing or unreadable secret, partial apply) from a clean deploy. Both now route through the failureCount rule deploy site already used.
This commit is contained in:
@@ -222,8 +222,11 @@ public static class SiteCommands
|
||||
cmd.SetAction(async (ParseResult result) =>
|
||||
{
|
||||
var siteId = result.GetValue(siteIdOption);
|
||||
// Exit 1 when any site failed (see DeployCommands.HandleSiteDeploymentResponse).
|
||||
return await CommandHelpers.ExecuteCommandAsync(
|
||||
result, urlOption, formatOption, usernameOption, passwordOption, new MgmtDeployArtifactsCommand(siteId));
|
||||
result, urlOption, formatOption, usernameOption, passwordOption, new MgmtDeployArtifactsCommand(siteId),
|
||||
onSuccess: json => DeployCommands.HandleSiteDeploymentResponse(
|
||||
json, CommandHelpers.ResolveFormat(result, formatOption, CliConfig.Load()), "artifact deployment"));
|
||||
});
|
||||
return cmd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user