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)

Bitbucket Cloud Command Line Interface (CLI)
  • Reference
    Reference
     This trigger is hidden
  • User's Guide
    User's Guide
     This trigger is hidden
  • Administrator's Guide
    Administrator's Guide
     This trigger is hidden
  • Release notes
    Release notes
     This trigger is hidden
  • Share data with the Support team
    Share data with the Support team
     This trigger is hidden
  • Downloads
    Downloads
     This trigger is hidden
Results will update as you type.
  • User's Guide
    • Reference
      • Actions
        • getClientInfo
        • getFileList
        • getReplacementVariableList
        • getRepository
        • getRepositoryList
        • getSource
        • help
        • publishSource
        • run
        • runFromCsv
        • runFromJson
        • runFromList
        • runFromSql
        • runIf
        • setReplacementVariables
        • createProject
        • deleteProject
        • getBranch
        • getBranchList
        • getCommit
        • getCommitList
        • getProject
        • getProjectList
        • getPullRequest
        • getPullRequestList
        • getTeam
        • getTeamList
        • updateProject
        • getBuildStatusList
        • getUser
        • getWorkspace
        • getWorkspaceList
        • renderRequest
        • runFromWorkspaceList
        • getUpgradeInfo
        • provideFeedback
        • getDeploymentList
        • getEnvironmentList
        • getPipeline
        • getPipelineList
        • getRunnerList
        • runFromProjectList
        • runFromRepositoryList
        • startPipeline
        • addVariables
        • getVariableList
        • removeVariables
        • updateVariables
        • addDownload
        • addEnvironment
        • getDownload
        • getDownloadList
        • getEnvironment
        • getPipelineCacheList
        • removeDownload
    Calendars
You‘re viewing this with anonymous access, so some content might be blocked.
/
setReplacementVariables

setReplacementVariables

Dec 03, 2024

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": 15, "requestCorrelationId": "ed4dbd07451d454597feb6b404c4ee80"}