NAME

BuildForge::API::Project


SYNOPSIS

        my $Project = new BuildForge::API::Project();
        $Project->{'title'} = "My New Project";
        $Project->Create();


DESCRIPTION

    This is available to use after a BuildForge::API object has been 
instantiated. It is used to create new BuildForge Projects, and to access 
existing project information.


METHODS

new({ProjectParamsHashRef})

Create an object to access existing project information or to add a new project to the BuildForge console.

title
The name for the project

tag_format
Tag format for the Project

selector
Default Selector name for the project

sticky
Lock project to the server selected by the selector (0 or 1)

environment_id
ID of the environment group to use (integer)

pass_notify_group
Group name to notify upon project success.

fail_notify_group
Group name to notify upon project failure.

tagsync
Project ID to sync tag variables with.

access_group_id
ID of the access level for this project

class
The class for the project.

maxthread
Maximum number of threads for this project (integer)

exclusive
Max number of running instances of this project.

project_id
ID used to uniquely identify the project inside BuildForge

Sync()

Populates the Project object with data from the BF Console. Requires either Project 'title' or 'project_id' to be set.

GetEnvironment()

Returns a BuildForge::API::Environ object representing the Project Environment. Requires either Project 'title' or 'project_id' to be set.

Clobber()

Clobbers the project from the management console. The project, all steps, all builds, and all log data are removed. Use with caution. Requires either Project 'title' or 'project_id' to be set.

Fire({EnvHashRef},{ClassName})

Starts a build of the Project. Requires either Project 'title' or 'project_id' to be set. Returns the internal Build ID of the started build.

EnvHashRef
A Hash ref of environment name/value pairs to be set after the project env is set. If any of the names exist within the Project Env, they will adopt the same action. For example, if you Append to the PATH within the Project env, and you pass Fire() with a hashref that contains PATH information, both PATH variables will be appended to the projects running path.

ClassName
The name of the class to run this with.

Create(From)

Create a new Project inside BuildForge. Requires Project 'title' to be set. The optional From parameter allows you to use an existing Project as a template. All settings except the project title will then be taken from the source project.

From
A BuildForge::API::Project Object to use as a template for this new project.

AddStep(Step)

Adds a step to an existing Project. Requires either Project 'title' or 'project_id' to be set.

Step
BuildForge::API::Step object (required).

UpdateStep(Step,MoveToHashRef)

Updates a Project Step, and optionally allows you to change its location.

Step
BuildForge::API::Step object (required).

MoveToHashRef
A hashref containing one key: {MoveTo => Step Object or location(1 based)}

DeleteStep(Step)

Deletes a step from a Project. Requires either Project 'title' or 'project_id' to be set.

Step
BuildForge::API::Step object (required).

AddTagVar(TagVar)

Adds a tag variable to project. Requires either Project 'title' or 'project_id' to be set.

TagVar
A BuildForge::API::TagVar object (required).

DeleteTagVar(TagVar)

Deletes a tag variable from a project. Requires either Project 'title' or 'project_id' to be set.

TagVar
A BuildForge::API::TagVar object (required).

GetLastError()

Returns the last error code encountered by the object.

GetLastMessage()

Returns an last message string encountered by the object.

StepList()

Returns an array ref of hash refs containing step details. Requires either Project 'title' or 'project_id' to be set.

AddRegister(Register)

Add a Register entry to the Project. Requires either Project 'title' or 'project_id' to be set.

Register
A BuildForge::API::Register object (required).

DeleteRegister(Register)

Deletes a register from the Project. Requires either Project 'title' or 'project_id' to be set.

Register
A BuildForge::API::Register object (required).

RegisterList()

Returns an array ref of hash refs containing register details. Requires either Project 'title' or 'project_id' to be set.

TagVarList()

Returns an array ref of hash refs containing tag variable details. Requires either Project 'title' or 'project_id' to be set.

Sync()

Syncs the object with information from the console database. Requires either Project 'title' or 'project_id' to be set.


AUTHOR

BuildForge, Inc.