About classes

A class is a group of jobs. Each job must be a member of one and only one class. You can use classes to apply different global management behaviors to each job in a class. A job gets its default class from the properties of its project. You can also manually choose a different class for a job when you launch it from the Jobs > Start page.

Classes have properties to manage the following activities:

About the Classes panel

Use the Classes panel to add, edit, and delete classes. To view the panel, select Projects > Classes. The system displays a list of classes. Select a class to edit its properties.

Screen image of the Classes panel in the Projects panel

The Access property of a class controls which users can view or change the class, based on the access group you assign.

Properties for deleting jobs automatically

Most of the properties for classes control what kinds of project data are deleted and under what conditions they are deleted.

The system checks for jobs to delete at an interval defined by the Purge Check Time system setting, which defaults to 15 minutes.

Note: You can also use schedules to denote when purges should be performed, so that the system does not try to run purges when the system is otherwise occupied. You can use this feature to have purges occur only at night, or once a week, for example. See Classes.

When a purge job runs, the system archives the job and deletes data according to settings in the class.

Delete Files
Determines what kinds of data are deleted. It has the following options:
Everything
Deletes all information about the job from the database and deletes the job directory from the servers that ran it.
Console Data
Deletes all information about the job from the database, but leaves the job directory on the server intact.
Logs And Files
Deletes the job directory and the logs, but retains step pass/failure information on the Jobs > Archived page.
Logs Only
Deletes only the job logs.
Files Only
Deletes the job directory on the servers that ran the job. Logs and some other information (such as step pass/fail status) remain within the database; the job record moves to the Jobs > Archived page.
Days*
The number of days old a job must be before it is deleted.
Count*
The maximum number of jobs allowed. When the number of jobs exceeds the Count value, the system schedules purge jobs to delete the extra builds. The default value, Unlimited, prevents the system from deleting jobs because of the number of jobs that exist.
Which
The Which property sets additional conditions that must be met before a job can be deleted. It has the following options:
Any Build
When this option is selected, the Which property has no effect on job deletion.
Only Failed
The system deletes only failed jobs.
Only Passed
The system deletes only passed jobs.
Keep 1 Pass
The system always retains the most recent passed job, even if it meets other deletion criteria.

* The system deletes jobs when either the Days or Count values are exceeded. For example, if you have Count set to 10 and Days set to 2, and there are 8 jobs, but 3 are more than 2 days old, those three jobs would be deleted. Similarly, if you had 12 jobs, all less than 2 days old, the two oldest jobs would be deleted.

When a purge job runs, the system archives the job and deletes data according to settings in the class.

Properties for launching projects on events

You can launch (chain) projects when certain events occur that are relevant to classes. Using these properties, you can model a progression of states in your processes.
The following properties of classes allow you to launch jobs when certain events occur:
Start on purge
This property launches the specified project when any job in the class is purged (that is, whenever the system starts a purge job for a job with this class). You can use this property to make sure that some specific files are deleted, which are not automatically deleted along with the purge.
Start on entry
This property launches the specified project when a job's class property is changed to this class. You can use this property to tie a process to the reclassification of a job; for example, you could create a Test class, and launch some standard tests when a job is promoted to the Test class.
Start on exit
This property launches the specified project when a job's class property is changed from this class to another class.

These properties launch projects as chains.

Note: If these properties launch a job that contains Must Change variables, the variable values are not changed.

Feedback