Skip to content

Commit

Permalink
final paper cuts for info messages
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Detjens <[email protected]>
  • Loading branch information
detjensrobert committed Feb 8, 2025
1 parent 368d466 commit 5a7f594
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions src/commands/deploy.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use itertools::Itertools;
use simplelog::*;
use std::process::exit;

Expand Down Expand Up @@ -31,6 +32,11 @@ pub async fn run(profile_name: &str, no_build: &bool, _dry_run: &bool) {
}
};

trace!(
"got built results: {:#?}",
build_results.iter().map(|b| &b.1).collect_vec()
);

// deploy needs to:
// A) render kubernetes manifests
// - namespace, deployment, service, ingress
Expand All @@ -41,21 +47,18 @@ pub async fn run(profile_name: &str, no_build: &bool, _dry_run: &bool) {
// C) update frontend with new state of challenges

// A)
info!("deploying challenges...");
if let Err(e) = deploy::kubernetes::deploy_challenges(profile_name, &build_results).await {
error!("{e:?}");
exit(1);
}

// B)
info!("uploading assets...");
if let Err(e) = deploy::s3::upload_assets(profile_name, &build_results).await {
error!("{e:?}");
exit(1);
}

// A)
info!("updating frontend...");
// C)
if let Err(e) = deploy::frontend::update_frontend(profile_name, &build_results).await {
error!("{e:?}");
exit(1);
Expand Down
2 changes: 1 addition & 1 deletion src/deploy/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub async fn upload_assets(
try_join_all(build_results.iter().map(|(chal, result)| async move {
// upload all files for a specific challenge

debug!("uploading assets for chal {:?}", chal.directory);
info!(" for chal {:?}...", chal.directory);

let uploaded = try_join_all(result.assets.iter().map(|asset_file| async move {
upload_single_file(bucket, chal, asset_file)
Expand Down

0 comments on commit 5a7f594

Please sign in to comment.