Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2038,10 +2038,12 @@ dependencies = [
"home",
"log",
"rlimit",
"roxmltree",
"rustc-hash 2.1.1",
"serde",
"serde_json",
"target-lexicon",
"tempfile",
"toml_edit",
"which 8.0.0",
"xshell",
Expand Down Expand Up @@ -6413,6 +6415,12 @@ dependencies = [
"libc",
]

[[package]]
name = "roxmltree"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"

[[package]]
name = "rsa"
version = "0.9.10"
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ range_map_vec = "0.2.0"
rayon = "1.5"
resolv-conf = "0.7"
rlimit = "0.10.1"
roxmltree = "0.20.0"
rsa = "0.9.10"
rusqlite = "0.37"
rustc-hash = "2.1.1"
Expand Down
2 changes: 0 additions & 2 deletions flowey/flowey_hvlite/src/pipelines/build_igvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,6 @@ impl IntoPipeline for BuildIgvmCli {
local_only: Some(flowey_lib_hvlite::_jobs::cfg_common::LocalOnlyParams {
interactive: true,
auto_install: install_missing_deps,
force_nuget_mono: false, // no oss nuget packages
external_nuget_auth: false,
ignore_rust_version: true,
}),
verbose: ReadVar::from_static(verbose),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ impl IntoPipeline for CustomVmfirmwareigvmDllCli {
local_only: Some(flowey_lib_hvlite::_jobs::cfg_common::LocalOnlyParams {
interactive: true,
auto_install: false,
force_nuget_mono: false, // no oss nuget packages
external_nuget_auth: false,
ignore_rust_version: true,
}),
verbose: ReadVar::from_static(false),
Expand Down
2 changes: 0 additions & 2 deletions flowey/flowey_hvlite/src/pipelines/restore_packages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ impl IntoPipeline for RestorePackagesCli {
local_only: Some(flowey_lib_hvlite::_jobs::cfg_common::LocalOnlyParams {
interactive: true,
auto_install: true,
force_nuget_mono: false,
external_nuget_auth: false,
ignore_rust_version: true,
}),
verbose: ReadVar::from_static(true),
Expand Down
2 changes: 0 additions & 2 deletions flowey/flowey_hvlite/src/pipelines/vmm_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ impl IntoPipeline for VmmTestsCli {
local_only: Some(flowey_lib_hvlite::_jobs::cfg_common::LocalOnlyParams {
interactive: true,
auto_install: install_missing_deps,
force_nuget_mono: false,
external_nuget_auth: false,
ignore_rust_version: true,
}),
verbose: ReadVar::from_static(verbose),
Expand Down
15 changes: 0 additions & 15 deletions flowey/flowey_hvlite/src/pipelines_shared/cfg_common_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ pub struct LocalRunArgs {
/// Don't prompt user when running certain interactive commands.
#[clap(long)]
non_interactive: bool,

/// (WSL2 only) Force the use of `mono` to download nuget packages.
#[clap(long)]
force_nuget_mono: bool,

/// Claim that nuget is using an external auth mechanism.
///
/// This will skip the check to make sure Azure Credential Provider is
/// installed.
#[clap(long)]
external_nuget_auth: bool,
}

pub type FulfillCommonRequestsParamsResolver =
Expand All @@ -50,16 +39,12 @@ fn get_params_local(
locked,
auto_install_deps,
non_interactive,
force_nuget_mono,
external_nuget_auth,
} = local_run_args.clone().unwrap_or_default();

flowey_lib_hvlite::_jobs::cfg_common::Params {
local_only: Some(flowey_lib_hvlite::_jobs::cfg_common::LocalOnlyParams {
interactive: !non_interactive,
auto_install: auto_install_deps,
force_nuget_mono,
external_nuget_auth,
ignore_rust_version: true,
}),
verbose: ReadVar::from_static(verbose),
Expand Down
2 changes: 2 additions & 0 deletions flowey/flowey_lib_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ fs-err.workspace = true
home.workspace = true
log.workspace = true
rlimit.workspace = true
roxmltree.workspace = true
rustc-hash.workspace = true
serde = { workspace = true, features = ["std"] }
serde_json = { workspace = true, features = ["std"] }
target-lexicon = { workspace = true, features = ["serde_support"] }
toml_edit.workspace = true
tempfile.workspace = true
which.workspace = true
xshell.workspace = true

Expand Down
36 changes: 0 additions & 36 deletions flowey/flowey_lib_common/src/ado_task_nuget_tool_installer.rs

This file was deleted.

61 changes: 61 additions & 0 deletions flowey/flowey_lib_common/src/ado_task_use_dotnet.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! ADO Task Wrapper: `UseDotNet@2`

use flowey::node::prelude::*;

flowey_request! {
pub struct Request {
pub version: String,
pub done: WriteVar<SideEffect>,
}
}

new_flow_node!(struct Node);

impl FlowNode for Node {
type Request = Request;

fn imports(_ctx: &mut ImportCtx<'_>) {}

fn emit(requests: Vec<Self::Request>, ctx: &mut NodeCtx<'_>) -> anyhow::Result<()> {
let mut done = Vec::new();
let mut version = None;

for req in requests {
same_across_all_reqs("version", &mut version, req.version)?;
done.push(req.done);
}

if done.is_empty() {
return Ok(());
}

let version = version.ok_or(anyhow::anyhow!("Missing essential request: version"))?;

// UseDotNet@2 requires version in the format "major.minor.x" (e.g.
// "8.0.x"), not just "8.0".
let ado_version = if version.matches('.').count() < 2 {
format!("{version}.x")
} else {
version
};

ctx.emit_ado_step("Install .NET SDK", move |ctx| {
done.claim(ctx);
move |_| {
format!(
r#"
- task: UseDotNet@2
inputs:
packageType: sdk
version: '{ado_version}'
"#
)
}
});

Ok(())
}
}
Loading
Loading