Search code examples
cloudbeesjenkins-workflow

Speeding up builds with Jenkins workflow plugin on CloudBees


Documentation on this is quite rare but are there any tips on how to speed up build on CloudBees, especially using the workflow plugin?

Usually -- when using the very same machine for subsequent builds, you can make use of caches or reuse previous computations. There are some quite expensive computations like downloading dependencies with SBT, Maven or Gradle; the initial npm install; Gemfile Cache that are quite expensive in time and computation but are great to cache.

On CloudBees you will most probably get a random (new) node for your builds, so there's no cache.

We are also using Snap-CI - there we have a persistent CACHE_DIR that allows that. Is there anything similar on CloudBees?


Solution

  • If you are referring to DEV@cloud, CloudBees’ hosted Jenkins, there is a cached workspace system, though it is not used for every build. (Depends on detail of hardware allocation in the cloud.) If you run a number of builds, over time you should see most of them picking up an existing workspace, and thus being able to use Maven local repository caches, etc.

    Use of the Workflow plugin as opposed to freestyle or other project types should not matter in this regard.