description of the current or specified application
$ApplicationDescription([appName])
Name | Description |
---|---|
appName | Application Name |
Returns true if the application with the specified name exists, optionally including inactive applications.
$ApplicationExists(Name, [IncludeInactive])
Name | Description |
---|---|
☆ Name | The name of the application to look for. |
IncludeInactive | When false, this function will return false if the specified application exists but is inactive; otherwise, it will return true for inactive applications as well. The default value is false. |
name of the current application group
$ApplicationGroupName
ID of the current application
$ApplicationId
name of the current application
$ApplicationName
list of applications which belong to the specified application group
@ApplicationsInGroup(groupName)
Name | Description |
---|---|
☆ groupName | Application Group Name |
Gets a list of release numbers in an application, optionally filtered by status.
@ReleasesInApplication([ApplicationName], [Status])
Name | Description |
---|---|
ApplicationName | Application Name |
Status | active, deployed, cancelled, or any. |
gets the path within the internal disk store for the specified artifact
$ArtifactPath(ArtifactName, [buildNumber], [releaseNumber], [applicationName])
Name | Description |
---|---|
☆ ArtifactName | artifactName |
buildNumber | Build Number |
releaseNumber | Release Number |
applicationName | Application Name |
list of all the artifacts in the current or specified build
@ArtifactsInBuild([buildNumber], [releaseNumber], [applicationName])
Name | Description |
---|---|
buildNumber | Build Number |
releaseNumber | Release Number |
applicationName | Application Name |
Git branch for the current or specified build
$Branch([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Gets the internal ID of the specified page.
$BuildMasterId(Page, [ApplicationName], [ReleaseNumber], [BuildNumber])
Name | Description |
---|---|
☆ Page | Must be "application", "release", or "build". |
ApplicationName | Application Name |
ReleaseNumber | Release Number |
BuildNumber | Build Number |
Gets the URL of the specified page.
$BuildMasterUrl(Page, [ApplicationName], [ReleaseNumber], [BuildNumber])
Name | Description |
---|---|
☆ Page | Must be "application", "release", or "build". |
ApplicationName | Application Name |
ReleaseNumber | Release Number |
BuildNumber | Build Number |
build number of the current or specified release
$BuildNumber([releaseNum], [furthestOrLatest], [appName])
Name | Description |
---|---|
releaseNum | Release Number |
furthestOrLatest | Must be "furthest" or "latest"; the default is "latest". |
appName | Application Name |
Gets a list of builds in a release, optionally filtered by status and pipeline stage.
@BuildsInRelease([ReleaseNumber], [ApplicationName], [Status], [PipelineStage])
Name | Description |
---|---|
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Status | active, deployed, rejected, or any. |
PipelineStage | Pipeline Stage |
Gets the value of a variable defined on a build.
BuildVariable(VariableName, [BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
☆ VariableName | Variable Name |
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Identifier of the build imported from a CI server for the current or specified BuildMaster build
$CIBuild([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Number of the build imported from a CI server for the current or specified BuildMaster build
$CIBuildNumber([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Name of the CI Project resource imported from a CI server for the current or specified BuildMaster build
$CIProject([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Name of the CI Project scope (e.g. Jenkins Branch, TeamCity BuildConfiguration) associated with the current or specified build
$CIProjectScope([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Git commit hash for the current or specified build
$Commit([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Docker Repository for the current or specified build
$DockerRepository([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Most recently associated Docker tag associated with the Docker Repository on the current or specified build
$DockerTag([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Most recent pull request created for the current or specified build
$PullRequestId([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
Git repository name the current or specified build
$Repository([BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
list configuration file instances defined for an application
@ConfigurationFileInstances(configurationFileName, [appName])
Name | Description |
---|---|
☆ configurationFileName | The name of the configuration file. |
appName | The name of the application. |
list configuration files defined for an application
@ConfigurationFiles([appName])
Name | Description |
---|---|
appName | The name of the application. |
text contents of the specified configuration file instance
$ConfigurationFileText(instance, [fileName], [releaseNum])
Name | Description |
---|---|
☆ instance | The instance name of the configuration file. |
fileName | The name of the configuration file, or defaults to single configuration file for the contextual deployable. |
releaseNum | A specific release number, or defaults to contextual release number. |
version number used for deployment of the specified configuration file
$ConfigurationFileVersion([fileName], [releaseNum])
Name | Description |
---|---|
fileName | The name of the configuration file, or defaults to single configuration file for the contextual deployable. |
releaseNum | A specific release number, or defaults to contextual release number. |
Gets the digest of a Docker image. The digest is from the image associated with the current build.
$ContainerDigest(repositoryName, [tag], [sourceName])
Name | Description |
---|---|
☆ repositoryName | Repository Name |
tag | Tag |
sourceName | Source Name |
Gets a list of Docker images in the current build. Each returned element is a map: %(Name: SomeName, Tag: 1.2.3, Digest: sha1:3924abbeeea2162, Repository: repositoryName)
@ContainersInBuild([repositoryName])
Name | Description |
---|---|
repositoryName | Optional name of the repository to filter by. |
Gets the tag of the specified Docker image associated with the current build.
$ContainerTag(repositoryName, [sourceName])
Name | Description |
---|---|
☆ repositoryName | Repository Name |
sourceName | Source Name |
the decrypted plain text value of a specified credentials property
$SecureCredentialProperty(credential, property)
Name | Description |
---|---|
☆ credential | The name of the credential to read. |
☆ property | The name of the credential property to get. If the property is encrypted, the credential itself must be configured to allow the value to be extracted, otherwise the function call will fail at run time. |
# HDarsUser is a Username & Password Credentials with 'Allow encrypted properties...' checked set $username = $SecureCredentialProperty(HDarsUser, Username); set $password = $SecureCredentialProperty(HDarsUser, Password); Log-Debug Executing sometool.exe -user $username -pass *****; Exec sometool.exe -user $username -pass $password;
the value of a specified secure resource property
$SecureResourceProperty(resource, property, [type])
Name | Description |
---|---|
☆ resource | The name of the resource to read. |
☆ property | The name of the resource property to get. |
type | The type of the resource property to get. |
# InternalProGet is a ProGet Secure Resource set $host = $CredentialProperty(InternalProGet, ServerUrl); exec sometool.exe --host $host;
list of database connections for the current application which belong to the specified environment
@DatabaseConnectionsInEnvironment([environmentName])
Name | Description |
---|---|
environmentName | Environment Name |
list of applications which import at least one deployable from the specified application
@DependentApplications([appName])
Name | Description |
---|---|
appName | The name of the application to return dependents for. If not specified, the application in the current context is used. |
list of active or deployed releases from the specified application with at least one deployable imported from the current release of the current application
@DependentReleases(appName)
Name | Description |
---|---|
☆ appName | The name of the application that references the current application. |
name of the current deployable in context
$DeployableName([depName], [releaseNum])
Name | Description |
---|---|
depName | The application-qualified name of the deployable (e.g. AppName::DeployableName); when no application name is specified, the current application in context will be used. |
releaseNum | Release Number |
list of deployables included in the specified release, or the current release in context
@DeployablesInRelease([appName], [releaseNum], [includeImported])
Name | Description |
---|---|
appName | The name or ID of the application, or the current application in context if not specified. |
releaseNum | The release number, or the current release number in context if not specified. |
includeImported | A boolean indicating whether imported deployables should be included. |
application name referenced by the current or specified deployable
$ReferencedApplicationName([depName], [releaseNum])
Name | Description |
---|---|
depName | The application-qualified name of the deployable (e.g. AppName::DeployableName); when no application name is specified, the current application in context will be used. |
releaseNum | Release Number |
build number referenced by the current or specified deployable
$ReferencedPackageNumber([depName], [releaseNum], [furthestOrLatest])
Name | Description |
---|---|
depName | The application-qualified name of the deployable (e.g. AppName::DeployableName); when no application name is specified, the current application in context will be used. |
releaseNum | Release Number |
furthestOrLatest | Must be "furthest" or "latest"; the default is "latest". |
release name of the current deployable in context
$ReferencedReleaseName([depName], [releaseNum])
Name | Description |
---|---|
depName | The application-qualified name of the deployable (e.g. AppName::DeployableName); when no application name is specified, the current application in context will be used. |
releaseNum | Release Number |
release number of the current deployable in context
$ReferencedReleaseNumber([depName], [releaseNum])
Name | Description |
---|---|
depName | The application-qualified name of the deployable (e.g. AppName::DeployableName); when no application name is specified, the current application in context will be used. |
releaseNum | Release Number |
name of the environment in context
$EnvironmentName
Returns the current execution ID.
$ExecutionId
Returns the current state of the execution (normal, warning, or error).
$ExecutionState
user name that initiated the current execution
$ExecutionUser
Returns the value of a variable if the specified variable name is available in the current context; otherwise returns null.
GetVariableValue(VariableName, [VariableType])
Name | Description |
---|---|
☆ VariableName | The name of the variable. |
VariableType | Must be one of: any, scalar, vector, or map; when none is specified, "any" is used. |
true if the current execution is a redeployment
$IsReexecution
true if a build from an earlier release is redeployed to a stage
$IsRollback
Returns true if the specified variable name is available in the current context; otherwise returns false.
$IsVariableDefined(VariableName, [VariableType])
Name | Description |
---|---|
☆ VariableName | The name of the variable. |
VariableType | Must be one of: any, scalar, vector, or map; when none is specified, "any" is used. |
Returns the current working directory.
$WorkingDirectory
Returns "true" if the specified directory exists on the current server.
$DirectoryExists(name)
Name | Description |
---|---|
☆ name | The path of the directory. |
Returns the contents of a file on the current server.
$FileContents(name, [maxLength])
Name | Description |
---|---|
☆ name | The path of the file. |
maxLength | The maximum length (in characters) of the file to read. |
Returns "true" if the specified file exists on the current server.
$FileExists(name)
Name | Description |
---|---|
☆ name | The path of the file. |
Returns a list of files matching the mask on the current server.
@FilesOnDisk(includes, [excludes], [directory])
Name | Description |
---|---|
☆ includes | Includes |
excludes | Excludes |
directory | In Directory |
set @ProjectFiles = @FilesOnDisk(*.csproj); # gets project files in working directory set @NonXDarFiles = @FilesOnDisk(**, **.xdr, $TmpPath); # gets all files except those with an .xdr extension
Returns a string containing all of the arguments combined into a complete path.
$PathCombine(Path1, Path2, ...)
Name | Description |
---|---|
☆ Path1 | The first path element. |
☆ Path2 | The second path element. |
... | Additional path elements. |
Provides an absolute path (terminated with directory separator) based on a relative path and the current working directory; this will provide appropriate directory separators, based on the server in context
$ResolvePath(Path)
Name | Description |
---|---|
☆ Path | path |
$ResolvePath(C:\MyDirectory) -> C:\MyDirectory\ $ResolvePath() -> {WorkingDirectory} $ResolvePath(my\path/to/directory) -> {WorkingDirectory}/my/path/to/directory (on Linux) $ResolvePath(my\path/to/directory) -> {WorkingDirectory}\my\path\to\directory (on Windows) $ResolvePath(~\path) -> {ExecutionDirectory}\path
Returns the full path to ant (or ant.exe on Windows) for the server in context.
$AntPath
Returns the full path to the Azure CLI for the server in context.
$AzPath
Returns the current date and time of the local timezone in the specified .NET datetime format string, or ISO 8601 format (yyyy-MM-ddTHH:mm:ss) if no format is specified.
$Date([Format])
Name | Description |
---|---|
Format | An optional .NET datetime format string. |
# format strings taken from https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx set $OtterScript = >> Now: $Date UTC Now: $DateUtc Custom: $Date(hh:mm:ss.f) RFC1123: $Date(r) Sortable: $Date(s) Short time: $Date(t) >>; set $Result = $Eval($OtterScript); Log-Information $Result;
Returns the current UTC date and time in the specified .NET datetime format string, or ISO 8601 format (yyyy-MM-ddTHH:mm:ss) if no format is specified.
$DateUtc([Format])
Name | Description |
---|---|
Format | An optional .NET datetime format string. |
# format strings taken from https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx set $OtterScript = >> Now: $Date UTC Now: $DateUtc Custom: $Date(hh:mm:ss.f) RFC1123: $Date(r) Sortable: $Date(s) Short time: $Date(t) >>; set $Result = $Eval($OtterScript); Log-Information $Result;
Full path to devenv.exe. This is usually similar to C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exeIf no value is supplied, the operation will use vswhere to determine the path to the latest installation of Visual Studio
$DevEnvPath
(none)
$DockerExePath
Performs variable substitution and function evaluation for arbitrary text.
Eval(Text)
Name | Description |
---|---|
☆ Text | The text to process. |
# format strings taken from https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx set $OtterScript = >> Now: $Date UTC Now: $DateUtc Custom: $Date(hh:mm:ss.f) RFC1123: $Date(r) Sortable: $Date(s) Short time: $Date(t) >>; set $Result = $Eval($OtterScript); Log-Information $Result;
Returns the branch portion of a multi-part buildId, or an empty string if there is no branch portion
$JenkinsBranchName(id)
Name | Description |
---|---|
☆ id | The buildId to parse. |
# $JenkinsBranchName(my-branch-18) ==> "my-branch" $JenkinsBranchName ==> "" $JenkinsBranchName(5214) ==> "" $JenkinsBranchName(lastestBuild) ==> error/invalid
Returns the build number portion of a multipart buildId, or an empty string if there is no branch portion
$JenkinsBuildNumber(id)
Name | Description |
---|---|
☆ id | The buildId to parse. |
# $JenkinsBuildNumber(my-branch-18) ==> "18" $JenkinsBuildNumber ==> "" $JenkinsBuildNumber(5214) ==> "5214" $JenkinsBuildNumber(latestBuild) ==> error (invalid BuildId)
The project/job name associated with a given Jenkins resource
$JenkinsProjectName(resource)
Name | Description |
---|---|
☆ resource | The name of the Jenkins resource to read. |
# $JenkinsProjectName(MyJenkinsResourceName); $JenkinsProjectName($CIProject);
The url for the Jenkins Build
$JenkinsUrl(resource, projectName, [buildNumber], [branchName])
Name | Description |
---|---|
☆ resource | The name of the Jenkins secure resource to read. |
☆ projectName | The Jenkins project name. |
buildNumber | The Jenkins build number. |
branchName | The Jenkins branch name. |
# $JenkinsBuildUrl(MyJenkinsResource, $JenkinsJobName); $JenkinsBuildUrl(MyJenkinsResource, $JenkinsJobName, $JenkinsBuildNumber, $JenkinsBranchName);
(none)
$JqlValue(Value)
Name | Description |
---|---|
☆ Value | Value |
Returns the full path to mvn (or mvn.bat on Windows) for the server in context.
$MavenPath
The directory of the MSBuild tools, typically in 'C:\Program Files (x86)\MSBuild\{ToolsVersion}\Bin'; if empty, the MSBuildToolsPath registry value under SOFTWARE\Microsoft\MSBuild\ToolsVersions will be used.
$MSBuildToolsPath
Returns the comments for the specified promotion, or the promotion in the current context if values are not specified.
$PromotionComments([StageName], [BuildNumber], [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
StageName | Stage Name |
BuildNumber | Build Number |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
# Stores comments from the current promotion in a variable set $comments = $PromotionComments;
Returns a range of integers starting from a specified value.
@Range(Start, Count)
Name | Description |
---|---|
☆ Start | The first integer of the sequence. |
☆ Count | The number of integers to return. |
Returns the full path of a special directory on a Windows system.
$SpecialWindowsPath(Name)
Name | Description |
---|---|
☆ Name | One of the values of the Environment.SpecialFolder enumeration. |
The full path to vstest.console.exe; if empty will attempt to resolve the path automatically.
$VsTestExePath
Converts JSON to an OtterScript value.
FromJson(json)
Name | Description |
---|---|
☆ json | The JSON data to parse. |
%FromJson(>>{"abc":[1,2,3],"def":true}>>)
Encodes a string for use in a JavaScript string literal.
$JSEncode(Text)
Name | Description |
---|---|
☆ Text | The text to encode. |
Converts an OtterScript value to JSON.
$ToJson(data)
Name | Description |
---|---|
☆ data | The data to encode as JSON. |
$ToJson(%(abc: @(1, 2, 3), def: true))
Returns the output of a shell script.
$SHEval(ScriptText)
Name | Description |
---|---|
☆ ScriptText | The shell script to execute. This should be an expression. |
# set the $NextYear variable to the value of... next year set $ShellScript = >> date -d next-year +%Y >>; set $NextYear = $SHEval($ShellScript); Log-Information $NextYear;
Creates a list containing the contents of each list in sequence.
@ListConcat(...)
Name | Description |
---|---|
... | The lists to concatenate. |
Count the number of elements in a list.
$ListCount(List)
Name | Description |
---|---|
☆ List | The list. |
Finds the index of an item in a list. Finding the first item in a list returns 0, and finding an item not present in the list returns -1.
$ListIndexOf(List, Item)
Name | Description |
---|---|
☆ List | The list. |
☆ Item | The item. |
Inserts an item into a list.
@ListInsert(List, Item, [Index])
Name | Description |
---|---|
☆ List | The list. |
☆ Item | The item. |
Index | The index. 0 inserts the item at the start of the list. If this parameter is not present, the item is added to the end of the list. |
Gets an item from a list.
ListItem(List, Index)
Name | Description |
---|---|
☆ List | The list. |
☆ Index | The index of the item. The first item in a list is at index 0. |
Removes an item from a list.
@ListRemove(List, Index)
Name | Description |
---|---|
☆ List | The list. |
☆ Index | The index of the item to remove. The first item in a list is at index 0. |
Adds a key-value pair to a map.
MapAdd(Map, Key, Value)
Name | Description |
---|---|
☆ Map | The map. |
☆ Key | The key to add. |
☆ Value | The value to add. |
Gets an item from a map.
MapItem(Map, Key)
Name | Description |
---|---|
☆ Map | The map. |
☆ Key | The key. |
Lists the keys of a map.
@MapKeys(Map)
Name | Description |
---|---|
☆ Map | The map. |
Removes a key from a map.
MapRemove(Map, Key)
Name | Description |
---|---|
☆ Map | The map. |
☆ Key | The key to remove. |
Returns the absolute value of a number.
$Abs(value)
Name | Description |
---|---|
☆ value | The value to return the absolute value for. |
Returns the value rounded up to the nearest integer.
$Ceiling(value)
Name | Description |
---|---|
☆ value | The value to round up. |
Compare two values numerically or as case-sensitive strings.
$Compare(Arg1, Operator, Arg2, [AsNumber])
Name | Description |
---|---|
☆ Arg1 | The left-hand side of the comparison. |
☆ Operator | One of: <, >, <=, >=, =, !=. |
☆ Arg2 | The right-hand side of the comparison. |
AsNumber | Override number detection. True causes an error if the arguments cannot be parsed as numbers. False always compares them as strings. |
Returns a string that contains the result of decrementing a value.
$Decrement(value, [amount])
Name | Description |
---|---|
☆ value | The value to decrement. |
amount | The amount that will be subtracted from the value. If not specified, 1 is used. |
Evaluates a mathematical expression using +, -, *, /, or % operators.
$Expr(expression)
Name | Description |
---|---|
☆ expression | The expression to evaluate. |
Returns the value rounded down to the nearest integer.
$Floor(value)
Name | Description |
---|---|
☆ value | The value to round down. |
Returns a string that contains the result of incrementing a value.
$Increment(value, [amount])
Name | Description |
---|---|
☆ value | The value to increment. |
amount | The amount that will be added to the value. If not specified, 1 is used. |
The path to the nuget.exe client. When not specified, the included nuget.exe client is used.
$NuGetExePath
Gets the hex-encoded SHA1 hash of a package. The hash is from the version of the package associated with the current build.
$PackageHash(packageName, [sourceName])
Name | Description |
---|---|
☆ packageName | Package Name |
sourceName | Source Name |
Gets a value from the metadata of a package. The property is from the version of the package associated with the current build.
$PackageProperty(packageName, packageProperty, [sourceName])
Name | Description |
---|---|
☆ packageName | Package Name |
☆ packageProperty | Package Property |
sourceName | Source Name |
Gets a list of packages in the current build. Each returned element is a map: %(Name: SomeName, Version: 1.2.3, PackageSource: SourceName)
@PackagesInBuild([packageSource])
Name | Description |
---|---|
packageSource | Optional name of the package source to filter by. |
Gets the version of the specified package associated with the current build.
$PackageVersion(packageName, [part], [sourceName])
Name | Description |
---|---|
☆ packageName | Package Name |
part | The version part, one of: 'full' (default), 'stable', 'pre-release', 'build'. |
sourceName | The package source name; defaults to searching all package sources. |
name of the pipeline in context
$PipelineName
name of the pipeline stage in context
$PipelineStageName
When true, external processes created to host Windows PowerShell 5.1 scripts will be forcibly terminated after running a script to ensure resources are released. When false, processes may remain active according the PowerShell Core interop implementation.
$AutoTerminatePowerShellProcess
When true, scripts will be run using Windows PowerShell 5.1 where available. When false or on Linux (or on Windows systems without PowerShell 5.1 installed), scripts will be run using PowerShell Core instead.
$PreferWindowsPowerShell
Returns a PSCredential object that can be passed to PowerShell scripts.
$PSCredential(UserName, [Password])
Name | Description |
---|---|
☆ UserName | The user name of the PSCredential object, or a UsernamePassword credential. |
Password | The password of the PSCredential object. |
# convert user and password to a PSCredential object PSCall MyPowerShellScript ( Credentials: $PSCredential(user, password) );
Returns the result of a PowerShell script.
PSEval(ScriptText)
Name | Description |
---|---|
☆ ScriptText | The PowerShell script to execute. This should be an expression. |
# set the $NextYear variable to the value of... next year set $PowershellScript = >> (Get-Date).year + 1 >>; set $NextYear = $PSEval($PowershellScript); Log-Information $NextYear;
The path to python/python.exe.
$PythonPath
Virtual environment to use for Python and Pip operations.
$PythonVirtualEnv
compares the release number of the current application with a specified release number
$CompareReleaseSequence(operator, releaseNum1, [releaseNum2])
Name | Description |
---|---|
☆ operator | Valid operators are: ==, !=, >, <, >=, <=. |
☆ releaseNum1 | Release Number1 |
releaseNum2 | Defaults to the current release number in context when not specified. |
Returns the next release number that would be assigned.
$IncrementReleaseNumber(lastReleaseNumber, [releaseNumberScheme])
Name | Description |
---|---|
☆ lastReleaseNumber | The release number to increment. |
releaseNumberScheme | MajorMinor, MajorMinorRevision, or DateBased. If not specified, uses the release number scheme of the current application. |
release number of the last deployed release, relative to the specified or current release
$PreviousReleaseNumber([ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
ReleaseNumber | Release Number |
ApplicationName | Application Name |
name of the current or specified release
$ReleaseName([ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
ReleaseNumber | Release Number |
ApplicationName | Application Name |
release number of the current release, or "0.0.0" if no release number is in context
$ReleaseNumber
a part (major, minor, build, revision) of the current or specified release number
$ReleaseNumberPart(Part, [ReleaseNumber])
Name | Description |
---|---|
☆ Part | Must be "major" or "1", "minor" or "2", "build" or "3" , "revision" or "4". |
ReleaseNumber | Release Number |
Gets the value of a variable defined on a release.
ReleaseVariable(VariableName, [ReleaseNumber], [ApplicationName])
Name | Description |
---|---|
☆ VariableName | Variable Name |
ReleaseNumber | Release Number |
ApplicationName | Application Name |
list of all of the servers acquired for a specified role
@AcquiredServers(Role)
Name | Description |
---|---|
☆ Role | The name of the server role. |
Returns a list of all environments.
@AllEnvironments
# log all environments in context to the execution log foreach $Env in @AllEnvironments { Log-Information $Env; }
Returns a list of all server roles.
@AllRoles
# log all server roles in context to the execution log foreach $Role in @AllRoles { Log-Information $Role; }
Returns a list of all servers.
@AllServers([IncludeInactive])
Name | Description |
---|---|
IncludeInactive | If true, include servers marked as inactive. |
# log all servers in context to the execution log foreach $Server in @AllServers { Log-Information $Server; }
Returns the value of the specified environment variable on the current server.
$EnvironmentVariable(EnvironmentVariableName)
Name | Description |
---|---|
☆ EnvironmentVariableName | The name of the environment variable. |
# get the PATH on the server in context during an execution set $Path = $EnvironmentVariable(PATH); Log-Information $Path;
name of the current server role in context
$RoleName
name of the current server in context
$ServerName
Returns a list of all the servers in the specified environment name.
@ServersInEnvironment([EnvironmentName], [IncludeInactive])
Name | Description |
---|---|
EnvironmentName | The name of the evironment. If not supplied, the current environment in context will be used. |
IncludeInactive | If true, include servers marked as inactive. |
Returns a list of servers in the specified role.
@ServersInRole([RoleName], [IncludeInactive])
Name | Description |
---|---|
RoleName | The name of the server role. If not supplied, the current role in context will be used. |
IncludeInactive | If true, include servers marked as inactive. |
Returns a list of all the servers in the specified role and environment name.
@ServersInRoleAndEnvironment([RoleName], [EnvironmentName], [IncludeInactive])
Name | Description |
---|---|
RoleName | The name of the server role. If not supplied, the current role in context will be used. |
EnvironmentName | The name of the evironment. If not supplied, the current environment in context will be used. |
IncludeInactive | If true, include servers marked as inactive. |
Returns the first argument which does not contain only whitespace.
$Coalesce(...)
Name | Description |
---|---|
... | Arguments to coalesce. |
Encodes a string for use in HTML.
$HtmlEncode(Text)
Name | Description |
---|---|
☆ Text | The text to encode. |
Concatenates all elements of a list into a string using a specified separator.
$Join(Separator, Values)
Name | Description |
---|---|
☆ Separator | The string to use as a separator. The separator is only included if the list contains more than one element. |
☆ Values | The elements to concatenate. |
Encodes a string for use as a JavaScript literal.
$JSEncode(Text)
Name | Description |
---|---|
☆ Text | Text |
Returns true when the specified text matches the specified pattern; otherwise returns false.
$MatchesRegex(Text, RegexPattern)
Name | Description |
---|---|
☆ Text | The text which will be evaluated by the regular expression. |
☆ RegexPattern | The regular expression pattern. |
newline string for either the operating system of the current server in context or specifically Windows or Linux
$NewLine([WindowsOrLinux])
Name | Description |
---|---|
WindowsOrLinux | Must be either "windows", "linux", or "current". The default value is "current" for the current server. |
Returns a new string that right-aligns the characters in this instance by padding them on the left with a specified character, for a specified total length.
$PadLeft(Text, Length, [PadCharacter])
Name | Description |
---|---|
☆ Text | The input string. |
☆ Length | The length of the string to return. |
PadCharacter | The character to be inserted as padding. The default is a space. |
Returns a new string that left-aligns the characters in this instance by padding them on the left with a specified character, for a specified total length.
$PadRight(Text, Length, [PadCharacter])
Name | Description |
---|---|
☆ Text | The input string. |
☆ Length | The length of the string to return. |
PadCharacter | The character to be inserted as padding. The default is a space. |
Finds all matches of a regular expression in a string, optionally returning only a matched group.
@RegexFind(Text, MatchExpression, [MatchGroup])
Name | Description |
---|---|
☆ Text | The string to search for replacements. |
☆ MatchExpression | The regular expression used to search the first argument. |
MatchGroup | When specified, the name or index of each match subexpression to return instead of the entire match. |
Searches for and replaces text in a string using a regular expression.
$RegexReplace(Text, MatchExpression, ReplaceWith)
Name | Description |
---|---|
☆ Text | The string to search for replacements. |
☆ MatchExpression | The regular expression used to search the first argument. |
☆ ReplaceWith | The substring to replace occurrences of the second parameter with. |
Searches for and replaces text in a string.
$Replace(Text, Value, ReplaceWith, [IgnoreCase])
Name | Description |
---|---|
☆ Text | The string to search for replacements. |
☆ Value | The substring to search for in the first argument. |
☆ ReplaceWith | The substring to replace occurrences of the second parameter with. |
IgnoreCase | When "true", string comparison will be performed with case insensitivity; the default is "false". |
Splits a string into substrings based on a specified separator.
@Split(Text, Separator, [Count])
Name | Description |
---|---|
☆ Text | String to split. |
☆ Separator | String that delimits the substrings in this string. |
Count | The maximum number of substrings to return. If not specified, all substrings are returned. |
Returns a segment of another string.
$Substring(Text, Offset, [Length])
Name | Description |
---|---|
☆ Text | The input string. |
☆ Offset | The zero-based offset into the first parameter that will begin the segment. |
Length | The number of characters in the segment. If not specified, the remainder of the string is used. |
Returns a string with all letters converted to lowercase.
$ToLower(Text)
Name | Description |
---|---|
☆ Text | The string to convert to lowercase. |
Returns a string with all letters converted to uppercase.
$ToUpper(Text)
Name | Description |
---|---|
☆ Text | The string to convert to uppercase. |
Returns a string with all leading and trailing whitespace characters removed, or optionally a set of specified characters.
$Trim(Text, ...)
Name | Description |
---|---|
☆ Text | The input string. |
... | Characters to trim. |
Returns a string with all trailing whitespace characters removed, or optionally a set of specified characters.
$TrimEnd(Text, ...)
Name | Description |
---|---|
☆ Text | The input string. |
... | Characters to trim. |
Returns a string with all leading whitespace characters removed, or optionally a set of specified characters.
$TrimStart(Text, ...)
Name | Description |
---|---|
☆ Text | The input string. |
... | Characters to trim. |
Escapes a string for use in a URL.
$UrlEncode(Text)
Name | Description |
---|---|
☆ Text | The text to escape. |
The name of the server to connect to when browsing from the web UI, otherwise a local agent is used
$SvnDefaultServerName
an overridden path to svn.exe on the server; if not supplied, the embedded svn.exe client will be used
$SvnExePath
Encodes a string for use in an XML element.
$XmlEncode(Text)
Name | Description |
---|---|
☆ Text | The text to encode. |