MCPcopy Create free account
hub / github.com/Qovery/engine / create_helm_diff_file

Function create_helm_diff_file

lib-engine/src/infrastructure/action/deploy_helms.rs:645–663  ·  view source on GitHub ↗
(dir_path: &Path, chart_name: &str)

Source from the content-addressed store, hash-verified

643}
644
645fn create_helm_diff_file(dir_path: &Path, chart_name: &str) -> anyhow::Result<BufWriter<File>> {
646 use std::fs::{self, OpenOptions};
647
648 let filepath = {
649 let filepath = dir_path.join("helm-diffs");
650 if !filepath.exists() {
651 fs::create_dir_all(&filepath)?;
652 }
653 filepath.join(format!("{chart_name}.diff"))
654 };
655
656 let file = OpenOptions::new()
657 .write(true)
658 .create(true)
659 .truncate(true) // This will ensure the content is overridden
660 .open(filepath)?;
661
662 Ok(BufWriter::new(file))
663}

Callers 1

deploy_chartsMethod · 0.85

Calls 2

createMethod · 0.80
writeMethod · 0.80

Tested by

no test coverage detected