devops stage branch add
Add a source code repository branch to a pipeline stage.
By default, the branch must exist in the repository. Use –create-vcs-branch to create a branch if it doesn’t exist.
Each pipeline stage supports only one branch. Adding a branch replaces any existing branch linked to the pipeline stage.
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
‑‑api‑version | N/A | Type: Value Override the api version used for api requests made by this command |
‑‑branch‑name | ‑b | Type: Value Required Name of the repository branch to assign to the stage. |
‑‑create‑vcs‑branch | N/A | Type: Boolean Create the branch in the remote repository if it doesn’t already exist. |
‑‑flags‑dir | N/A | Type: Value Import flag values from a directory. |
‑‑json | N/A | Type: Boolean Format output as json. |
‑‑pipeline‑id | N/A | Type: Value Required ID of the pipeline that contains the stage. |
‑‑stage‑id | N/A | Type: Value Required ID of the pipeline stage to associate the branch with. |
‑‑target‑org | ‑o | Type: Value Required Username or alias of the target org. Not required if the target-org configuration variable is already set. |
Add an existing branch to a stage:
Create and add a branch to a pipeline stage: