Coder Social home page Coder Social logo

rusty_jenkins's Introduction

Rusty Jenkins

This repository is an experiment to observe and document the behavior or Jenkin's build discarder.

The default implementation of Jenkin's BuildDiscarder is called LogRotator. The LogRotator accepts four arguments: daysToKeepStr, numToKeepStr, artifactDaysToKeepStr, artifactNumToKeepStr. According to the documentation, the arguments have the following semantics.

daysToKeepStr: History is only kept up to this days.
numToKeepStr: Only this number of build logs are kept.
artifactDaysToKeepStr: Artifacts are only kept up to this days.
artifactNumToKeepStr: Only this number of builds have their artifacts kept.

The parameter names and documentation may seem obvious but can be deceptive. For example, when numToKeepStr is set to 10, every branch and pull request allows 10 builds to persist. Therefore, given a repository with three branches:

$ git branch
  development
  documentation
* master

The maximum allowable number of persisted builds is 3 * 10 = 30.

Deep Dive

Assuming Jenkins was installed according to the "Installing Jenkins" guide, Jenkins stores build logs and artifacts in the location /var/jenkins_home/jobs/<repository>/branches. For each branch and pull request Jenkins creates a directory to store build logs and artifacts. For example, given the branches master, development, documentation, and one pull request, Jenkins will have the following directory structure:

$ pwd
/var/jenkins_home/jobs/<repository>

$ tree branches
branches
├── PR-1
├── development
├── documentation
└── master

Inside one of the directories, the tree structure looks something like:

$ pwd
/var/jenkins_home/jobs/<repository>/branches

$ tree master
master
├── builds
├── config.xml
├── lastStable
├── lastSuccessful
├── name-utf8.txt
├── nextBuildNumber
├── scm-polling.log
└── scm-revision-hash.xml

rusty_jenkins's People

Contributors

aaronang avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.