From ab96081c8bfde5e0b8e7339301569fcf202e7637 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Tue, 6 Jan 2026 11:41:10 +0100 Subject: [PATCH] Add script to fetch build website's data-files for local testing and provide documentation about the basic structure of the new build websites and their data file generation. --- sites/eclipse/README.md | 10 +++++++ sites/eclipse/testDataFetch.sh | 49 ++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 sites/eclipse/testDataFetch.sh diff --git a/sites/eclipse/README.md b/sites/eclipse/README.md index bdd07294d34..446eedf8874 100644 --- a/sites/eclipse/README.md +++ b/sites/eclipse/README.md @@ -1,7 +1,17 @@ # Eclipse Build websites +The websites for all Eclipse and Equinox builds and their overview pages are based on plain HTML pages, that read their individual information from data files (in JSON format) and apply them via _JavaScript_. +All data files of each website are contained within the root folder of each site and all sites are generally self-contained. +The data files are generated during a build running the [RelEng Java scripts programs](../../scripts/releng) +or by the [Update Download Index](../../JenkinsJobs/Releng/updateIndex.jenkinsfile) Jenkins job. # Local testing +To locally create the full set of data (JSON) files for all websites, e.g. for local testing, one can run +`./testDataFetch.sh ` + +That scripts fetches the data files of the build with specified identifier and places it at the expected location and allows to replicate the Eclipse and Equinox websites of that build and the current overview pages locally. +Any I, Y, milestone, RC or release available at https://download.eclipse.org/eclipse/downloads/ may be specified. + Launch `jwebserver` from this repository (requires a JDK-18 or later on `PATH`) and open the localhost URL displayed on the console (by default `http://127.0.0.1:8000/`). Run `jwebserver --help` for help and further options. diff --git a/sites/eclipse/testDataFetch.sh b/sites/eclipse/testDataFetch.sh new file mode 100644 index 00000000000..3d9591c4137 --- /dev/null +++ b/sites/eclipse/testDataFetch.sh @@ -0,0 +1,49 @@ +#!/bin/bash -xe +#******************************************************************************* +# Copyright (c) 2026, 2026 Hannes Wellmann and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Hannes Wellmann - initial API and implementation +#******************************************************************************* + +if [ "$#" -ne 1 ]; then + echo "Expected usage: $0 " + exit 1 +fi +buildID=$1 + +# Work from the directory containing the eclipse and equinox website +cd $(dirname "$0")/.. + +find eclipse -type f -name "*.json" -delete +find equinox -type f -name "*.json" -delete + +# Eclipse website +buildDrop="https://download.eclipse.org/eclipse/downloads/drops4/${buildID}" +curl --fail -o eclipse/overview/data.json https://download.eclipse.org/eclipse/downloads/data.json +curl --fail -o eclipse/build/buildproperties.json "${buildDrop}/buildproperties.json" +curl --fail -o eclipse/build/compilerSummary.json "${buildDrop}/compilerSummary.json" +curl --fail -o eclipse/build/gitLog.json "${buildDrop}/gitLog.json" +curl --fail -o eclipse/build/buildlogs/logFiles.json "${buildDrop}/buildlogs/logFiles.json" + +# Download test results +# Requires jq: https://jqlang.org/download/ +mkdir -p eclipse/build/testresults +releaseShort=$(jq -r '.releaseShort' eclipse/build/buildproperties.json) +testConfigurations=$(jq -r '.expectedTests[]' eclipse/build/buildproperties.json) +for testConfig in ${testConfigurations//[[:space:]]/ }; do + filename="ep${releaseShort//./}I-unit-${testConfig}" + curl --fail -o eclipse/build/testresults/${filename}-summary.json "${buildDrop}/testresults/${filename}-summary.json" + curl --fail -o eclipse/build/testresults/${filename}.json "${buildDrop}/testresults/${filename}.json" +done + +# Equinox website +curl --fail -o equinox/overview/data.json https://download.eclipse.org/equinox/data.json +curl --fail -o equinox/build/buildproperties.json "https://download.eclipse.org/equinox/drops/${buildID}/buildproperties.json"