Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Teams
, (opens new window)

Bamboo Command Line Interface (CLI)
Results will update as you type.
  • removeLabels
  • removeNotification
  • removeRepository
  • removeRequirement
  • removeStage
  • removeTask
  • removeTrigger
  • removeUser
  • removeVariables
  • renderRequest
  • restartBuild
  • restoreAgentAssignments
  • resumeServer
  • run
  • runFromAgentAssignmentList
  • runFromAgentList
  • runFromApplicationLinkList
  • runFromBuildList
  • runFromCapabilityList
  • runFromCsv
  • runFromDeploymentProjectList
  • runFromEnvironmentList
  • runFromEnvironmentRequirementList
  • runFromEnvironmentTriggerList
  • runFromJobList
  • runFromJson
  • runFromList
  • runFromPlanList
  • runFromProjectList
  • runFromRepositoryList
  • runFromRequirementList
  • runFromSql
  • runFromStageList
  • runFromTaskList
  • runFromTriggerList
  • runFromUserList
  • runIf
  • setDependencyOptions
  • setFavoritePlan
  • setJobOptions
  • setReplacementVariables
  • stopBuild
  • testRepository
  • unsetFavoritePlan
  • updateBranchingOptions
  • updateCapability
  • updateCredentials
  • updateEnvironmentRequirement
  • updateEnvironmentTask
  • updateEnvironmentVariables
  • updatePlan
  • updateRepository
  • updateRequirement
  • updateStage
  • updateTask
  • updateVariables
  • validateLicense
  • verifyBuild
  • setJobIsolationOptions
  • getBuildReportList
  • runBuildExpiry
  • setExpiryOptions
  • copyVariables
  • getArtifactDependencyList
  • cloneJob
  • addWebhookTemplate
  • runFromNotificationList
  • getUpgradeInfo
  • provideFeedback
  • runFromPropertyFile
  • sleep
  • getSqlResultList
  • moveEnvironmentTask
  • getAutomation
  • getAutomationList
  • runAutomation
  • runFromAutomationList
    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    setReplacementVariables

    setReplacementVariables

    Nov 10, 2023

    See also: Actions

    Description

    Set one or more replacement variables specified using field parameters with name=value syntax or loaded from a property file. Value specified replaces any previously set variable with the same name including values set by other actions that set replacement variables. This is an example to save a previously set value, use '--field myIssue=@issue@'. Find and replace logic is applied to the value before setting the variable providing a way to manipulate values in a script. Variables are available only within the scope of the run script they were set in. If a regex based condition is provide using the regex and value parameters, the variables will only be set if the regex condition is met. By default, the regex is used for a find of the value parameter. The options parameter can be set to one or more of the following to modify the default behavior - literal - to treat the regex string as a literal string, exact - to require an exact match of the value, negative - to reverse the condition so a match means do NOT set the variables. In addition, use blank for the regex parameter to match on an empty string.

    Required Parameters

    Optional Parameters

    field, file, findReplace, findReplaceRegex, regex, value, options

    Type

    Update

    Category

    Variables

    Output Formats

    Replacement Variables

    Since Version

    Examples

    Related How To's

    , multiple selections available, Use left or right arrow keys to navigate selected items
    cli-action
    cli-action-setreplacementvariables
    cli-parameter-field
    cli-parameter-findreplace
    cli-parameter-findreplaceregex
    cli-parameter-action
    cli-parameter-dateformat
    cli-parameter-dateformat2
    cli-parameter-help
    cli-parameter-outputtype
    cli-parameter-special
    cli-parameter-quiet
    cli-parameter-verbose
    cli-parameter-debug
    cli-action-category-variables
    cli-action-type-update
    cli-parameter-file
    cli-parameter-regex
    cli-parameter-value
    cli-parameter-options

    Need support? Create a request with our support team.

    Copyright © 2005 - 2025 Appfire | All rights reserved.

    {"serverDuration": 27, "requestCorrelationId": "3ee1207233d6443999c3d737bddfd622"}