All methods Many project configuration options are available to be used on the Project object in the template script.
To use them, add lines like this to the script:
...
...
the templates screen. This page seeks to list all of the available methods and enough information to use them in your templates.
General Project Methods
Code Block |
---|
|
void Project.setProjectPath(String pProjectPath)
String getProjectPath()
void Project.setProjectName(String pProjectName) String getProjectName()
void Project.setDeployPriority(Integer pDeployPriority) Integer getDeployPriority()
void Project.setDeployPriorityScope(String pDeployPriorityScope) String getDeployPriorityScope()
void Project.setDescription(String pDescription) String getDescription()
void Project.addProperty(String pPropertyName, Object pPropertyValue)
void Project.setActive(String pActive) void Project.setActive(boolean pActive)
boolean isActive() |
Workflow Methods
Code Block |
---|
|
void Project.setBuildWorkflowName(String pBuildWorkflowName)
String getBuildWorkflowName()
void Project.setDeployWorkflowName(String pDeployWorkflowName)
String getDeployWorkflowName() |
Instance Methods
Code Block |
---|
|
void Project.setBuildInstanceName(String pBuildInstanceName)
String getBuildInstanceName()
void setDeployInstanceNames(List<String> mDeployInstanceNames)
void Project.addDeployInstances(String... pDeployInstances) void Project.addDeployInstances(String pDeployInstances) void Project.addDeployInstances(String pDeployInstances, String pDelimiter) void Project.addDeployInstanceName(String pDeployInstanceName)
List<String> getDeployInstanceNames() |
...
SCM Methods
SCM Type
Info |
---|
PERF (Perforce) support was added in 4.0.2. |
Code Block |
---|
title | Setting the SCM Type for the Projects |
---|
|
Project.setSCMType("SCM Type")
Valid Strings for the "SCM Type" are SVN, GIT, TFS, CVS, PERF
Or, use one of these methods instead:
Project.setSVNForSCM()
Project.setGITForSCM()
Project.setTFVCForSCM()
Project.setCVSForSCM()
Project.setPERFForSCM() |
Stream Settings
Add additional project streams if necessary. These streams are what the int pSequenceNumber
in the SCM details section below refer to.
Code Block |
---|
|
void setSCMType(String pSCMType)
//SVN, GIT, CVS, and TFS
String getSCMType()
void setSVNForSCM()
MassloadSCMConfig 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 | Code Block |
---|
Project.addSVNConfig(int pSequenceNumber, String pInstanceName)
|
|
...
Project.addSVNConfig(int pSequenceNumber, String pInstanceName, String pTrunkPathScript, String pBranchPathScript, String pTagPathScript, String pCheckoutDirectory) |
|
...
|
GIT | Code Block |
---|
Project.addGITConfig(int pSequenceNumber, String pInstanceName)
|
|
...
Project.addGITConfig(int pSequenceNumber, String pInstanceName, String pBranchPathScript, String pTagPathScript, String pCheckoutDirectory, String pSparseCheckoutFoldersScript) |
|
...
|
TFVC | Code Block |
---|
Project.addTFVCConfig(int pSequenceNumber, String pInstanceName)
Project.addTFVCConfig(int pSequenceNumber, String pInstanceName, String pMainPathScript, String pBranchPathScript, String pLabelNameScript, String pCheckoutFolderScript) |
|
PERF | Perforce support was added in FlexDeploy 4.0.2 Code Block |
---|
Project.addPERFConfig(int pSequenceNumber, String pInstanceName)
Project.addPERFConfig(int pSequenceNumber, String pInstanceName, String pMainPathScript, String pBranchPathScript, String pLabelNameScript, String pCheckoutFolderScript) |
|
CVS | Code Block |
---|
Project.addCVSConfig(int pSequenceNumber, String pInstanceName)
Project.addCVSConfig(int pSequenceNumber, String pInstanceName, String pModuleNameScript, String pBranchNameScript, String pTagScript, String pCheckoutFolderScript) |
|
Continuous Integration Methods
Code Block |
---|
|
MassloadTriggerputYourVariableNameHere = Project.addPollSCMTrigger(int pIntervalMinutes, String pStreamName, String pEnvironmentName)
putYourVariableNameHere MassloadTrigger= Project.addScheduledBuildTrigger(String pCronExpression, String pStreamName, String pEnvironment)
putYourVariableNameHere MassloadTrigger= Project.addScheduledDeployTrigger(String pCronExpression, String pStreamName, String pEnvironment)
putYourVariableNameHere MassloadTrigger= Project.addPostBuildTrigger(String pStreamName, String pEnvironment)
// The following methods are available on the object returned from the MassloadTriggermethods objectabove 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") |