From 936d4fd2b852b24c44548cce48075d9fc4e77374 Mon Sep 17 00:00:00 2001 From: lemeurherveCB <137290663+lemeurherveCB@users.noreply.github.com> Date: Fri, 13 Sep 2024 22:06:31 +0200 Subject: [PATCH] fix: serve all static files previously accessible from stats.jenkins.io (#168) --- .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"