feat: add ability to actually publish
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
23
crates/flux-releaser/src/services/cluster_list.rs
Normal file
23
crates/flux-releaser/src/services/cluster_list.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ClusterList {}
|
||||
|
||||
impl ClusterList {
|
||||
pub async fn get_list(&self) -> anyhow::Result<HashMap<String, Vec<String>>> {
|
||||
Ok(HashMap::from([
|
||||
("dev".into(), vec!["clank-dev".into()]),
|
||||
("prod".into(), vec!["clank-prod".into()]),
|
||||
]))
|
||||
}
|
||||
|
||||
pub async fn get(&self, environment: &str) -> anyhow::Result<Option<Vec<String>>> {
|
||||
let list = self.get_list().await?;
|
||||
|
||||
if let Some(x) = list.get(environment) {
|
||||
Ok(Some(x.clone()))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user