Skip to content

Prototype: CI-published p2 update site (GitHub Pages composite repo)#52

Merged
khatchad merged 5 commits into
masterfrom
prototype/ci-pages-release
Jun 18, 2026
Merged

Prototype: CI-published p2 update site (GitHub Pages composite repo)#52
khatchad merged 5 commits into
masterfrom
prototype/ci-pages-release

Conversation

@khatchad

@khatchad khatchad commented Jun 18, 2026

Copy link
Copy Markdown
Member

Draft / prototype for discussion—not for merge as-is. A proposed alternative to the current in-repo, cumulative, hand-assembled P2 update site. See docs/RELEASING.md for the full side-by-side.

What This Changes

  • updatesite/category.xml—the key unblock. Tycho's eclipse-repository build was producing an empty repo (the README's "build it again" quirk) because the module only had the legacy site.xml. With a category.xml, a plain ./mvnw clean install produces a complete per-version p2 repo at updatesite/target/repository (feature + 8 bundles + category)—no Eclipse GUI, no p2 publisher, no -append. (Already merged separately via Add updatesite/category.xml so the eclipse-repository build is non-empty #53/Exclude category.xml from spotless and match site.xml formatting #54.)
  • tools/p2-composite.sh—generates p2 compositeContent.xml/compositeArtifacts.xml from per-version child dirs.
  • .github/workflows/release.yml—manual-dispatch pipeline: set-version→build/test→tag + GitHub Release (p2 repo attached as a zip)→publish to gh-pages as a composite repo→next-dev bump.

Verified Locally

  • category.xmlmvn package yields a populated target/repository (11 IUs: feature + 8 bundles + category). ✅
  • p2-composite.sh→well-formed indexes; the Eclipse p2 director loads the composite and resolves the feature across multiple children. ✅
  • spotless:check green. ✅
  • (The Actions workflow itself hasn't been run—it needs Pages enabled + the dispatch; that's part of the migration decision.)

Why

The current model commits ~10 binary jars per release into master forever (cumulative), served from raw.githubusercontent.com, with a fragile GUI/-append index step. This model keeps no binaries in master (they live on the orphan gh-pages branch), produces the repo with one CLI build, and uses a composite layout that scales to any number of versions as isolated, immutable children.

Single stable update-site URL would become:

https://ponder-lab.github.io/Common-Eclipse-Refactoring-Framework/releases/

Not Done Here (Migration, If We Go This Way)

Enable Pages for gh-pages; update README's site URL; optionally seed gh-pages with historical versions then drop the committed updatesite/ binaries from master; retire release.sh (or keep as offline fallback).

🤖 Generated with Claude Code

Replaces the in-repo, cumulative, hand-assembled update site with a
CI-built, Pages-published p2 composite repository (no binaries in
master). See docs/RELEASING.md for the comparison.

- Add updatesite/category.xml so Tycho's eclipse-repository build
  produces a complete per-version p2 repo (fixes the empty-build quirk;
  no GUI / p2 publisher / -append needed).
- Add tools/p2-composite.sh to generate p2 composite indexes; verified
  the Eclipse p2 director loads the composite and resolves the feature.
- Add .github/workflows/release.yml: manual-dispatch release pipeline
  (set-version, build/test, tag + GitHub Release with the p2 repo zip,
  publish to gh-pages as a composite, next-dev bump).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015krtPy49YGqBERvq4yDjCa
khatchad and others added 4 commits June 17, 2026 23:45
… wrapping

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015krtPy49YGqBERvq4yDjCa
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015krtPy49YGqBERvq4yDjCa
The tag must point at the release-version sources, and master needs a
"Release vX.Y.Z." commit, so commit the version bump and push master
before tagging (mirrors release.sh).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015krtPy49YGqBERvq4yDjCa
@khatchad
khatchad marked this pull request as ready for review June 18, 2026 04:04
Copilot AI review requested due to automatic review settings June 18, 2026 04:04
@khatchad
khatchad merged commit 4e8de56 into master Jun 18, 2026
2 checks passed
@khatchad
khatchad deleted the prototype/ci-pages-release branch June 18, 2026 04:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a prototype release pipeline that builds a per-version Tycho p2 repository in CI and publishes it to GitHub Pages as a composite update site, as an alternative to the current in-repo cumulative update-site approach.

Changes:

  • Add tools/p2-composite.sh to generate compositeContent.xml / compositeArtifacts.xml from per-version child repos.
  • Add docs/RELEASING.md to document and compare the current vs prototype release models.
  • Add a prototype GitHub Actions workflow to build, tag/release, and publish the p2 site to gh-pages.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
tools/p2-composite.sh New helper script to generate composite p2 repository index XML files.
docs/RELEASING.md New documentation comparing current and prototype release mechanisms.
.github/workflows/release.yml New manual-dispatch workflow to build/release and publish a composite p2 update site to GitHub Pages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +64 to +69
REL="${{ github.event.inputs.release_version }}"
NEXT="${{ github.event.inputs.next_version }}"
[[ "$REL" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "bad release version"; exit 1; }
if [[ -z "$NEXT" ]]; then IFS=. read -r MA MI PA <<<"$REL"; NEXT="${MA}.$((MI+1)).0"; fi
echo "rel=$REL" >> "$GITHUB_OUTPUT"
echo "next=${NEXT}-SNAPSHOT" >> "$GITHUB_OUTPUT"
Comment on lines +71 to +72
- name: Set release version
run: ./mvnw -B -q org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${{ steps.v.outputs.rel }}
Comment on lines +84 to +100
- name: Zip the p2 repo for the release asset
run: |
(cd "$UPDATESITE/target/repository" && zip -qr "$GITHUB_WORKSPACE/p2-repo-${{ steps.v.outputs.rel }}.zip" .)

- name: Commit release version, tag, push, and create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
REL="${{ steps.v.outputs.rel }}"
git add -A
git commit -q -m "Release v${REL}."
git tag -a "v${REL}" -m "Release v${REL}."
git push origin master
git push origin "v${REL}"
gh release create "v${REL}" \
--title "v${REL}" --generate-notes \
"p2-repo-${REL}.zip#p2 update site (zip)"
Comment on lines +120 to +125
- name: Prepare next development version
run: |
./mvnw -B -q org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${{ steps.v.outputs.next }}
git add -A
git commit -q -m "Prepare next development version."
git push origin master
Comment thread tools/p2-composite.sh
Comment on lines +17 to +18
ROOT="${1:?site-root}"; NAME="${2:?repo-name}"; TS="${3:?epoch-millis}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants