mirror of
https://github.com/serokell/deploy-rs.git
synced 2024-11-26 08:09:53 +03:00
Add more debug logs
This commit is contained in:
parent
7ec0bc21cd
commit
df002c31a6
@ -73,7 +73,6 @@ struct Opts {
|
||||
temp_path: Option<String>,
|
||||
}
|
||||
|
||||
#[inline]
|
||||
async fn push_all_profiles(
|
||||
node: &utils::data::Node,
|
||||
node_name: &str,
|
||||
@ -190,6 +189,8 @@ async fn deploy_all_profiles(
|
||||
/// Returns if the available Nix installation supports flakes
|
||||
#[inline]
|
||||
async fn test_flake_support() -> Result<bool, Box<dyn std::error::Error>> {
|
||||
debug!("Checking for flake support");
|
||||
|
||||
Ok(Command::new("nix")
|
||||
.arg("eval")
|
||||
.arg("--expr")
|
||||
@ -202,6 +203,8 @@ async fn test_flake_support() -> Result<bool, Box<dyn std::error::Error>> {
|
||||
}
|
||||
|
||||
async fn check_deployment(supports_flakes: bool, repo: &str, extra_build_args: &[String]) -> () {
|
||||
info!("Running checks for flake in {}", repo);
|
||||
|
||||
let mut c = match supports_flakes {
|
||||
true => Command::new("nix"),
|
||||
false => Command::new("nix-build"),
|
||||
|
@ -106,6 +106,8 @@ pub async fn deploy_profile(
|
||||
magic_rollback,
|
||||
);
|
||||
|
||||
debug!("Constructed activation command: {}", self_activate_command);
|
||||
|
||||
let hostname = match deploy_data.cmd_overrides.hostname {
|
||||
Some(ref x) => x,
|
||||
None => &deploy_data.node.node_settings.hostname,
|
||||
@ -146,6 +148,11 @@ pub async fn deploy_profile(
|
||||
confirm_command = format!("{} {}", sudo_cmd, confirm_command);
|
||||
}
|
||||
|
||||
debug!(
|
||||
"Attempting to run command to confirm deployment: {}",
|
||||
confirm_command
|
||||
);
|
||||
|
||||
let ssh_exit_status = ssh_confirm_command.arg(confirm_command).status().await?;
|
||||
|
||||
if !ssh_exit_status.success() {
|
||||
|
Loading…
Reference in New Issue
Block a user