Separate website CI from Minecraft plugin and resource-pack builds

This commit is contained in:
unimatrix 2026-11-29 00:31:08 +00:00
commit af8c0e463f
10 changed files with 22 additions and 230 deletions

View file

@ -9,7 +9,7 @@ const steps = new Map(
return [chunk.slice(0, lineEnd).trim(), chunk.slice(lineEnd + 1)];
})
);
const production = "github.repository == 'unimatrix/MC' && github.ref == 'refs/heads/main'";
const production = "github.repository == 'unimatrix/web' && github.ref == 'refs/heads/main'";
function step(name) {
assert.ok(steps.has(name), 'Expected workflow step: ' + name);
@ -20,7 +20,7 @@ test('development can dispatch a build and production still builds on main pushe
assert.match(workflow, /^ workflow_dispatch:\s*$/m);
assert.match(workflow, /^ push:\r?\n branches:\r?\n - main\r?$/m);
assert.equal(workflow.match(/^ if: (.+)$/m)?.[1].trim(),
"github.repository == 'unimatrix/MC' || (github.repository == 'dev/MC' && github.event_name == 'workflow_dispatch')");
"github.repository == 'unimatrix/web' || (github.repository == 'dev/MC' && github.event_name == 'workflow_dispatch')");
for (const name of ['Verify deployment policy', 'Build and test website']) {
assert.doesNotMatch(step(name), /^ if:/m);
}
@ -30,7 +30,7 @@ test('checkout fetches the exact event commit from the repository running the wo
const checkout = step('Check out exact revision');
assert.match(checkout, /fetch --depth=1 "https:\/\/www\.dunerealms\.com\/git\/\$\{GITHUB_REPOSITORY\}\.git" "\$GITHUB_SHA"/);
assert.match(checkout, /git checkout --detach FETCH_HEAD\r?\n\s+test "\$\(git rev-parse HEAD\)" = "\$GITHUB_SHA"/);
assert.doesNotMatch(checkout, /unimatrix\/MC/);
assert.doesNotMatch(checkout, /unimatrix\/web/);
});
test('publication comparison, artifact upload and deployment require canonical main', () => {

View file

@ -24,7 +24,7 @@ jobs:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git init .
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/MC.git "$GITHUB_SHA"
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/web.git "$GITHUB_SHA"
git checkout --detach FETCH_HEAD
- name: Install Node 22
uses: actions/setup-node@v4

View file

@ -1,23 +0,0 @@
name: DuneRealms Kit Delivery CI
on:
push:
branches: [main, dev/kit-atelier-v3]
paths:
- 'network/server-control/kit*'
- 'network/server-control/player_kits.py'
- '.forgejo/workflows/kit-delivery.yml'
workflow_dispatch:
jobs:
kits:
runs-on: dune-ci
steps:
- name: Checkout
shell: bash
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git init .
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/MC.git "$GITHUB_SHA"
git checkout --detach FETCH_HEAD
- name: Verify kit delivery bridge
run: python3 -m unittest discover -s network/server-control -p 'test_*.py' -v

View file

@ -1,81 +0,0 @@
name: DuneRealms Plugin CI
on:
workflow_dispatch:
push:
branches: [main]
paths:
- '.forgejo/workflows/plugins.yml'
- 'Dune*/**'
- 'JarvisConnector/**'
- 'gui-common/**'
- 'network/proxy/central-pack/**'
jobs:
plugins:
runs-on: dune-ci
steps:
- name: Check out exact revision
shell: bash
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git init .
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 "https://www.dunerealms.com/git/${GITHUB_REPOSITORY}.git" "$GITHUB_SHA"
git checkout --detach FETCH_HEAD
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '9.2.1'
- name: Test and build first-party plugins
shell: bash
run: |
set -euo pipefail
modules=(DuneEss DuneLobby DuneNPC DuneRealms-minecraft-only DuneTerrain JarvisConnector)
if [[ -f network/proxy/central-pack/build.gradle.kts ]]; then
modules+=(network/proxy/central-pack)
fi
mkdir -p plugin-artifacts
for module in "${modules[@]}"; do
gradle --no-daemon -p "$module" test jar
for jar in "$module"/build/libs/*.jar; do
test -f "$jar"
artifact="plugin-artifacts/${jar##*/}"
test ! -e "$artifact"
cp "$jar" "$artifact"
done
done
printf '%s\n' "$(git rev-parse HEAD)" > plugin-artifacts/SOURCE_COMMIT
(cd plugin-artifacts && sha256sum -- *.jar SOURCE_COMMIT > SHA256SUMS)
- uses: actions/upload-artifact@v3
with:
name: DuneRealms-Plugins
path: plugin-artifacts/
if-no-files-found: error
- name: Test release installer failure recovery
shell: bash
run: |
set -euo pipefail
if ! python3 -c 'import yaml'; then
apt-get update
apt-get install -y --no-install-recommends python3-yaml
fi
python3 -m unittest discover -s tools -p test_dunemenus_installer.py -v
- name: Test and build the replacement DuneMenus plugin
shell: bash
run: |
set -euo pipefail
gradle --no-daemon -p DuneMenus test jar
mkdir -p dunemenus-artifacts
python3 tools/build-dunemenus-release.py dunemenus-artifacts
printf '%s\n' "$(git rev-parse HEAD)" > dunemenus-artifacts/SOURCE_COMMIT
(cd dunemenus-artifacts && sha256sum -- DuneMenus.jar DuneRealms-Network-Artwork-v7.zip SOURCE_COMMIT release.json > SHA256SUMS)
- uses: actions/upload-artifact@v3
with:
name: ${{ github.repository == 'dev/MC' && 'DuneMenus-Development' || 'DuneMenus' }}
path: dunemenus-artifacts/
if-no-files-found: error

View file

@ -1,113 +0,0 @@
name: DuneRealms Resourcepack CI
on:
workflow_dispatch:
push:
branches: [main]
paths:
- 'network/content-assets/**'
- 'tools/build-resourcepack-repair.py'
- 'tools/test_resourcepack_repair.py'
- 'tools/build-arrakis-fauna-pack.mjs'
- 'tools/build-fauna-models.mjs'
- 'tools/build-fauna-pack-update.py'
- 'tools/test_fauna_pack_update.py'
- 'DuneTerrain/**'
- 'DuneRealms-minecraft-only/**'
- 'JarvisConnector/**'
- '.forgejo/workflows/resourcepack-ci.yml'
jobs:
resourcepack:
if: github.repository == 'unimatrix/MC' && github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: dune-ci
steps:
- name: Checkout exact reviewed revision
shell: bash
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git init .
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/MC.git "$GITHUB_SHA"
git checkout --detach FETCH_HEAD
- name: Build immutable repair archives and verify pinned inputs
shell: bash
run: |
mkdir -p resourcepack-baselines resourcepack-output
curl --fail --location --retry 2 https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v3.zip -o resourcepack-baselines/DuneRealms-Network-Artwork-v3.zip
curl --fail --location --retry 2 https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v4.zip -o resourcepack-baselines/DuneRealms-Materials-arrakis-v4.zip
DUNE_REPAIR_BASELINE_DIR="$PWD/resourcepack-baselines" python3 tools/test_resourcepack_repair.py -v
python3 tools/build-resourcepack-repair.py resourcepack-baselines/DuneRealms-Network-Artwork-v3.zip resourcepack-baselines/DuneRealms-Materials-arrakis-v4.zip resourcepack-output
DUNE_FAUNA_BASELINE_DIR="$PWD/resourcepack-output" python3 tools/test_fauna_pack_update.py -v
python3 tools/build-fauna-pack-update.py resourcepack-output resourcepack-output/fauna-preview
- name: Install Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Install Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '9.2.1'
- name: Build and test pack delivery plugin
run: |
gradle --no-daemon -p DuneTerrain test jar
gradle --no-daemon -p DuneRealms-minecraft-only test jar
gradle --no-daemon -p JarvisConnector test jar
gradle --no-daemon -p DuneMenus test jar
- name: Upload reviewed packs and GUI plugin
uses: actions/upload-artifact@v3
with:
name: DuneRealms-Resourcepack-Repair
path: |
resourcepack-output/
DuneMenus/build/libs/DuneMenus.jar
DuneTerrain/build/libs/DuneRealms-Terrain.jar
DuneRealms-minecraft-only/build/libs/DuneRealms-Core.jar
JarvisConnector/build/libs/jarvistranslator.jar
if-no-files-found: error
retention-days: 7
central-pack-development:
if: github.repository == 'dev/MC' && github.event_name == 'workflow_dispatch'
runs-on: dune-ci
steps:
- name: Check out exact development revision
shell: bash
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git init .
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 "https://www.dunerealms.com/git/${GITHUB_REPOSITORY}.git" "$GITHUB_SHA"
git checkout --detach FETCH_HEAD
test "$(git rev-parse HEAD)" = "$GITHUB_SHA"
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Verify baseline and build a central pack candidate
shell: bash
run: |
set -euo pipefail
node --test tools/build-planet-texture-packs.test.mjs
curl --fail --location --retry 2 https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v6.zip -o central-pack-baseline.zip
python3 - <<'PYTHON'
import pathlib
import runpy
repair = runpy.run_path('tools/build-resourcepack-repair.py')
entries = repair['read_pack'](
pathlib.Path('central-pack-baseline.zip'),
'ed2533646ee5e19a1dbfeec66e5791d1011a5107e6fcc4153372e431dfc5f56a',
)
for name, data in entries.items():
target = pathlib.Path('central-pack-base') / name
target.parent.mkdir(parents=True, exist_ok=True)
target.write_bytes(data)
PYTHON
node tools/build-central-resource-pack.mjs central-pack-base central-pack-output 7 network/resource-pack/shared
printf '%s\n' "$GITHUB_SHA" > central-pack-output/SOURCE_COMMIT
(cd central-pack-output && sha256sum -- *.zip central-pack-manifest.json SOURCE_COMMIT > SHA256SUMS)
- uses: actions/upload-artifact@v3
with:
name: DuneRealms-Central-Pack-Development
path: central-pack-output/
if-no-files-found: error
retention-days: 7

View file

@ -12,7 +12,7 @@ on:
jobs:
web:
if: github.repository == 'unimatrix/MC' || (github.repository == 'dev/MC' && github.event_name == 'workflow_dispatch')
if: github.repository == 'unimatrix/web' || (github.repository == 'dev/MC' && github.event_name == 'workflow_dispatch')
runs-on: dune-ci
steps:
- name: Check out exact revision
@ -32,17 +32,17 @@ jobs:
node-version: '22'
- name: Prepare publication comparison
if: github.repository == 'unimatrix/MC' && github.ref == 'refs/heads/main'
if: github.repository == 'unimatrix/web' && github.ref == 'refs/heads/main'
shell: bash
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BEFORE=$(node -e 'const fs=require("fs");const p=process.env.GITHUB_EVENT_PATH;const e=p&&fs.existsSync(p)?JSON.parse(fs.readFileSync(p)):{};process.stdout.write(e.before||"");')
if [[ ! "$BEFORE" =~ ^[0-9a-f]{40}$ || "$BEFORE" =~ ^0+$ ]]; then
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --deepen=1 https://www.dunerealms.com/git/unimatrix/MC.git "$GITHUB_SHA"
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --deepen=1 https://www.dunerealms.com/git/unimatrix/web.git "$GITHUB_SHA"
BEFORE=$(git rev-parse HEAD^)
else
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/MC.git "$BEFORE"
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/web.git "$BEFORE"
fi
node website/scripts/publication-changes.mjs "$BEFORE" "$GITHUB_SHA"
@ -61,7 +61,7 @@ jobs:
node --test --test-concurrency=1 ../tools/tests/*.test.mjs
- name: Upload website build
if: github.repository == 'unimatrix/MC' && github.ref == 'refs/heads/main'
if: github.repository == 'unimatrix/web' && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: DuneRealms-Website
@ -70,7 +70,7 @@ jobs:
retention-days: 1
- name: Trigger deployment after successful CI
if: github.repository == 'unimatrix/MC' && github.ref == 'refs/heads/main'
if: github.repository == 'unimatrix/web' && github.ref == 'refs/heads/main'
shell: bash
env:
DEPLOY_KEY: ${{ secrets.DUNEREALMS_DEPLOY_KEY }}

View file

@ -4,7 +4,7 @@ These are the user's default preferences for future DuneRealms work. Apply them
## Production release rules
- `unimatrix/MC:main` is the production source. Keep the website and the currently deployed Arrakis plugin source together. `dev/MC` is the development fork for edits, commits, builds and CI. Preserve uncommitted work when reconciling checkouts.
- Owner direction, 29 November 2026: `unimatrix/web:main` is website-only production; `unimatrix/plugins:main` owns plugins, resource packs and game-server deployment. This supersedes the historical combined-repository instruction. `dev/MC` remains a development reference until separately migrated. Preserve uncommitted work when reconciling checkouts.
- Keep at most one open pull request per repository. Reuse it for follow-up commits. Direct pushes to main are prohibited. Merge completed changes only after successful CI and explicit owner authorization.
- Every plugin change goes through a build from a recorded Git commit. Record each JAR filename, plugin version and SHA-256 in the release manifest. Roll out the exact tested artifacts and verify their hashes against the installed JARs.
- Treat any mismatch between the production source, the build manifest and the installed plugins as release drift. Reconcile the source and retest before a replacement rollout. Avoid manual edits or class overlays on live JARs.

9
REPOSITORY-SCOPE.md Normal file
View file

@ -0,0 +1,9 @@
# Website repository
`unimatrix/web` is the website production repository. `unimatrix/plugins` owns Minecraft plugins, resource packs and game-server rollout.
The website workflows build, test and publish only the website. Minecraft plugin, kit-delivery and resource-pack workflows are not active here. Existing source history is retained; it does not authorise cross-deployment.
The latest development website tree (`331b838f51fe54380b0ce1f56d6351bbc28bf372`, from `dev/MC` branch `work/dunemenus-cutover-parity`) was already present on `web/main` when the repositories were separated on 29 November 2026. It contains the updated item-card artwork and cookbook. No older development snapshot should replace it.
Use Composio for repository and CI operations. Direct server SSH requires explicit owner authorisation. A CI artifact upload is not proof of live deployment.

View file

@ -1,5 +1,5 @@
import {pathToFileURL} from 'node:url';
const API='https://www.dunerealms.com/git/api/v1/repos/unimatrix/MC';
const API='https://www.dunerealms.com/git/api/v1/repos/unimatrix/web';
const LIVE='https://www.dunerealms.com/ci-build.json';
const SHA=/^[a-f0-9]{40}$/;
const terminal=new Set(['success','failure','cancelled','skipped']);

View file

@ -1,6 +1,6 @@
import {pathToFileURL} from 'node:url';
const API='https://www.dunerealms.com/git/api/v1/repos/unimatrix/MC';
const API='https://www.dunerealms.com/git/api/v1/repos/unimatrix/web';
const LIVE='https://www.dunerealms.com/ci-build.json';
const SHA=/^[0-9a-f]{40}$/;