{"id":18542206,"url":"https://github.com/heremaps/buildrotator-plugin","last_synced_at":"2025-07-02T09:32:18.702Z","repository":{"id":71903037,"uuid":"72435213","full_name":"heremaps/buildrotator-plugin","owner":"heremaps","description":"A Jenkins plugin to perform rotation of build history with low memory pressure.","archived":false,"fork":false,"pushed_at":"2023-12-16T07:15:20.000Z","size":11,"stargazers_count":3,"open_issues_count":2,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-10T11:51:21.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heremaps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-31T12:41:48.000Z","updated_at":"2020-02-10T13:49:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"8375a436-0f66-4722-9e4a-aeecab4a9604","html_url":"https://github.com/heremaps/buildrotator-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/heremaps/buildrotator-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heremaps%2Fbuildrotator-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heremaps%2Fbuildrotator-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heremaps%2Fbuildrotator-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heremaps%2Fbuildrotator-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heremaps","download_url":"https://codeload.github.com/heremaps/buildrotator-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heremaps%2Fbuildrotator-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263111399,"owners_count":23415444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:07:44.696Z","updated_at":"2025-07-02T09:32:18.691Z","avatar_url":"https://github.com/heremaps.png","language":"Java","readme":"# Build Rotator Plugin\n\nA Jenkins plugin which allows to perform rotation of build history with low memory pressure.\n\nTable of contents\n---\n\n1. [Overview](#overview)\n1. [Building](#building)\n1. [Basic Usage](#basic-usage)\n1. [Authors](#authors)\n1. [License](#license)\n\nOverview\n---\n\nThe reason we created this plugin is because we found the default rotation in Jenkins to use a lot of memory. In our case 25% percent of memory footprint was related to job history rotation alone.\nThis is caused by an implementation detail of the default implementation: It guarantees that if you want to keep only last *X* builds in history, it would keep **exactly** *X* builds.\nThe main idea of this plugin is to make a little bit different guarantee: If you want to keep only last *X* builds in history, it would keep a **maximum** of *X* builds.\n\nHere are some examples to illustrate the difference.\n\nLet us assume that we have 5 builds in history and we want to keep 5 builds:\n- build1\n- build2\n- build3\n- build4\n- build5\n\nAfter that you want to remove `build3`, because it is broken. So, now you have only:\n- build1\n- build2\n- build4\n- build5\n\nAnd after `build6` just finished:\n- build1\n- build2\n- build4\n- build5\n- build6\n\nThe `Log Rotator` strategy in this case would load the entire history in memory to check whether there are 5 builds in reality or not, and it would not delete anything at the end. As a result the list would be the same:\n- build1\n- build2\n- build4\n- build5\n- build6\n\n\nThe `Build Rotator` is checking only the difference between last build number and the number of builds it should keep. And if it's more than 5, it would remove the first build. So, afterwards you would have:\n- build2\n- build4\n- build5\n- build6\n\nMore importantly, `Build Rotator` respects all other aspects of rotation in same way as the `Log Rotator` strategy. IN particular, it does not remove:\n- Builds that have \"Keep log\" enabled.\n- The \"Last successful build\" in the history.\n- The \"Last stable build\" in the history.\n- An ongoing build.\n\nBuilding\n---\n\nPrerequisites:\n\n- JDK 7 (or above)\n- Apache Maven\n\nBuild process is quite simple:\n\n```Shell\nmvn install\n```\n\nBasic Usage\n---\n\nTo get started:\n\n1. Install the plugin.\n1. Go to the Jenkins Configuration.\n1. Enable on \"Discard Old Builds\".\n1. Set the \"Build Rotator\" strategy.\n\nAuthors\n---\n\nAlexander Akbashev - \u003calexander.akbashev@here.com\u003e\n\nLicense\n---\n\nLicensed under the [MIT License (MIT)](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheremaps%2Fbuildrotator-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheremaps%2Fbuildrotator-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheremaps%2Fbuildrotator-plugin/lists"}