mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 15:08:47 -07:00
ci: treat .markdown like .md in push builds
From the local CodeRabbit review: a Markdown-only push using the .markdown extension still rebuilt Quest. Exclude both extensions in the push planner and in the documented job path filter.
This commit is contained in:
Vendored
+2
-2
@@ -78,11 +78,11 @@ pipeline {
|
|||||||
for (entry in cs.items) changed.addAll(entry.affectedPaths)
|
for (entry in cs.items) changed.addAll(entry.affectedPaths)
|
||||||
}
|
}
|
||||||
// Only client-facing changes rebuild (and so republish) a
|
// Only client-facing changes rebuild (and so republish) a
|
||||||
// platform; Markdown doesn't count. The job's Git path filter
|
// platform; Markdown (.md, .markdown) doesn't count. The job's Git path filter
|
||||||
// uses the same paths, so other pushes don't start a run at all.
|
// uses the same paths, so other pushes don't start a run at all.
|
||||||
// A CI-only change (Jenkinsfile, ci/) takes a manual run.
|
// A CI-only change (Jenkinsfile, ci/) takes a manual run.
|
||||||
def touches = { prefixes ->
|
def touches = { prefixes ->
|
||||||
changed.any { p -> !p.toLowerCase().endsWith('.md') && prefixes.any { p.startsWith(it) } }
|
changed.any { p -> !(p.toLowerCase() ==~ /.*\.(md|markdown)/) && prefixes.any { p.startsWith(it) } }
|
||||||
}
|
}
|
||||||
buildPc = touches(['DorkNet.ClientMod/', 'tools/build_pc.py'])
|
buildPc = touches(['DorkNet.ClientMod/', 'tools/build_pc.py'])
|
||||||
buildQuest = touches(['DorkNet.Quest/'])
|
buildQuest = touches(['DorkNet.Quest/'])
|
||||||
|
|||||||
@@ -64,14 +64,14 @@ Resolve a table for another build locally with `build.py build --dump-cs`.
|
|||||||
changes, and only the platform they touch:
|
changes, and only the platform they touch:
|
||||||
- `DorkNet.ClientMod/` and `tools/build_pc.py` rebuild PC;
|
- `DorkNet.ClientMod/` and `tools/build_pc.py` rebuild PC;
|
||||||
- `DorkNet.Quest/` rebuilds Quest;
|
- `DorkNet.Quest/` rebuilds Quest;
|
||||||
- Markdown files never count; server, docs and CI-only pushes (including
|
- Markdown files (`.md`, `.markdown`) never count; server, docs and CI-only pushes (including
|
||||||
the `Jenkinsfile` and `ci/`) build nothing. Run those manually.
|
the `Jenkinsfile` and `ci/`) build nothing. Run those manually.
|
||||||
|
|
||||||
Set the same filter on the job so other pushes don't start a run at all:
|
Set the same filter on the job so other pushes don't start a run at all:
|
||||||
under the job's **Git** source, add **Additional Behaviours → Polling
|
under the job's **Git** source, add **Additional Behaviours → Polling
|
||||||
ignores commits in certain paths** with included regions
|
ignores commits in certain paths** with included regions
|
||||||
`DorkNet[.]ClientMod/.*`, `DorkNet[.]Quest/.*`, `tools/build_pc[.]py` (one
|
`DorkNet[.]ClientMod/.*`, `DorkNet[.]Quest/.*`, `tools/build_pc[.]py` (one
|
||||||
per line) and excluded region `.*[.]md`. The filter compares against the
|
per line) and excluded region `.*[.](md|markdown)`. The filter compares against the
|
||||||
last build's checkout, so the pipeline keeps it and deletes only `out/`
|
last build's checkout, so the pipeline keeps it and deletes only `out/`
|
||||||
and its scratch folders after each run; without a checkout, Jenkins treats
|
and its scratch folders after each run; without a checkout, Jenkins treats
|
||||||
every push as a change.
|
every push as a change.
|
||||||
|
|||||||
Reference in New Issue
Block a user