diff --git a/master_sync.toml b/master_sync.toml index be0fa84..c815cff 100644 --- a/master_sync.toml +++ b/master_sync.toml @@ -143,14 +143,6 @@ additional_env_files = ["stack.env"] ## -[[stack]] -name = "repoflow" -[stack.config] -server = "unraid" -linked_repo = "compose-repoflow" - -## - [[stack]] name = "resilio-sync" [stack.config] @@ -691,7 +683,6 @@ branch = "master" [[procedure]] name = "Image Pull" config.schedule_timezone = "America/New_York" -config.schedule = "every day at 2:00 AM" [[procedure.config.stage]] name = "Stage 1 - Update All Images" @@ -702,6 +693,39 @@ executions = [ ## +[[action]] +name = "Deploy if Changed" +[action.config] +file_contents = """ +// Same as BatchDeployStacksIfChanged, but with an exclusion filter +console.log('Deploying all non-excluded stacks...\n'); + +// Get Tag Id. The API should throw if it's not found, but we employ safety checks just in case +const exclusionTagId = (await komodo.read("GetTag", { tag: "ad-hoc" }))?._id?.$oid ?? null; // YOUR TAG HERE +if (!exclusionTagId) + console.log('Exclusion tag not found!\n'); + +// Deploy all stacks, minus the excluded ones +const allStacks = await komodo.read("ListStacks", {}); +for(const stack of allStacks) { + const name = stack.name; + const id = stack.id; + const tags = stack.tags; + + if(tags.includes(exclusionTagId)) { + console.log('Skipping stack', name, '(excuded)') + continue; + } + + console.log('Deploying', name) + await komodo.execute("DeployStackIfChanged", { + stack: id, + }); +} +""" + +## + [[builder]] name = "local" [builder.config]