A build directory contains most of the information needed to diagnose build issues. There are different ways to collect it.
From the UI
If using Support Core 2.67 or later, you can download directly from the UI. Navigate to the build page and click on the Support link. Then click on Generate Bundle:
you may adjust the options to collect specific data. For more details about the different options, have a look at the help
With the cbsupport CLI, you can download a build directory by using the command
cbsupport required-data build. See 2.5.2. Generating information for a Jenkins Build issue for more details.
From the File System
In any case, you can find the build directory of a specific build number in the file system under the Build Record Root Directory.
By default, it is
If the Build Record Root Directory is customized, its location can be found:
Before Jenkins 2.119, it is managed via GUI: Manage Jenkins > Configure System > Advanced
Since Jenkins 2.119, it is managed by
jenkins.model.Jenkins.buildsDirvia Features controlled by system properties.
you may exclude the underlying
On a Linux machine, you can use the
tar command to create an archive of the directory. An example command might look like this:
tar -cvzf $BUILD_FOLDER.tar.gz $JENKINS_HOME/jobs/$PATH_TO_JOB/builds/$BUILD_NUMBER
This command will create an archive file called "$BUILD_FOLDER.tar.gz" which you can then provide to CloudBees support.