You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 30
Next »
Many project configuration options are available to the templates screen. This page seeks to list all of the available methods and enough information to use them in your templates.
Script Variables
Variable Name | Description |
---|
Project | Project being created. This corresponds to one row in input CSV file and will eventually create one single Project. |
<Custom Inputs> | Inputs defined on Template. |
General Project Methods
Method | Required | Description |
---|
Project.setProjectPath(String pProjectPath) | Yes | Set Project path. For example. FlexDeploy/SOA/HR. In this example, SOA folder will be created if it does not exist and HR application will be created if it does not exist. |
Project.setProjectName(String pProjectName) | Yes | Set Project Name. |
Project.setDeployPriority(Integer pDeployPriority) | No | Set Project Priority. If not supplied 1 is used. |
Project.setDeployPriorityScope(String pDeployPriorityScope) | No | Defaults to Application. Possible values are Application,Folder,Global. |
Project.setDescription(String pDescription) | No |
|
Project.addProperty(String pPropertyName, Object pPropertyValue) | No |
|
Project.setActive(boolean pActive) | No | Default would be true. |
Workflow Methods
Method | Required | Description |
---|
Project.setBuildWorkflowName(String pBuildWorkflowName) | Yes | Set Build Workflow name to be used by Project. |
Project.setDeployWorkflowName(String pDeployWorkflowName) | Yes | Set Deploy Workflow name to be used by Project. |
Instance Methods
Method | Required | Description |
---|
Project.setBuildInstanceName(String pBuildInstanceName) | Yes | Set Build Instance Code to be used for Project. |
Project.addDeployInstances(String pDeployInstances) | Yes | Set one or more Deploy Instance Code to be used for Project. Use comma (,) if you are passing more than one Deploy instance codes or call method more than once with single value. |
Source Control Configuration Methods
SCM Type
Use one of the two options shown below.
Method | Required | Description |
---|
Project.setSCMType(pSCMType) | No | Set SCM Type or use Project Defaults. Possible values are SVN, GIT, TFVC, CVS, PERF, CCUCM, PVCS. |
Method | Required | Description |
---|
Project.setSVNForSCM() | No | Call to use Subversion for Project. |
Project.setGITForSCM() | No | Call to use Git for Project. |
Project.setTFVCForSCM() | No | Call to use Microsoft TFVC for Project. |
Project.setCVSForSCM() | No | Call to use CVS for Project. |
Project.setPERFForSCM() | No | Call to use Perforce for Project. |
Project.setCCUCMForSCM() | No | Call to use ClearCase UCM for Project. |
Project.setPVCSForSCM() | No | Call to use PVCS for Project. |
Stream Settings
Add additional project streams if necessary. These streams are what the int pSequenceNumber
in the SCM details section below refer to.
Project.createStreamFromMainStream(String pStreamName)
Project.createStream(String pStreamName, String pVersionSyntaxScript)
Project.createStream(String pStreamName, String pVersionSyntaxScript, String pDescription)
Project.createStream(String pStreamName, String pVersionSyntaxScript, String pDescription, String pAttribute1, String pAttribute2, String pAttribute3)
SCM Details
Next, configure the SCM details for your selected SCM Type. Choose one of the methods that contains the options that you need to configure for your projects from the list.
If SCM Defaults are setup under Administration → Defaults, these may be unnecessary.
SCM Type | Supported Methods |
---|
SVN |
Project.addSVNConfig(int pSequenceNumber, String pInstanceCode)
Project.addSVNConfig(int pSequenceNumber, String pInstanceCode, String pTrunkPathScript, String pBranchPathScript, String pTagPathScript, String pCheckoutDirectory)
|
GIT |
Project.addGITConfig(int pSequenceNumber, String pInstanceCode)
Project.addGITConfig(int pSequenceNumber, String pInstanceCode, String pBranchPathScript, String pTagPathScript, String pCheckoutDirectory, String pSparseCheckoutFoldersScript)
|
TFVC |
Project.addTFVCConfig(int pSequenceNumber, String pInstanceCode)
Project.addTFVCConfig(int pSequenceNumber, String pInstanceCode, String pMainPathScript, String pBranchPathScript, String pLabelNameScript, String pCheckoutFolderScript)
|
PERF |
Project.addPERFConfig(int pSequenceNumber, String pInstanceCode)
Project.addPERFConfig(int pSequenceNumber, String pInstanceCode, String pMainPathScript, String pBranchPathScript, String pLabelNameScript, String pCheckoutFolderScript)
|
CVS |
Project.addCVSConfig(int pSequenceNumber, String pInstanceCode)
Project.addCVSConfig(int pSequenceNumber, String pInstanceCode, String pModuleNameScript, String pBranchNameScript, String pTagScript, String pCheckoutFolderScript)
|
CCUCM |
Project.addCCUCMConfig(int pSequenceNumber, String pInstanceCode)
Project.addCCUCMConfig(int pSequenceNumber, String pInstanceCode, String pProjectVobScript, String pVobPathsScript, String pStreamScript, String pLabelNameScript, String pCheckoutFolderScript)
|
PVCS |
Project.addPVCSConfig(int pSequenceNumber, String pInstanceCode)
Project.addPVCSConfig(int pSequenceNumber, String pInstanceCode, String pProjectPathScript, String pPromotionGroupScript, String pUsingPGScript, String pBranchPathScript, String pLabelNameScript, String pCheckoutFolderScript)
|
Continuous Integration Methods
//These methods add Continuous Integration into your project.
putYourVariableNameHere = Project.addPollSCMTrigger(int pIntervalMinutes, String pStreamName, String pEnvironmentName)
putYourVariableNameHere = Project.addScheduledBuildTrigger(String pCronExpression, String pStreamName, String pEnvironment)
putYourVariableNameHere = Project.addScheduledDeployTrigger(String pCronExpression, String pStreamName, String pEnvironment)
putYourVariableNameHere = Project.addPostBuildTrigger(String pStreamName, String pEnvironment)
// The following methods are available on the object returned from the methods above so inputs and Flexfields can be added to the trigger.
putYourVariableNameHere.addFlexField(String pFlexFieldName, String pValue)
putYourVariableNameHere.addInput(String pInputName, String pValue)
//For example, to add a Poll SCM trigger with a FlexField and an input, you would write code like this. trigger1 is a variable, its name isn't important, but must match.
trigger1 = Project.addPollSCMTrigger(5, "trunk", "DEV01")
trigger1.addFlexField("Change_Number", "Built by CI Poll SCM")
trigger1.addInput("input", "Built by CI Poll SCM")