Skip to content

Project LINUX_BUILDS

The JenkinsLint Plugin has mainly two goals:

  • To make it easier to detect issues in your Jenkins configuration that will cause Jenkins to blow up when you attempt to run those jobs.
  • To encourage discussion within the Jenkins community on the more subjective stuff. Having a set of checks to base discussion on helps drive out what we as a community think is good style.

  • StatusDefect NameDescription
    JobNameCheckerWhen creating Jenkins Jobs you must avoid whitespace. In order to comply with the style guide.
    JobDescriptionCheckerJenkins project description might help you to know what it does and further details.
    JobAssignedLabelCheckerWhen setting Jenkins Jobs you should set where those Jobs can run.
    MasterLabelCheckerWhen setting Jenkins Jobs you should set where those Jobs can run. and avoid master label.
    Jenkins master shouldnt consume any CPU for building jobs.
    JobLogRotatorCheckerWhen setting Jenkins Jobs with some Log Rotator configuration helps to reduce the
    amount of disk space and speed up Jenkins UI.
    MavenJobTypeCheckerMaven job type builds considerably slowly compared to the freestyle projects.
    Besides of that it has its own set of bugs. Its worth to use freestyle jobs and specify the maven build wrapper instead.
    Open ticket.
    CleanupWorkspaceCheckerThere are some builds which demand a lot of disc space. Some builds might run out of space during the build itself and cause build errors.
    Its recommended to wipe out those workspaces after building.
    JavadocCheckerWhen setting Jenkins Jobs with Javadoc post build you should either set which javadocs or remove this unused publisher phase.
    Otherwise the archive artifact phase may not match what you expect.
    ArtifactCheckerWhen setting Jenkins Jobs with Archive Artifact post build you should either set which artifacts or remove this unused publisher phase.
    Otherwise the archive artifact phase may not match what you expect.
    NullSCMCheckerJenkins works fine with cron/batch tasks, Its strongly recommended to use any SCM tool and therefore to have in that repo whatever script you need to run.
    PollingSCMTriggerCheckerPolling a repository from Jenkins is inefficient; it adds delay on the order of minutes before a build starts after a commit is pushed, and it adds additional loads.
    It is much better instead to do push-notification from the repository.
    GitShallowCheckerWhen setting Jenkins Jobs with Git SCM Artifact you might speed up the cloning time if you use shallow cloning.
    MultibranchJobTypeCheckerPolling in Jenkins is inefficient, MultibranchJobProject polls for new branches and also every branch polls for new changes.
    Its strongly recommended to use another approach, such as: WebHooks, Configuration as Code, ...
    HardcodedScriptCheckerWhen setting Jenkins Jobs with Shell/Batch builds you shouldnt hardcoded the script its recommended to track them in your SCM tool instead.
    Otherwise you wont be able to reproduce your CI environment easily.
    GradleWrapperCheckerBy distributing the wrapper with your project, anyone can work with it without needing to install Gradle beforehand. Even better, users of the build
    are guaranteed to use the version of Gradle that the build was designed to work with. Further details: Gradle Wrapper docs.
    TimeoutCheckerThere are some builds which might hang forever and cause inaction in the build queue and slaves. Its recommended to control those time based
    on the build timeout plugin.
    GroovySystemExitCheckerSystem groovy scripts run in same JVM as Jenkins master, so theres no surprise that System.exit() kills your Jenkins master.
    Throwing an exception is definitely better approach how to announce some problem in the script. Further details: JENKINS-14023.
    GitRefCheckerWhen setting Jenkins Jobs with Git SCM you might speed up the cloning time if you use git ref repos when cloning.
    TimerTriggerCheckerWhen setting Jenkins Jobs with some Timer trigger configuration use the symbol H (for "hash") wherever possible
    to allow periodically scheduled tasks to produce even load on the system.
    GitRefSubmoduleCheckerWhen setting Jenkins Jobs with Git SCM you might speed up the cloning time if you use git ref repos when cloning submodules.
    BFACheckerCategorise and analyse failed builds automatically helps to knowledge share and collaborate within a team and other teams.
    There are some plugins which might help you to do so, for instance: Build Failure Analyzer.
    GroovySandboxCheckerThe Groovy Sandbox helps to protect the Jenkins instance from scripts which are incompetent, malicious, or both. Do not disable the Groovy Sandbox.