forked from NationTech/harmony
fix: make sure demo works on both local & remote target (#107)
* define Ntfy ingress (naive implementation) based on current target * use patched Ntfy Helm Chart * create Ntfy main user only if needed * add info logs * better error bubbling * instrument feature installations * upgrade prometheus alerting charts if already installed * harmony_composer params to control deployment `target` and `profile` Co-authored-by: Ian Letourneau <letourneau.ian@gmail.com> Co-authored-by: Jean-Gabriel Gill-Couture <jg@nationtech.io> Reviewed-on: NationTech/harmony#107
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
use harmony_cli::progress::{IndicatifProgressTracker, ProgressTracker};
|
||||
use indicatif::MultiProgress;
|
||||
use log::error;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::instrumentation::{self, HarmonyComposerEvent};
|
||||
@@ -53,15 +52,13 @@ pub async fn handle_events() {
|
||||
progress_tracker.finish_task(COMPILTATION_TASK, "project compiled");
|
||||
}
|
||||
HarmonyComposerEvent::ProjectCompilationFailed { details } => {
|
||||
progress_tracker.fail_task(COMPILTATION_TASK, "failed to compile project");
|
||||
|
||||
error!("{details}");
|
||||
progress_tracker.fail_task(COMPILTATION_TASK, &format!("failed to compile project:\n{details}"));
|
||||
}
|
||||
HarmonyComposerEvent::DeploymentStarted { target } => {
|
||||
HarmonyComposerEvent::DeploymentStarted { target, profile } => {
|
||||
progress_tracker.add_section(
|
||||
PROGRESS_DEPLOYMENT,
|
||||
&format!(
|
||||
"\n{} Deploying project to {target}...\n",
|
||||
"\n{} Deploying project on target '{target}' with profile '{profile}'...\n",
|
||||
harmony_cli::theme::EMOJI_DEPLOY,
|
||||
),
|
||||
);
|
||||
@@ -69,6 +66,10 @@ pub async fn handle_events() {
|
||||
HarmonyComposerEvent::DeploymentCompleted => {
|
||||
progress_tracker.clear();
|
||||
}
|
||||
HarmonyComposerEvent::DeploymentFailed { details } => {
|
||||
progress_tracker.add_task(PROGRESS_DEPLOYMENT, "deployment-failed", "");
|
||||
progress_tracker.fail_task("deployment-failed", &details);
|
||||
},
|
||||
HarmonyComposerEvent::Shutdown => {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user