Welcome to the stats.jenkins.io
project! This repository contains the source code and resources for generating and displaying statistics related to Jenkins infrastructure. The project uses modern web technologies, including React, TypeScript, and Vite, to build a fast and responsive web interface for viewing Jenkins stats.
- Project Overview
- Technologies Used
- Getting Started
- Development Workflow
- Building the Website Locally
- Testing
- Contributing
- Inspiration and References
The stats.jenkins.io
project aims to provide an intuitive and efficient way to visualize and analyze various statistics related to Jenkins infrastructure. These statistics help the Jenkins community monitor and manage the infrastructure more effectively.
This project is part of the Jenkins Infra team’s efforts to improve transparency and operational efficiency by making infrastructure data accessible and understandable to all contributors and users.
This website was built as part of Google Summer of Code (GSoC) 2024. The goal was to modernize and enhance the Jenkins infrastructure statistics site, providing a more intuitive and responsive interface for visualizing Jenkins usage stats.
Before GSoC 2024, the Jenkins infrastructure statistics were displayed on a different site, which can still be accessed at the following repository:
The old site remains as a submodule in this new project. We retrieve the data from the old site and display it on the new site, ensuring that the statistics are always up to date.
The statistics displayed on this site are generated by the Jenkins usage stats project, which the old site automatiallcy pulls in on a monthly schedule.
One of the goals for future development, potentially as a project for Google Summer of Code (GSoC) 2025, would be to remove the dependency on the old site. Currently, the usage stats are generated and updated on the old site, and each time the new site is built, it pulls the old site as a submodule to retrieve the data.
A valuable enhancement would be to develop a method that allows the usage stats to automatically update directly on the new site, eliminating the need to rely on the old site as an intermediary. This would streamline the data retrieval process, reduce dependencies, and improve the overall efficiency and maintainability of the project.
This could be a significant improvement for future contributors to consider, aligning with the ongoing goal of modernizing and optimizing the Jenkins infrastructure statistics site.
- React: A JavaScript library for building user interfaces.
- TypeScript: A typed superset of JavaScript that compiles to plain JavaScript.
- Vite: A next-generation front-end tool that provides fast builds and instant Hot Module Replacement (HMR).
- ECharts: A powerful, interactive charting and visualization library.
- Jenkins CI/CD: Automated testing and deployment pipelines.
- Markdown: For writing documentation.
To get started with this project, you will need the following installed on your machine:
- Node.js (LTS version recommended)
- npm (latest stable version)
- Git: For cloning the repository and version control.
-
Clone the repository:
git clone https://github.com/jenkins-infra/stats.jenkins.io.git cd stats.jenkins.io
-
Retrieve data from infra-statistics:
./retrieve-infra-statistics-data.sh
-
Install dependencies:
npm install
-
Run the development server:
npm run dev
This will start the development server and open the website in your default browser. Any changes you make to the code will be automatically reflected in the browser thanks to Vite's HMR.
-
Build for production:
npm run build
This will create an optimized production build of your application in the
dist
directory. -
Preview the build locally:
After building the site, you can preview it locally to ensure everything is working as expected. Run the following command:
npm run preview
This will start a local static web server that serves the files from the
dist
directory. Open your browser and navigate to the provided URL to see the preview.
Contributions to the stats.jenkins.io
project are welcome! Please see the CONTRIBUTING.md file for more information on how to get involved.
For additional inspiration and detailed instructions, refer to the following documentation and resources:
- Vite Documentation
- React Documentation
- TypeScript Documentation
- Previous Issues and Pull Requests
- Jenkins Community - Connect