Ease Your Team Creation Process with Team Creation Recipes

Written by: Baptiste Mathus

At Jenkins World 2017, we presented the new user experience for CloudBees Jenkins Enterprise. More recently, we added a way to define what we called Team Creation Recipes: a template to onboard new teams and create masters with a predefined set of configuration values.

For the first delivery of this feature, in a given recipe we can define the list of plugins that should be installed on the provisioned master.

Let’s illustrate this with a simple use case: as an administrator, imagine you know the plugins to be installed. Let’s consider you would like to have buildtriggerbadge and pipeline-maven plugins installed.

First, you would typically export the full list of existing recipes to get an easy editing (Note: the CLI call below is a simplification for better readability of the normal Jenkins CLI calls, see more details in the official documentation):

$> cli team-creation-recipes > recipes.json

Then, in the created recipes.json file, remove the recipes you don’t want. And add a new recipe with a dedicated name java-maven-development. If you keep only this recipe, the result would like the following:

$> cat recipes.json
{
 "version": "1",
 "data": [
   {
     "name": "java-maven-development",
     "displayName": "Java Maven Development",
     "description": "Initial Jenkins setup for Java & Maven development.",
     "plugins": [
       "buildtriggerbadge",
       "pipeline-maven"
     ],
     "default": true
   }
 ]
}

NOTE: the version of the plugins (buildtriggerbadge and pipeline-maven) is driven by the plugin manager in use, not necessarily the latest version. In other words, if this is a plugin that is part of the CloudBees Assurance Program, the version verified by CloudBees will be installed. The “default” attribute lets you define the recipe that will be selected by default in the UI. The “version” attribute is a generic attribute of the CLI payloads to handle backward compatibility (always “1” currently, may be incremented in future versions of the CLI command for backward compatibility reasons). _

Once you’re done with this, use this file as an input to update the list of recipes:

$> cli team-creation-recipes --put < recipes.json
{
  "version": "1",
  "data": {
    "id": null,
    "message": "Recipes list updated successfully",
    "status": "success"
  }
}

Then, using either the teams CLI, or through the UI, you can now use "Java Maven Development" to create your master, and have it directly provisioned with the requested plugins.

Here, is for example, what the user interface will look like with this new recipe selected for creation:

For more detailed and up to date information, please refer to the official documentation for the CloudBees Jenkins Enterprise documentation. We are constantly evolving CloudBees Jenkins Enterprise, and hence are obviously eager to hear from you. Please never hesitate to tell us what you would like to see added to our products.

Stay up to date

We'll never share your email address and you can opt out at any time, we promise.