Caution

Buildbot no longer supports Python 2.7 on the Buildbot master.

2.5.12.41. Worker Filesystem Steps

Here are some buildsteps for manipulating the worker’s filesystem.

FileExists

This step will assert that a given file exists, failing if it does not. The filename can be specified with a property.

from buildbot.plugins import steps

f.addStep(steps.FileExists(file='test_data'))

This step requires worker version 0.8.4 or later.

CopyDirectory

This command copies a directory on the worker.

from buildbot.plugins import steps

f.addStep(steps.CopyDirectory(src="build/data", dest="tmp/data"))

This step requires worker version 0.8.5 or later.

The CopyDirectory step takes the following arguments:

timeout

If the copy command fails to produce any output for this many seconds, it is assumed to be locked up and will be killed. This defaults to 120 seconds. Pass None to disable.

maxTime

If the command takes longer than this many seconds, it will be killed. This is disabled by default.

RemoveDirectory

This command recursively deletes a directory on the worker.

from buildbot.plugins import steps

f.addStep(steps.RemoveDirectory(dir="build/build"))

This step requires worker version 0.8.4 or later.

MakeDirectory

This command creates a directory on the worker.

from buildbot.plugins import steps

f.addStep(steps.MakeDirectory(dir="build/build"))

This step requires worker version 0.8.5 or later.