feat: make org defaults overridable via .munitor.yml org section #1

Merged
KofTwentyTwo merged 1 commits from feature/org-agnostic-defaults into develop 2026-03-18 17:40:13 +00:00
5 changed files with 25 additions and 24 deletions

No files matched your search

+5 -4
View File
@@ -1,10 +1,11 @@
version: 2.1
description: >
Munitor (Latin: fortifier, protector) -- KofTwentyTwo's unified CircleCI orb
for building, testing, and deploying all repositories. Provides standardized
CI/CD pipelines via dynamic configuration so each repo needs only a tiny
.munitor.yml to define its pipeline.
Munitor (Latin: fortifier, protector) -- a unified CircleCI orb for building,
testing, and deploying repositories. Provides standardized CI/CD pipelines via
dynamic configuration so each repo needs only a tiny .munitor.yml to define
its pipeline. Org-agnostic: override defaults via the optional org section in
.munitor.yml.
display:
home_url: https://github.com/KofTwentyTwo/Munitor
+6 -6
View File
@@ -12,12 +12,12 @@ extract_munitor_vars() {
return 1
fi
# --- Org defaults (change this block when forking for another org) ---
local ORG_DOCKER_REGISTRY="ghcr.io/KofTwentyTwo"
local ORG_NPM_SCOPE="@koftwentytwo"
local ORG_CI_EMAIL="munitor-ci@koftwentytwo.com"
local ORG_CI_NAME="Munitor CI"
local ORG_ORB_SLUG="kof22/munitor"
# --- Org defaults (overridable via .munitor.yml org section) ---
local ORG_DOCKER_REGISTRY=$(yq '.org.docker_registry // "ghcr.io/KofTwentyTwo"' "${config_file}")
local ORG_NPM_SCOPE=$(yq '.org.npm_scope // "@koftwentytwo"' "${config_file}")
local ORG_CI_EMAIL=$(yq '.org.ci_email // "munitor-ci@koftwentytwo.com"' "${config_file}")
local ORG_CI_NAME=$(yq '.org.ci_name // "Munitor CI"' "${config_file}")
local ORG_ORB_SLUG=$(yq '.org.orb_slug // "kof22/munitor"' "${config_file}")
# Core pipeline settings
MUNITOR_PIPELINE=$(yq '.pipeline' "${config_file}")
+6 -6
View File
@@ -109,12 +109,12 @@ extract_munitor_vars() {
return 1
fi
# --- Org defaults (change this block when forking for another org) ---
local ORG_DOCKER_REGISTRY="ghcr.io/KofTwentyTwo"
local ORG_NPM_SCOPE="@koftwentytwo"
local ORG_CI_EMAIL="munitor-ci@koftwentytwo.com"
local ORG_CI_NAME="Munitor CI"
local ORG_ORB_SLUG="kof22/munitor"
# --- Org defaults (overridable via .munitor.yml org section) ---
local ORG_DOCKER_REGISTRY=$(yq '.org.docker_registry // "ghcr.io/KofTwentyTwo"' "${config_file}")
local ORG_NPM_SCOPE=$(yq '.org.npm_scope // "@koftwentytwo"' "${config_file}")
local ORG_CI_EMAIL=$(yq '.org.ci_email // "munitor-ci@koftwentytwo.com"' "${config_file}")
local ORG_CI_NAME=$(yq '.org.ci_name // "Munitor CI"' "${config_file}")
local ORG_ORB_SLUG=$(yq '.org.orb_slug // "kof22/munitor"' "${config_file}")
# Core pipeline settings
MUNITOR_PIPELINE=$(yq '.pipeline' "${config_file}")
+6 -6
View File
@@ -109,12 +109,12 @@ extract_munitor_vars() {
return 1
fi
# --- Org defaults (change this block when forking for another org) ---
local ORG_DOCKER_REGISTRY="ghcr.io/KofTwentyTwo"
local ORG_NPM_SCOPE="@koftwentytwo"
local ORG_CI_EMAIL="munitor-ci@koftwentytwo.com"
local ORG_CI_NAME="Munitor CI"
local ORG_ORB_SLUG="kof22/munitor"
# --- Org defaults (overridable via .munitor.yml org section) ---
local ORG_DOCKER_REGISTRY=$(yq '.org.docker_registry // "ghcr.io/KofTwentyTwo"' "${config_file}")
local ORG_NPM_SCOPE=$(yq '.org.npm_scope // "@koftwentytwo"' "${config_file}")
local ORG_CI_EMAIL=$(yq '.org.ci_email // "munitor-ci@koftwentytwo.com"' "${config_file}")
local ORG_CI_NAME=$(yq '.org.ci_name // "Munitor CI"' "${config_file}")
local ORG_ORB_SLUG=$(yq '.org.orb_slug // "kof22/munitor"' "${config_file}")
# Core pipeline settings
MUNITOR_PIPELINE=$(yq '.pipeline' "${config_file}")
+2 -2
View File
@@ -129,8 +129,8 @@ if [[ "${SUPP_JSON}" != "[]" && "${SUPP_JSON}" != "null" ]]; then
fi
# Commit and push
git config user.email "${CI_GIT_EMAIL:-munitor-ci@koftwentytwo.com}"
git config user.name "${CI_GIT_NAME:-Munitor CI}"
git config user.email "${CI_GIT_EMAIL:-${MUNITOR_CI_EMAIL:-munitor-ci@koftwentytwo.com}}"
git config user.name "${CI_GIT_NAME:-${MUNITOR_CI_NAME:-Munitor CI}}"
if git diff --cached --quiet; then
echo "No changes to commit (version already up to date)."