Optionally, a Groovy script can be written for any Input value that allows script. For example, FlexFields, Workflow Inputs, Subject, Message, and Precondition etc. Groovy script has access to various variables and methods listed below on this page.
FlexDeploy version 5.2.0.3 allows for finding such variables and methods using Variable Lookup help. Prior versions allowed such help with use of drop-down next to script input.
Variable | Description |
---|---|
ReleaseName | Name of the release provided when created |
SnapshotName | Name of the snapshot (auto generated by date and time when created) |
SnapshotDuplicateFilesFlag | True if there are duplicate files in the snapshot |
SnapshotDescription | Description of the snapshot |
StageExecutionId | ID of the execution |
stgexec | Allows access to execution details for Gate, Step, Deploy or Utility workflows. This variable was previously called FD_Release, which will continue to work but is deprecated now. |
stgexecinfo | Allows access to details entered by user on Stage Execution Info. It will not show any default values or FlexFields or WorkFlowInputs that are not set in the Stage Execution Info popup (The Paper Clip on the release dashboard screen) added in 5.2.0.3 |
Methods for stgexec variable.
Method | Description |
---|---|
stgexec.areAllProjectsDeployed() | Returns true if All project in snapshot are deployed.
|
stgexec.areAllProjectsDeployed(groupName) | Returns true if projects in a specific groupName are deployed.
|
stgexec.areAllUtilitySuccessful() | returns true if all utility workflows were successful |
stgexec.areAllUtilitySuccessful(groupName) | returns true if all utility workflows in a specific group were successful |
stgexec.getEnvironmentCode() | returns environment code |
stgexec.getReleaseName() | returns the name of the release |
stgexec.getProjectStageExecution(projectId, packageName) | returns ProjectStageExecution given a project ID and package name |
stgexec.getProjectStageExecution(projectName, packageName) | returns ProjectStageExecution given a project name and package name |
stgexec.getSnapshotName() | returns the name of the snapshot |
stgexec.getSnapshotProjects() | returns the projects in the snapshot |
stgexec.getSnapshotProjectsAsString() | returns all project names in snapshot concatenated in the format "ProjectName, PartialProjectName (PackageName), ..." |
stgexec.getSnapshotDeployedProjects() | returns the projects in the snapshot which were deployed |
stgexec.getSnapshotDeployedProjectsAsString() | returns all deployed project names in snapshot concatenated in the format "ProjectName, PartialProjectName (PackageName), ..." |
stgexec.getSnapshotFailedProjects() | returns the projects in the snapshot which failed to deploy |
stgexec.getSnapshotFailedProjectsAsString() | returns all failed project names in snapshot concatenated in the format "ProjectName, PartialProjectName (PackageName), ..." |
stgexec.getSnapshotSkippedProjects() | returns the projects in the snapshot which were skipped |
stgexec.getSnapshotSkippedProjectsAsString() | returns all skipped project names in snapshot concatenated in the format "ProjectName, PartialProjectName (PackageName), ..." |
stgexec.getSnapshotNotAttemptedProjects() | returns the projects in the snapshot which were not attempted |
stgexec.getSnapshotNotAttemptedProjectsAsString() | returns all not attempted project names in snapshot concatenated in the format "ProjectName, PartialProjectName (PackageName), ..." |
stgexec.isAnyDeployFailed() | returns true if any projects failed to deploy |
stgexec.isAnyDeployFailed(groupName) | returns true if any projects in a specific group of projects failed to deploy |
stgexec.isAnyDeployOrUtilityFailed() | returns true if any projects or utility workflows failed |
stgexec.isAnyDeployOrUtilityFailed(groupName) | returns true if any projects or utility workflows in a specific group failed |
stgexec.isAnyUtilityFailed() | returns true if any utility workflows failed |
stgexec.isAnyUtilityFailed(groupName) | returns true if any utility workflows in a specific group failed |
stgexec.isProjectDeployed(projectId, packageName) | returns true if a project is deployed, given the project ID and package name |
stgexec.isProjectDeployed(projectName, packageName) | returns true if a project is deployed, given the project name and package name |
stgexec.isProjectFailed(projectId, packageName) | returns true if a project failed to deploy, given the project ID and package name |
stgexec.isProjectFailed(projectName, packageName) | returns true if a project failed to deploy, given the project name and package name |
stgexec.isProjectSkipped(projectId, packageName) | returns true if a project is skipped, given the project ID and package name |
stgexec.isProjectSkipped(projectName, packageName) | returns true if a project is skipped, given the project name and package name |
stgexec.isProjectNotAttempted(projectId, packageName) | returns true if a project was not attempted, given the project ID and package name |
stgexec.isProjectNotAttempted(projectName, packageName) | returns true if a project was not attempted, given the project name and package name |