devops pipeline create

Create a DevOps Center pipeline.

Description for devops pipeline create 

Provide the URL of an existing repository, or use --create-repo with a repository name to create one. After you create the pipeline, add stages, and activate the pipeline.

Flags 

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑bitbucket‑project‑keyN/AType: Value

Bitbucket project key to associate with the repository. Optional when creating a Bitbucket repository using ‘–create-repo’.
‑‑bitbucket‑workspaceN/AType: Value

Bitbucket workspace that will own the repository. Required when creating a Bitbucket repository using ‘–create-repo’.
‑‑create‑repoN/AType: Boolean

Create a repository if it doesn’t exist.
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑name‑nType: Value
Required

Name of the pipeline.
‑‑project‑idN/AType: Value

ID of a project to associate with the pipeline. Repeat the flag to associate multiple projects.
‑‑repo‑rType: Value
Required

URL of an existing repository or the name of a repository to create.
‑‑repo‑ownerN/AType: Value

Owner (organization or user) of the GitHub repository. Required when creating a GitHub repository using ‘–create-repo’.
‑‑repo‑typeN/AType: Value
Valid Values: github, bitbucket

Type of the source code repository. Required when creating a repository using ‘–create-repo’.
‑‑stage‑sType: Value

Name of a pipeline stage, in promotion order. Repeat the flag for each stage. Defaults to Integration, UAT, Staging, and Production.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.

Examples for devops pipeline create 

Create a pipeline and associate it with an existing GitHub repository:

1sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo https://github.com/myorg/myrepo

Create a pipeline and associate it with a new GitHub repository:

1sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo

Create a pipeline and create a new Bitbucket repository:

1sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type bitbucket --bitbucket-workspace myworkspace --bitbucket-project-key PROJ --create-repo

Create a pipeline and associate it with an existing Bitbucket repository:

1sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo https://bitbucket.org/myworkspace/myrepo

Create a pipeline with custom stage names instead of the default stages:

1sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo https://github.com/myorg/myrepo --stage Dev --stage QA --stage Prod

Create a pipeline and associate one or more projects with it:

1sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo https://github.com/myorg/myrepo --project-id 0Hn000000000001 --project-id 0Hn000000000002