From 9f268287eb2e6f897a5d610329821bdd20947f24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur=20CB?= Date: Fri, 13 Sep 2024 21:23:22 +0200 Subject: [PATCH] fix: serve all static files previously accessible from stats.jenkins.io --- .gitignore | 5 ++++- retrieve-infra-statistics-data.sh | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8487bbc..7b8ff3f 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,9 @@ dist-ssr # infra-statistics src/data/infra-statistics +public/plugin-installation-trend +public/jenkins-stats +public/pluginversions # bundle analyzer -bundle-analysis.html \ No newline at end of file +bundle-analysis.html diff --git a/retrieve-infra-statistics-data.sh b/retrieve-infra-statistics-data.sh index 7e8d5cc..fd2b0f5 100755 --- a/retrieve-infra-statistics-data.sh +++ b/retrieve-infra-statistics-data.sh @@ -15,5 +15,10 @@ unzip -q -o infra-statistics-gh-pages.zip mv infra-statistics-gh-pages "${INFRASTATISTICS_LOCATION}" rm infra-statistics-gh-pages.zip +# Copy folders over public folder to serve their static files +for dir in jenkins-stats plugin-installation-trend pluginversions; do + cp -r "${INFRASTATISTICS_LOCATION}/${dir}" public/ +done + # Fetch update-center.actual.json curl --silent --fail --output "${INFRASTATISTICS_LOCATION}/update-center.actual.json" --location "https://updates.jenkins.io/current/update-center.actual.json"