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
25 changes: 25 additions & 0 deletions command-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
"flags": ["api-version", "flags-dir", "json", "pipeline-id", "stage-id", "target-org"],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:pipeline:stage:update",
"flagAliases": [],
"flagChars": ["n", "o", "s"],
"flags": ["api-version", "flags-dir", "json", "name", "stage-id", "target-org"],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:pipeline:update",
Expand Down Expand Up @@ -110,6 +118,7 @@
"deploy-all",
"flags-dir",
"json",
"skip-validation",
"stage-id",
"target-org",
"target-stage-id",
Expand Down Expand Up @@ -137,6 +146,14 @@
],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:promotion:validate",
"flagAliases": [],
"flagChars": ["i", "o", "t"],
"flags": ["api-version", "flags-dir", "json", "target-org", "target-stage-id", "work-item-id"],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:request:status",
Expand Down Expand Up @@ -170,6 +187,14 @@
],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:stage:branch:delete",
"flagAliases": [],
"flagChars": ["o"],
"flags": ["api-version", "flags-dir", "json", "pipeline-id", "stage-id", "target-org"],
"plugin": "@salesforce/plugin-devops-center"
},
{
"alias": [],
"command": "devops:stage:environment:add",
Expand Down
25 changes: 25 additions & 0 deletions messages/devops.pipeline.stage.update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# summary

Update a DevOps Center pipeline stage.

# description

Updates the name of a pipeline stage.

# flags.stage-id.summary

ID of the pipeline stage to update.

# flags.name.summary

New name for the pipeline stage.

# examples

- Rename a pipeline stage.

<%= config.bin %> <%= command.id %> --target-org my-devops-org --stage-id 1QV000000000001 --name "Integration"

# error.StageNotFound

Stage "%s" not found. Check the stage ID and try again.
16 changes: 16 additions & 0 deletions messages/devops.promote.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ ID of the source pipeline stage whose approved work items will be promoted. Mutu

<%= config.bin %> <%= command.id %> --target-org my-devops-org --stage-id 1QVxx0000000001 --target-stage-id 1QVxx0000000002 --deploy-all

# flags.skip-validation.summary

Skip pre-promote validation. By default, promotion is validated before proceeding to prevent promoting work items without an associated PR. Use this flag to bypass validation.

# error.NoModeFlag

Provide either --work-item-id to promote specific work items or --stage-id to promote all approved work items from a stage.
Expand All @@ -56,6 +60,18 @@ Provide either --work-item-id to promote specific work items or --stage-id to pr

No work items found to promote from the source stage. Make sure there are approved work items before promoting.

# error.ValidationRequestFailed

Failed to run pre-promote validation: %s

# error.ValidationFailedCombineRequired

Promotion blocked: work items must be combined before promoting. Run the combine command with the following details:

# error.ValidationFailed

Pre-promote validation failed (%s): %s

# error.PromoteFailed

Failed to promote: %s
6 changes: 3 additions & 3 deletions messages/devops.promotion.complete.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ ID of a specific work item to deploy. Omit to deploy all undeployed work items f

# examples

- Complete a promotion for an out-of-sync pipeline stage.
- Complete a promotion for an out-of-sync pipeline stage:

<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001

- Complete a promotion for a specific work item (e.g. first stage of a pipeline).
- Complete a promotion for a specific work item (e.g. first stage of a pipeline):

<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001

- Complete a promotion with full deploy and a specific test level.
- Complete a promotion with full deploy and a specific test level:

<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --deploy-all --test-level RunLocalTests

Expand Down
64 changes: 64 additions & 0 deletions messages/devops.promotion.validate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# summary

Validate work item promotion for a pipeline stage.

# description

Validates whether the specified work items can be promoted to the target pipeline stage. Checks for VCS and object permission errors before a promotion is attempted.

# flags.target-stage-id.summary

ID of the target pipeline stage to validate promotion to.

# flags.work-item-id.summary

ID of a work item to validate for promotion. Specify multiple times for multiple work items.

# examples

- Validate promotion of a work item to a target stage:

<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001

- Validate promotion of multiple work items:

<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001 --work-item-id 1fk000000000002

# error.NoPipeline

No pipeline found for work item "%s". Ensure the project has an associated pipeline.

# error.ValidationFailed

Validation failed (%s): %s

# error.ValidationRequestFailed

Validation request failed: %s

# suggestion.SharedComponents

The selected work items share one or more components. Choose one of these approaches:

# suggestion.CombineOption

Option 1 - Combine the work items and promote them as a single unit:

# suggestion.PromoteOption

Option 2 - Promote the work items as they are, without combining:

# suggestion.CombineStepPrepare

1. Combine the work items:
%s

# suggestion.CombineStepPromote

2. Promote the combined work item:
%s

# suggestion.PromoteStep

Run:
%s
37 changes: 37 additions & 0 deletions messages/devops.stage.branch.delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# summary

Delete the source code repository branch associated with a pipeline stage.

# description

Removes the branch linked to the specified pipeline stage. Because branches are configured from right to left (a stage can have a branch only after the stage to its right does), removing a branch also removes the branches from all upstream stages (to the left) in the pipeline, keeping it in a valid state. The branch records in the repository are not deleted; only their association with the stages is removed. The stage must belong to an inactive pipeline.

# flags.pipeline-id.summary

ID of the pipeline that contains the stage. Used to verify the pipeline is inactive before deleting.

# flags.stage-id.summary

ID of the pipeline stage whose branch you want to delete.

# examples

- Delete the branch associated with a pipeline stage:

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

# error.PipelineAlreadyActive

Pipeline %s is already active. A branch can only be removed from a stage in an inactive pipeline.

# error.StageNotFound

Pipeline stage "%s" doesn't exist in pipeline "%s". Check the stage ID and try again.

# error.NoBranch

Pipeline stage "%s" doesn't have a branch associated with it. There's nothing to delete.

# error.BranchDeleteFailed

Failed to delete branch from stage: %s
22 changes: 22 additions & 0 deletions schemas/devops-pipeline-stage-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/PipelineStageUpdateResult",
"definitions": {
"PipelineStageUpdateResult": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"stageId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": ["success", "stageId", "name"],
"additionalProperties": false
}
}
}
38 changes: 38 additions & 0 deletions schemas/devops-promote.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,48 @@
"items": {
"type": "string"
}
},
"combineDetails": {
"anyOf": [
{
"$ref": "#/definitions/CombineDetails"
},
{
"type": "null"
}
]
}
},
"required": ["requestId", "status", "message", "promotedWorkitemIds"],
"additionalProperties": false
},
"CombineDetails": {
"type": "object",
"additionalProperties": {},
"properties": {
"childWorkitemsId": {
"type": "array",
"items": {
"type": "string"
}
},
"parentWorkitemId": {
"type": "string"
},
"sharedComponentsList": {
"$ref": "#/definitions/SharedComponentsList"
}
}
},
"SharedComponentsList": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Maps a comma-separated list of work item names to the components they share."
}
}
}
66 changes: 66 additions & 0 deletions schemas/devops-promotion-validate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/PromotionValidateResult",
"definitions": {
"PromotionValidateResult": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"errorType": {
"type": ["string", "null"]
},
"errorDetails": {
"type": ["string", "null"]
},
"combineDetails": {
"anyOf": [
{
"$ref": "#/definitions/CombineDetails"
},
{
"type": "null"
}
]
},
"suggestions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["success", "errorType", "errorDetails", "combineDetails", "suggestions"],
"additionalProperties": false
},
"CombineDetails": {
"type": "object",
"additionalProperties": {},
"properties": {
"childWorkitemsId": {
"type": "array",
"items": {
"type": "string"
}
},
"parentWorkitemId": {
"type": "string"
},
"sharedComponentsList": {
"$ref": "#/definitions/SharedComponentsList"
}
}
},
"SharedComponentsList": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "Maps a comma-separated list of work item names to the components they share."
}
}
}
Loading
Loading