Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions command-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{
"alias": [],
"command": "devops:pipeline:activate",
"flagAliases": [],
"flagChars": ["o"],
"flags": ["api-version", "flags-dir", "json", "pipeline-id", "target-org"],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:pipeline:attach-project",
Expand All @@ -7,6 +15,34 @@
"flags": ["api-version", "flags-dir", "json", "pipeline-id", "project-id", "target-org"],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:pipeline:create",
"flagAliases": [],
"flagChars": ["d", "n", "o", "r"],
"flags": [
"api-version",
"bitbucket-project",
"create-repo",
"description",
"flags-dir",
"json",
"name",
"repo",
"repo-owner",
"repo-type",
"target-org"
],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:pipeline:stage:add",
"flagAliases": [],
"flagChars": ["n", "o"],
"flags": ["api-version", "flags-dir", "json", "name", "next-stage-id", "pipeline-id", "target-org"],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:project:create",
Expand Down
29 changes: 29 additions & 0 deletions messages/devops.pipeline.activate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# summary

Activate a DevOps Center pipeline for deployments.

# description

A pipeline must have at least one stage before you activate it. You can't modify the pipeline stages after you activate and promote changes through it.

# flags.target-org.summary

Username or alias of the DevOps Center org.

# flags.pipeline-id.summary

ID of the pipeline.

# examples

- Activate a pipeline using the pipeline ID.

<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001

# error.NoStages

Can't activate pipeline %s. Add at least one stage, then try again.

# error.AlreadyActive

Pipeline %s is already active.
81 changes: 81 additions & 0 deletions messages/devops.pipeline.create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# summary

Create a DevOps Center pipeline.

# description

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.target-org.summary

Username or alias of the DevOps Center org.

# flags.name.summary

Name of the pipeline.

# flags.repo.summary

URL of an existing repository or the name of a repository to create.

# flags.repo-type.summary

Type of the source code repository. Required when creating a repository using '--create-repo'.

# flags.create-repo.summary

Create a repository if it doesn't exist.

# flags.repo-owner.summary

Owner (organization or user) of the repository. Required when creating a repository using '--create-repo'.

# flags.bitbucket-project.summary

Bitbucket project key for the repository. Used when creating a Bitbucket repository with '--create-repo'.

# flags.description.summary

Description of the pipeline.

# examples

- Create a pipeline and associate it with an existing GitHub repository.

<%= config.bin %> <%= command.id %> --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.

<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo

- Create a pipeline with a description and associate it with a Bitbucket repository.

<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo https://bitbucket.org/myorg/myrepo --description "Main CI/CD pipeline for production releases"

# error.RepoTypeRequired

The --repo-type flag is required when using --create-repo. Specify --repo-type github or --repo-type bitbucket.

# error.RepoCreationFailed

Failed to create repository "%s". Verify the --repo-owner has permission to create repositories and the repository name is available. Details: %s

# error.RepoNotFound

Repository "%s" was not found or you don't have access. Verify the repository URL is correct and your DevOps Center org has the required VCS credentials.

# error.RepoValidationFailed

Failed to validate repository "%s". When using an existing repository, provide the full URL (e.g. https://github.com/owner/repo). To create a new repository, use --create-repo with --repo-type and --repo-owner.

# error.RepoOwnerRequired

The --repo-owner flag is required when using --create-repo. Specify the GitHub or Bitbucket organization or user that will own the repository.

# error.VcsCredentialsMissing

No VCS credentials found for repository "%s". Connect to Bitbucket in your DevOps Center org before creating a pipeline.

# error.RepoTypeDetectionFailed

Unable to detect the repository type from the URL "%s". Use --repo-type to specify the repository type.
37 changes: 37 additions & 0 deletions messages/devops.pipeline.stage.add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# summary

Add a stage to a DevOps Center pipeline.

# description

Inserts an empty stage before the stage specified by `--next-stage-id`. The new stage doesn't include a branch or environment. Configure them separately after you create the stage.

# flags.target-org.summary

Username or alias of the DevOps Center org.

# flags.pipeline-id.summary

ID of the pipeline where the stage is added.

# flags.name.summary

Name of the pipeline stage, such as Integration, UAT, or Staging.

# flags.next-stage-id.summary

ID of the stage that follows the new stage in the pipeline.

# examples

- Add a Development stage before Integration in a specific pipeline.

<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --name "Development" --next-stage-id 0Xc000000000002

- Add a QA stage before UAT in a specific pipeline.

<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --name "QA" --next-stage-id 0Xc000000000003

# error.StageNotFound

Stage %s not found in pipeline %s. Check the stage ID and try again.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@
"description": "Commands for managing DevOps Center pull requests."
},
"pipeline": {
"description": "Commands for managing DevOps Center pipelines."
"description": "Commands for managing DevOps Center pipelines.",
"subtopics": {
"stage": {
"description": "Commands for managing pipeline stages."
}
}
}
}
}
Expand Down
28 changes: 28 additions & 0 deletions schemas/devops-pipeline-activate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/ActivatePipelineResult",
"definitions": {
"ActivatePipelineResult": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"pipelineId": {
"type": "string"
},
"status": {
"type": "string"
},
"stageCount": {
"type": "number"
},
"error": {
"type": "string"
}
},
"required": ["success", "pipelineId"],
"additionalProperties": false
}
}
}
50 changes: 50 additions & 0 deletions schemas/devops-pipeline-create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/CreatePipelineResult",
"definitions": {
"CreatePipelineResult": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"pipelineId": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"status": {
"type": "string"
},
"repository": {
"$ref": "#/definitions/RepoInfo"
},
"error": {
"type": "string"
}
},
"required": ["success"],
"additionalProperties": false
},
"RepoInfo": {
"type": "object",
"properties": {
"repoUrl": {
"type": "string"
},
"repoType": {
"type": "string"
},
"created": {
"type": "boolean"
}
},
"required": ["repoUrl", "repoType", "created"],
"additionalProperties": false
}
}
}
31 changes: 31 additions & 0 deletions schemas/devops-pipeline-stage-add.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/AddPipelineStageResult",
"definitions": {
"AddPipelineStageResult": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"stageId": {
"type": "string"
},
"name": {
"type": "string"
},
"nextStageId": {
"type": "string"
},
"pipelineId": {
"type": "string"
},
"error": {
"type": "string"
}
},
"required": ["success"],
"additionalProperties": false
}
}
}
Loading
Loading