Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MDSD.tools Update Site

This repository hosts the Eclipse p2 update site of the MDSD-Tools projects, served via GitHub Pages at https://updatesite.mdsd.tools.

It replaces the former Docker/nginx server. All paths of the former server are kept, so existing target platforms (Palladio, DataFlowAnalysis, Colja, ...) keep working without changes.

How it works

 project repository                     MDSD-Tools/updatesite
 ──────────────────                     ─────────────────────
 push to default branch ─┐
                         ├─ build-and-deploy.yml ──► branch `content`  ──► publish.yml ──► GitHub Pages
 GitHub release vX.Y.Z ──┘   (reusable workflow)     (p2 repositories)     (adds latest,
                                                                            HTML, checks)
Branch Content
main Tooling: generator script, stylesheet, workflows, projects.json, paths.lock
content Only the p2 repositories, in the update site layout. Written by the project builds.

The generated HTML pages and the releases/latest/ composites are never committed. They are created by publish.yml on every push to content or main and deployed to Pages.

Layout

<project>/nightly/               latest build of the default branch
<project>/releases/<version>/    one directory per release
<project>/releases/latest/       p2 composite repository pointing to the highest release (generated)
<project>/branches/<branch>/     legacy branch builds of the former server (not updated anymore)

Deploying a project

Projects build and deploy with the reusable workflow build-and-deploy.yml:

name: Build

on:
  push:
  pull_request:
  release:
    types: [published]
  workflow_dispatch:

jobs:
  build:
    uses: MDSD-Tools/updatesite/.github/workflows/build-and-deploy.yml@main
    with:
      project-name: ecore-workflow   # folder on the update site, never change it
      updatesite-path: releng/tools.mdsd.ecoreworkflow.updatesite/target/repository
      # java-version: '21'           # optional
      # use-display-output: true     # optional, runs the build with a virtual display (UI tests)
    secrets: inherit
  • Nightly: every push to the default branch deploys to <project>/nightly/.
  • Release: create a GitHub release with a tag vX.Y.Z (e.g. v1.3.0). The build runs with -DgenerateJavaDocForUpdatesite, deploys to <project>/releases/X.Y.Z/, and releases/latest/ automatically points to it after publishing.
  • Pull requests and other branches are only built.

The workflow needs the organization secret UPDATE_SITE_DEPLOY_KEY (private part of a deploy key with write access to this repository), passed with secrets: inherit.

Files on main

File Purpose
scripts/generate_site.py Generates releases/latest/ composites and all HTML pages, verifies paths.lock. Python standard library only.
site-assets/style.css Stylesheet of the generated pages
projects.json Display name, description and GitHub link per project folder (optional, folders without entry still work)
paths.lock All p2 repository paths that must exist. Publishing fails if one is missing. Only add lines.
.github/workflows/squash-content.yml Monthly replaces the history of content with a single commit to keep the repository small
content-branch/.github/workflows/trigger-publish.yml Copy of the only workflow on content. A push to content cannot run publish.yml from main directly, so this workflow starts it via workflow_dispatch.

Running the generator locally

git worktree add ../updatesite-content content
cp -r ../updatesite-content /tmp/site && rm -rf /tmp/site/.git
python scripts/generate_site.py --site /tmp/site --assets site-assets \
  --projects projects.json --paths-lock paths.lock
python -m http.server --directory /tmp/site

Adding a new project

  1. Use the workflow above with a new project-name (lower case, - separated).
  2. Optionally add an entry to projects.json.
  3. After the first release, add <project>/releases/latest/ (and <project>/nightly/) to paths.lock.

Repository settings (one-time)

  • Settings → Pages → Source: GitHub Actions; custom domain updatesite.mdsd.tools, enforce HTTPS.
  • Repository variables: SITE_URL (URL shown on the pages, default https://updatesite.mdsd.tools), SITE_CNAME (updatesite.mdsd.tools once the DNS points to GitHub).
  • Deploy key with write access + organization secret UPDATE_SITE_DEPLOY_KEY (see above).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages