interplane.io
Source of interplane.io: a Rust generator that renders the page from the protocol repository's public record, deployed hourly from the Spark.
Brought by drakestapleton
interplane.io / .gitlab-ci.yml
| 1 | # GitLab CI for interplane.io |
| 2 | # Canonical source and owner-signed publishing live on Interplane (Spark). |
| 3 | # GitLab provides ARM64 verification, MR preview apps, and read-only health watchdogs. |
| 4 | # First-party build and check logic stays in seeded Omega (native/site.om). |
| 5 | |
| 6 | stages: |
| 7 | - verify |
| 8 | - preview |
| 9 | - watchdog |
| 10 | |
| 11 | verify: |
| 12 | stage: verify |
| 13 | tags: |
| 14 | - spark-arm64 |
| 15 | rules: |
| 16 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' |
| 17 | - if: '$CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"' |
| 18 | script: |
| 19 | - set -eu |
| 20 | - rm -rf target dist dist-hop shots |
| 21 | - sh scripts/build-native.sh target/site |
| 22 | - ./target/site build dist dist-hop |
| 23 | - ./target/site verify dist dist-hop |
| 24 | - sh scripts/tests/check-site.sh |
| 25 | - | |
| 26 | if [ -f content/hop.release.txt ] && [ -d dist-hop ]; then |
| 27 | sh scripts/tests/check-claims.sh --hop content/hop.release.txt dist dist-hop |
| 28 | else |
| 29 | sh scripts/tests/check-claims.sh dist |
| 30 | fi |
| 31 | - mkdir -p shots |
| 32 | - | |
| 33 | if [ -d dist-hop ]; then |
| 34 | SHOTS=shots SHOT=/ sh scripts/tests/check-render.sh dist dist-hop |
| 35 | else |
| 36 | SHOTS=shots SHOT=/ sh scripts/tests/check-render.sh dist |
| 37 | fi |
| 38 | artifacts: |
| 39 | when: always |
| 40 | expire_in: 14 days |
| 41 | paths: |
| 42 | - dist/ |
| 43 | - dist-hop/ |
| 44 | - shots/ |
| 45 | - dist/manifest.sha256 |
| 46 | |
| 47 | pages: |
| 48 | stage: preview |
| 49 | tags: |
| 50 | - spark-arm64 |
| 51 | needs: |
| 52 | - job: verify |
| 53 | artifacts: true |
| 54 | rules: |
| 55 | - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' |
| 56 | pages: |
| 57 | publish: dist |
| 58 | path_prefix: "mr-$CI_MERGE_REQUEST_IID" |
| 59 | environment: |
| 60 | name: "review/mr-$CI_MERGE_REQUEST_IID" |
| 61 | url: "$CI_PAGES_URL" |
| 62 | script: |
| 63 | - test -f dist/index.html |
| 64 | - test -f dist/manifest.sha256 |
| 65 | |
| 66 | watchdog: |
| 67 | stage: watchdog |
| 68 | tags: |
| 69 | - spark-arm64 |
| 70 | rules: |
| 71 | - if: '$CI_PIPELINE_SOURCE == "schedule"' |
| 72 | script: |
| 73 | - set -eu |
| 74 | - rm -rf target |
| 75 | - sh scripts/build-native.sh target/site |
| 76 | - WORK=$(mktemp -d) |
| 77 | - trap 'rm -rf "$WORK"' 0 |
| 78 | - curl -fsSI https://interplane.io/translate/index.json > "$WORK/headers.txt" |
| 79 | - ./target/site headers-check "$WORK/headers.txt" |
| 80 | - | |
| 81 | for url in \ |
| 82 | https://interplane.io/ \ |
| 83 | https://interplane.io/explore \ |
| 84 | https://interplane.io/galaxy/ \ |
| 85 | https://interplane.io/drakestapleton/hop; do |
| 86 | code=$(curl -sS -o /dev/null -w '%{http_code}' "$url") |
| 87 | echo "$code $url" |
| 88 | test "$code" -eq 200 |
| 89 | done |
| 90 | - | |
| 91 | PIN_DATE=$(sed -n 's/^fetched //p' content/papers.snapshot | head -n 1) |
| 92 | FETCHED="${PIN_DATE:-$(date -u +%Y-%m-%d)}" sh scripts/fetch-papers.sh "$WORK/papers.snapshot" |
| 93 | if ! cmp -s content/papers.snapshot "$WORK/papers.snapshot"; then |
| 94 | echo "DRIFT: Zenodo records differ from content/papers.snapshot (manual refresh needed)" |
| 95 | diff -u content/papers.snapshot "$WORK/papers.snapshot" || true |
| 96 | exit 1 |
| 97 | fi |
| 98 | echo "OK: content/papers.snapshot matches live Zenodo records" |