-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupgrade.py
More file actions
executable file
·40 lines (35 loc) · 1.57 KB
/
Copy pathupgrade.py
File metadata and controls
executable file
·40 lines (35 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3
# upgrade-template: argocd-pin
# ============================================================
# Configuration (ONLY section that differs between scripts)
# To reuse this script for other Helm charts, copy this file
# and modify ONLY the variables below.
# ============================================================
CONFIG = {
"SCRIPT_NAME": "GitLab Runner Helm Chart Upgrade Script",
"BASE": "standard",
"HELM_REPO_NAME": "gitlab",
"HELM_REPO_URL": "https://charts.gitlab.io",
"HELM_CHART": "gitlab/gitlab-runner",
"CHANGELOG_URL": "https://gitlab.com/gitlab-org/charts/gitlab-runner/-/blob/main/CHANGELOG.md",
"CHART_TYPE": "local", # "local" or "external"
# ArgoCD-managed: version SSOT is argocd/<release>.yaml chart.version (no helmfile).
# Track the two active runner releases only; old-build-deploy-image stays
# pinned (intentionally excluded from auto-upgrade).
"ARGOCD_PIN_FILES": [
"argocd/build-image.yaml",
"argocd/deploy-image.yaml",
],
}
# ============================================================
# ── canonical body (sync-managed, do not edit below) ────────
import sys
from pathlib import Path
_here = Path(__file__).resolve().parent
for _anc in [_here, *_here.parents]:
if (_anc / "scripts" / "python" / "upgrade_core").is_dir():
sys.path.insert(0, str(_anc / "scripts" / "python"))
break
from upgrade_core.argocd_pin import run # noqa: E402
if __name__ == "__main__":
sys.exit(run(CONFIG, sys.argv[1:], script_path=__file__))