microsoft/openvmm

Public

mirrored fromhttps://github.com/microsoft/openvmmAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
15e07a8246fa7bad80ef06f167641da58f4e021b

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

flowey/flowey_lib_common/src/ado_task_nuget_tool_installer.rs

35lines · modecode

1// Copyright (C) Microsoft Corporation. All rights reserved.
2
3//! ADO Task Wrapper: `NuGetToolInstaller@1`
4
5use flowey::node::prelude::*;
6
7flowey_request! {
8 pub struct Request(pub WriteVar<SideEffect>);
9}
10
11new_flow_node!(struct Node);
12
13impl FlowNode for Node {
14 type Request = Request;
15
16 fn imports(_ctx: &mut ImportCtx<'_>) {}
17
18 fn emit(requests: Vec<Self::Request>, ctx: &mut NodeCtx<'_>) -> anyhow::Result<()> {
19 ctx.emit_ado_step("Install nuget.exe", move |ctx| {
20 requests.into_iter().for_each(|x| {
21 x.0.claim(ctx);
22 });
23 move |_| {
24 // tool is known flaky, so stick a hard-coded retry count on it
25 r#"
26 - task: NuGetToolInstaller@1
27 retryCountOnTaskFailure: 3
28 "#
29 .into()
30 }
31 });
32
33 Ok(())
34 }
35}
36