@salesforce/plugin-devops-center 2.2.0 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +45 -36
  2. package/lib/commands/devops/pipeline/create.js +6 -0
  3. package/lib/commands/devops/pipeline/create.js.map +1 -1
  4. package/lib/commands/devops/pipeline/update.js +1 -1
  5. package/lib/commands/devops/pipeline/update.js.map +1 -1
  6. package/lib/commands/devops/promote.d.ts +8 -0
  7. package/lib/commands/devops/promote.js +31 -1
  8. package/lib/commands/devops/promote.js.map +1 -1
  9. package/lib/commands/devops/stage/branch/add.d.ts +15 -0
  10. package/lib/commands/devops/stage/branch/add.js +48 -1
  11. package/lib/commands/devops/stage/branch/add.js.map +1 -1
  12. package/lib/commands/devops/stage/environment/add.d.ts +15 -0
  13. package/lib/commands/devops/stage/environment/add.js +51 -1
  14. package/lib/commands/devops/stage/environment/add.js.map +1 -1
  15. package/lib/commands/devops/work-item/create.js +1 -0
  16. package/lib/commands/devops/work-item/create.js.map +1 -1
  17. package/lib/commands/devops/work-item/list.js +2 -1
  18. package/lib/commands/devops/work-item/list.js.map +1 -1
  19. package/lib/common/base/abstractAsyncOperation.js +4 -1
  20. package/lib/common/base/abstractAsyncOperation.js.map +1 -1
  21. package/lib/common/base/abstractPromote.d.ts +2 -2
  22. package/lib/common/base/abstractPromote.js +4 -3
  23. package/lib/common/base/abstractPromote.js.map +1 -1
  24. package/lib/common/base/abstractQuick.js +2 -0
  25. package/lib/common/base/abstractQuick.js.map +1 -1
  26. package/lib/common/base/abstractReportOnPromote.js +0 -2
  27. package/lib/common/base/abstractReportOnPromote.js.map +1 -1
  28. package/lib/common/base/abstractResume.js +1 -2
  29. package/lib/common/base/abstractResume.js.map +1 -1
  30. package/lib/common/flags/flags.js +2 -0
  31. package/lib/common/flags/flags.js.map +1 -1
  32. package/lib/common/outputService/aorOutputService.js +1 -1
  33. package/lib/common/outputService/aorOutputService.js.map +1 -1
  34. package/lib/common/outputService/deployCommandOutputService.js +1 -1
  35. package/lib/common/outputService/deployCommandOutputService.js.map +1 -1
  36. package/lib/common/outputService/deploySummaryBuilder.js +5 -1
  37. package/lib/common/outputService/deploySummaryBuilder.js.map +1 -1
  38. package/lib/common/outputService/deploymentResultOutputService.js.map +1 -1
  39. package/lib/common/outputService/promoteOutputService.js +1 -1
  40. package/lib/common/outputService/promoteOutputService.js.map +1 -1
  41. package/lib/common/outputService/reportOutputService.js +0 -1
  42. package/lib/common/outputService/reportOutputService.js.map +1 -1
  43. package/lib/common/outputService/resumeCommandOutputService.js +1 -1
  44. package/lib/common/outputService/resumeCommandOutputService.js.map +1 -1
  45. package/lib/common/outputService/resumeOutputService.js +1 -0
  46. package/lib/common/outputService/resumeOutputService.js.map +1 -1
  47. package/lib/common/utils.js +0 -2
  48. package/lib/common/utils.js.map +1 -1
  49. package/lib/streamer/processors/asyncOpStream.js +0 -2
  50. package/lib/streamer/processors/asyncOpStream.js.map +1 -1
  51. package/lib/streamer/sObjectStream.js +2 -3
  52. package/lib/streamer/sObjectStream.js.map +1 -1
  53. package/lib/utils/addStageBranch.d.ts +20 -0
  54. package/lib/utils/addStageBranch.js +33 -0
  55. package/lib/utils/addStageBranch.js.map +1 -1
  56. package/lib/utils/addStageEnvironment.d.ts +21 -0
  57. package/lib/utils/addStageEnvironment.js +34 -1
  58. package/lib/utils/addStageEnvironment.js.map +1 -1
  59. package/lib/utils/createPipeline.d.ts +5 -0
  60. package/lib/utils/createPipeline.js +37 -0
  61. package/lib/utils/createPipeline.js.map +1 -1
  62. package/lib/utils/createPullRequest.js +1 -3
  63. package/lib/utils/createPullRequest.js.map +1 -1
  64. package/lib/utils/createWorkItem.js +21 -18
  65. package/lib/utils/createWorkItem.js.map +1 -1
  66. package/lib/utils/promoteStage.d.ts +20 -0
  67. package/lib/utils/promoteStage.js +25 -0
  68. package/lib/utils/promoteStage.js.map +1 -1
  69. package/lib/utils/updateWorkItem.d.ts +22 -2
  70. package/lib/utils/updateWorkItem.js +98 -20
  71. package/lib/utils/updateWorkItem.js.map +1 -1
  72. package/lib/utils/workItems.js +8 -5
  73. package/lib/utils/workItems.js.map +1 -1
  74. package/messages/devops.promote.md +12 -0
  75. package/messages/devops.stage.branch.add.md +17 -1
  76. package/messages/devops.stage.environment.add.md +16 -0
  77. package/oclif.manifest.json +276 -258
  78. package/package.json +16 -9
  79. package/schemas/devops-pipeline-create.json +19 -0
  80. package/npm-shrinkwrap.json +0 -16645
  81. package/oclif.lock +0 -8997
@@ -113,6 +113,12 @@
113
113
  "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.",
114
114
  "allowNo": false,
115
115
  "type": "boolean"
116
+ },
117
+ "force": {
118
+ "name": "force",
119
+ "summary": "Submit the promotion even if another promotion to the same target stage is already in progress. By default, the command blocks to avoid creating duplicate promotions.",
120
+ "allowNo": false,
121
+ "type": "boolean"
116
122
  }
117
123
  },
118
124
  "hasDynamicHelp": true,
@@ -132,17 +138,14 @@
132
138
  "promote.js"
133
139
  ]
134
140
  },
135
- "devops:pipeline:create": {
141
+ "devops:promotion:complete": {
136
142
  "aliases": [],
137
143
  "args": {},
138
- "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.",
144
+ "description": "Deploys work items that were merged into the pipeline branch outside of DevOps Center (externally merged) into the target stage org and updates DevOps Center records. Equivalent to the \"Complete Promotion\" action in the DevOps Center UI when a stage is out of sync.\n\nIf no undeployed work items are found for the stage, the command exits successfully with no action taken.",
139
145
  "examples": [
140
- "Create a pipeline and associate it with an existing GitHub repository:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://github.com/myorg/myrepo",
141
- "Create a pipeline and associate it with a new GitHub repository:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo",
142
- "Create a pipeline and create a new Bitbucket repository:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo my-new-repo --repo-type bitbucket --bitbucket-workspace myworkspace --bitbucket-project-key PROJ --create-repo",
143
- "Create a pipeline and associate it with an existing Bitbucket repository:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://bitbucket.org/myworkspace/myrepo",
144
- "Create a pipeline with custom stage names instead of the default stages:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://github.com/myorg/myrepo --stage Dev --stage QA --stage Prod",
145
- "Create a pipeline and associate one or more projects with it:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://github.com/myorg/myrepo --project-id 0Hn000000000001 --project-id 0Hn000000000002"
146
+ "Complete a promotion for an out-of-sync pipeline stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001",
147
+ "Complete a promotion for a specific work item (e.g. first stage of a pipeline):\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001",
148
+ "Complete a promotion with full deploy and a specific test level:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --deploy-all --test-level RunLocalTests"
146
149
  ],
147
150
  "flags": {
148
151
  "json": {
@@ -177,73 +180,51 @@
177
180
  "multiple": false,
178
181
  "type": "option"
179
182
  },
180
- "name": {
181
- "char": "n",
182
- "name": "name",
183
- "required": true,
184
- "summary": "Name of the pipeline.",
185
- "hasDynamicHelp": false,
186
- "multiple": false,
187
- "type": "option"
188
- },
189
- "repo": {
190
- "char": "r",
191
- "name": "repo",
183
+ "target-stage-id": {
184
+ "char": "t",
185
+ "name": "target-stage-id",
192
186
  "required": true,
193
- "summary": "URL of an existing repository or the name of a repository to create.",
187
+ "summary": "ID of the out-of-sync pipeline stage to deploy to.",
194
188
  "hasDynamicHelp": false,
195
189
  "multiple": false,
196
190
  "type": "option"
197
191
  },
198
- "repo-type": {
199
- "name": "repo-type",
200
- "summary": "Type of the source code repository. Required when creating a repository using '--create-repo'.",
192
+ "work-item-id": {
193
+ "char": "i",
194
+ "name": "work-item-id",
195
+ "required": false,
196
+ "summary": "ID of a specific work item to deploy. Omit to deploy all undeployed work items for the stage. Use this for the first stage of a pipeline where no source stage exists.",
201
197
  "hasDynamicHelp": false,
202
- "multiple": false,
203
- "options": [
204
- "github",
205
- "bitbucket"
206
- ],
198
+ "multiple": true,
207
199
  "type": "option"
208
200
  },
209
- "create-repo": {
210
- "name": "create-repo",
211
- "summary": "Create a repository if it doesn't exist.",
201
+ "deploy-all": {
202
+ "char": "a",
203
+ "description": "If you don’t specify this flag, only changes in the stage’s branch are deployed.",
204
+ "name": "deploy-all",
205
+ "summary": "Deploy all metadata in the branch to the stage's org.",
212
206
  "allowNo": false,
213
207
  "type": "boolean"
214
208
  },
215
- "repo-owner": {
216
- "name": "repo-owner",
217
- "summary": "Owner (organization or user) of the GitHub repository. Required when creating a GitHub repository using '--create-repo'.",
218
- "hasDynamicHelp": false,
219
- "multiple": false,
220
- "type": "option"
221
- },
222
- "bitbucket-workspace": {
223
- "name": "bitbucket-workspace",
224
- "summary": "Bitbucket workspace that will own the repository. Required when creating a Bitbucket repository using '--create-repo'.",
225
- "hasDynamicHelp": false,
226
- "multiple": false,
227
- "type": "option"
228
- },
229
- "bitbucket-project-key": {
230
- "name": "bitbucket-project-key",
231
- "summary": "Bitbucket project key to associate with the repository. Optional when creating a Bitbucket repository using '--create-repo'.",
209
+ "test-level": {
210
+ "char": "l",
211
+ "description": "Valid values are:\n\n- NoTestRun — No tests are run. This test level applies only to deployments to development environments, such as sandbox, Developer Edition, or trial orgs. This test level is the default for development environments.\n\n- RunSpecifiedTests — Runs only the tests that you specify with the --tests flag. Code coverage requirements differ from the default coverage requirements when using this test level. Executed tests must comprise a minimum of 75% code coverage for each class and trigger in the deployment package. This coverage is computed for each class and trigger individually and is different than the overall coverage percentage.\n\n- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default for production deployments that include Apex classes or triggers.\n\n- RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.\n\nIf you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more information, see the section \"Running Tests in a Deployment\" in the \"Metadata API Developer Guide\". (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm)",
212
+ "name": "test-level",
213
+ "summary": "Deployment Apex testing level.",
232
214
  "hasDynamicHelp": false,
233
215
  "multiple": false,
216
+ "options": [
217
+ "NoTestRun",
218
+ "RunSpecifiedTests",
219
+ "RunLocalTests",
220
+ "RunAllTestsInOrg"
221
+ ],
234
222
  "type": "option"
235
223
  },
236
- "stage": {
237
- "char": "s",
238
- "name": "stage",
239
- "summary": "Name of a pipeline stage, in promotion order. Repeat the flag for each stage. Defaults to Integration, UAT, Staging, and Production.",
240
- "hasDynamicHelp": false,
241
- "multiple": true,
242
- "type": "option"
243
- },
244
- "project-id": {
245
- "name": "project-id",
246
- "summary": "ID of a project to associate with the pipeline. Repeat the flag to associate multiple projects.",
224
+ "tests": {
225
+ "description": "Separate multiple test names with commas. Enclose the entire flag value in double quotes if a test name contains spaces.",
226
+ "name": "tests",
227
+ "summary": "Apex tests to run when --test-level is RunSpecifiedTests.",
247
228
  "hasDynamicHelp": false,
248
229
  "multiple": true,
249
230
  "type": "option"
@@ -251,28 +232,29 @@
251
232
  },
252
233
  "hasDynamicHelp": true,
253
234
  "hiddenAliases": [],
254
- "id": "devops:pipeline:create",
235
+ "id": "devops:promotion:complete",
255
236
  "pluginAlias": "@salesforce/plugin-devops-center",
256
237
  "pluginName": "@salesforce/plugin-devops-center",
257
238
  "pluginType": "core",
258
239
  "strict": true,
259
- "summary": "Create a DevOps Center pipeline.",
240
+ "summary": "Deploy undeployed work items to a pipeline stage org.",
260
241
  "enableJsonFlag": true,
261
242
  "isESM": true,
262
243
  "relativePath": [
263
244
  "lib",
264
245
  "commands",
265
246
  "devops",
266
- "pipeline",
267
- "create.js"
247
+ "promotion",
248
+ "complete.js"
268
249
  ]
269
250
  },
270
- "devops:pipeline:get": {
251
+ "devops:promotion:validate": {
271
252
  "aliases": [],
272
253
  "args": {},
273
- "description": "Returns full details for a single DevOps Center pipeline: its stages in order, the source code repository and branch associated with each stage, and any connected projects.",
254
+ "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.",
274
255
  "examples": [
275
- "Get details for a specific pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Do000000000001"
256
+ "Validate promotion of a work item to a target stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001",
257
+ "Validate promotion of multiple work items:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001 --work-item-id 1fk000000000002"
276
258
  ],
277
259
  "flags": {
278
260
  "json": {
@@ -307,40 +289,50 @@
307
289
  "multiple": false,
308
290
  "type": "option"
309
291
  },
310
- "pipeline-id": {
311
- "char": "i",
312
- "name": "pipeline-id",
292
+ "target-stage-id": {
293
+ "char": "t",
294
+ "name": "target-stage-id",
313
295
  "required": true,
314
- "summary": "ID of the DevOps Center pipeline.",
296
+ "summary": "ID of the target pipeline stage to validate promotion to.",
315
297
  "hasDynamicHelp": false,
316
298
  "multiple": false,
317
299
  "type": "option"
300
+ },
301
+ "work-item-id": {
302
+ "char": "i",
303
+ "name": "work-item-id",
304
+ "required": true,
305
+ "summary": "ID of a work item to validate for promotion. Specify multiple times for multiple work items.",
306
+ "hasDynamicHelp": false,
307
+ "multiple": true,
308
+ "type": "option"
318
309
  }
319
310
  },
320
311
  "hasDynamicHelp": true,
321
312
  "hiddenAliases": [],
322
- "id": "devops:pipeline:get",
313
+ "id": "devops:promotion:validate",
323
314
  "pluginAlias": "@salesforce/plugin-devops-center",
324
315
  "pluginName": "@salesforce/plugin-devops-center",
325
316
  "pluginType": "core",
326
317
  "strict": true,
327
- "summary": "Get details of a DevOps Center pipeline including its stages, repositories, and connected projects.",
318
+ "summary": "Validate work item promotion for a pipeline stage.",
328
319
  "enableJsonFlag": true,
329
320
  "isESM": true,
330
321
  "relativePath": [
331
322
  "lib",
332
323
  "commands",
333
324
  "devops",
334
- "pipeline",
335
- "get.js"
325
+ "promotion",
326
+ "validate.js"
336
327
  ]
337
328
  },
338
- "devops:pipeline:list": {
329
+ "devops:project:create": {
339
330
  "aliases": [],
340
331
  "args": {},
341
- "description": "Returns all DevOps Center pipelines in the org, including each pipeline's stages (in order), source code repository information per stage, and any connected projects.",
332
+ "description": "Creates a new DevOps Center project with the specified name and optional description.",
342
333
  "examples": [
343
- "List all pipelines in the org:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org"
334
+ "Create a new DevOps Center project in the specified org.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"MyApp Release\"",
335
+ "Create a project with a name and description.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Platform Update\" --description \"Platform services update\""
344
336
  ],
345
337
  "flags": {
346
338
  "json": {
@@ -374,33 +366,50 @@
374
366
  "hasDynamicHelp": false,
375
367
  "multiple": false,
376
368
  "type": "option"
369
+ },
370
+ "name": {
371
+ "char": "n",
372
+ "name": "name",
373
+ "required": true,
374
+ "summary": "Name of the new DevOps Center project.",
375
+ "hasDynamicHelp": false,
376
+ "multiple": false,
377
+ "type": "option"
378
+ },
379
+ "description": {
380
+ "char": "d",
381
+ "name": "description",
382
+ "summary": "Description of the new project; if not specified, the description is blank.",
383
+ "hasDynamicHelp": false,
384
+ "multiple": false,
385
+ "type": "option"
377
386
  }
378
387
  },
379
388
  "hasDynamicHelp": true,
380
389
  "hiddenAliases": [],
381
- "id": "devops:pipeline:list",
390
+ "id": "devops:project:create",
382
391
  "pluginAlias": "@salesforce/plugin-devops-center",
383
392
  "pluginName": "@salesforce/plugin-devops-center",
384
393
  "pluginType": "core",
385
394
  "strict": true,
386
- "summary": "List DevOps Center pipelines with their stages, repositories, and connected projects.",
395
+ "summary": "Create a DevOps Center project in a DevOps Center org.",
387
396
  "enableJsonFlag": true,
388
397
  "isESM": true,
389
398
  "relativePath": [
390
399
  "lib",
391
400
  "commands",
392
401
  "devops",
393
- "pipeline",
394
- "list.js"
402
+ "project",
403
+ "create.js"
395
404
  ]
396
405
  },
397
- "devops:pipeline:update": {
406
+ "devops:project:list": {
398
407
  "aliases": [],
399
408
  "args": {},
400
- "description": "Activate, deactivate, or rename a DevOps Center pipeline. Use --activate to activate, --deactivate to deactivate, and --name to rename. You can combine --deactivate and --name in one command.\n\nA pipeline must have at least one stage before you can activate it. You can't modify the pipeline stages after you activate and promote changes through it.",
409
+ "description": "This command queries the DevopsProject standard object and returns the project Id, Name, and Description for each project found.",
401
410
  "examples": [
402
- "Activate a pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --activate",
403
- "Deactivate and rename in one step.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --deactivate --name \"My Pipeline\""
411
+ "List all DevOps Center projects in an org with alias \"my-devops-org\":\n<%= config.bin %> <%= command.id %> --target-org my-devops-org",
412
+ "List projects using an org's username:\n<%= config.bin %> <%= command.id %> --target-org devops-center@example.com"
404
413
  ],
405
414
  "flags": {
406
415
  "json": {
@@ -434,70 +443,35 @@
434
443
  "hasDynamicHelp": false,
435
444
  "multiple": false,
436
445
  "type": "option"
437
- },
438
- "pipeline-id": {
439
- "name": "pipeline-id",
440
- "required": true,
441
- "summary": "ID of the pipeline.",
442
- "hasDynamicHelp": false,
443
- "multiple": false,
444
- "type": "option"
445
- },
446
- "activate": {
447
- "exclusive": [
448
- "deactivate"
449
- ],
450
- "name": "activate",
451
- "required": false,
452
- "summary": "Activate the pipeline. Can't be used with --deactivate.",
453
- "allowNo": false,
454
- "type": "boolean"
455
- },
456
- "deactivate": {
457
- "exclusive": [
458
- "activate"
459
- ],
460
- "name": "deactivate",
461
- "required": false,
462
- "summary": "Deactivate the pipeline. Can't be used with --activate.",
463
- "allowNo": false,
464
- "type": "boolean"
465
- },
466
- "name": {
467
- "char": "n",
468
- "name": "name",
469
- "required": false,
470
- "summary": "New name for the pipeline.",
471
- "hasDynamicHelp": false,
472
- "multiple": false,
473
- "type": "option"
474
446
  }
475
447
  },
476
448
  "hasDynamicHelp": true,
477
449
  "hiddenAliases": [],
478
- "id": "devops:pipeline:update",
450
+ "id": "devops:project:list",
479
451
  "pluginAlias": "@salesforce/plugin-devops-center",
480
452
  "pluginName": "@salesforce/plugin-devops-center",
481
453
  "pluginType": "core",
482
454
  "strict": true,
483
- "summary": "Update a DevOps Center pipeline.",
455
+ "summary": "List all DevOps Center projects in a Salesforce org.",
484
456
  "enableJsonFlag": true,
485
457
  "isESM": true,
486
458
  "relativePath": [
487
459
  "lib",
488
460
  "commands",
489
461
  "devops",
490
- "pipeline",
491
- "update.js"
462
+ "project",
463
+ "list.js"
492
464
  ]
493
465
  },
494
- "devops:project:create": {
466
+ "devops:project:update": {
495
467
  "aliases": [],
496
468
  "args": {},
497
- "description": "Creates a new DevOps Center project with the specified name and optional description.",
469
+ "description": "Update the name, description, or active status of a DevOps Center project. At least one of --name, --description, or --is-active must be provided.",
498
470
  "examples": [
499
- "Create a new DevOps Center project in the specified org.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"MyApp Release\"",
500
- "Create a project with a name and description.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Platform Update\" --description \"Platform services update\""
471
+ "Rename a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --name \"MyApp Release v2\"",
472
+ "Update the description of a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --description \"Updated release description\"",
473
+ "Deactivate a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --no-is-active",
474
+ "Update all fields at once:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --name \"Archived App\" --description \"Archived\" --no-is-active"
501
475
  ],
502
476
  "flags": {
503
477
  "json": {
@@ -532,11 +506,19 @@
532
506
  "multiple": false,
533
507
  "type": "option"
534
508
  },
509
+ "project-id": {
510
+ "char": "i",
511
+ "name": "project-id",
512
+ "required": true,
513
+ "summary": "ID of the DevOps Center project to update.",
514
+ "hasDynamicHelp": false,
515
+ "multiple": false,
516
+ "type": "option"
517
+ },
535
518
  "name": {
536
519
  "char": "n",
537
520
  "name": "name",
538
- "required": true,
539
- "summary": "Name of the new DevOps Center project.",
521
+ "summary": "New name for the project.",
540
522
  "hasDynamicHelp": false,
541
523
  "multiple": false,
542
524
  "type": "option"
@@ -544,20 +526,26 @@
544
526
  "description": {
545
527
  "char": "d",
546
528
  "name": "description",
547
- "summary": "Description of the new project; if not specified, the description is blank.",
529
+ "summary": "New description for the project.",
548
530
  "hasDynamicHelp": false,
549
531
  "multiple": false,
550
532
  "type": "option"
533
+ },
534
+ "is-active": {
535
+ "name": "is-active",
536
+ "summary": "Set the project active status. Use --is-active to activate or --no-is-active to deactivate.",
537
+ "allowNo": true,
538
+ "type": "boolean"
551
539
  }
552
540
  },
553
541
  "hasDynamicHelp": true,
554
542
  "hiddenAliases": [],
555
- "id": "devops:project:create",
543
+ "id": "devops:project:update",
556
544
  "pluginAlias": "@salesforce/plugin-devops-center",
557
545
  "pluginName": "@salesforce/plugin-devops-center",
558
546
  "pluginType": "core",
559
547
  "strict": true,
560
- "summary": "Create a DevOps Center project in a DevOps Center org.",
548
+ "summary": "Update a DevOps Center project.",
561
549
  "enableJsonFlag": true,
562
550
  "isESM": true,
563
551
  "relativePath": [
@@ -565,16 +553,20 @@
565
553
  "commands",
566
554
  "devops",
567
555
  "project",
568
- "create.js"
556
+ "update.js"
569
557
  ]
570
558
  },
571
- "devops:project:list": {
559
+ "devops:pipeline:create": {
572
560
  "aliases": [],
573
561
  "args": {},
574
- "description": "This command queries the DevopsProject standard object and returns the project Id, Name, and Description for each project found.",
562
+ "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.",
575
563
  "examples": [
576
- "List all DevOps Center projects in an org with alias \"my-devops-org\":\n<%= config.bin %> <%= command.id %> --target-org my-devops-org",
577
- "List projects using an org's username:\n<%= config.bin %> <%= command.id %> --target-org devops-center@example.com"
564
+ "Create a pipeline and associate it with an existing GitHub repository:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://github.com/myorg/myrepo",
565
+ "Create a pipeline and associate it with a new GitHub repository:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo",
566
+ "Create a pipeline and create a new Bitbucket repository:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo my-new-repo --repo-type bitbucket --bitbucket-workspace myworkspace --bitbucket-project-key PROJ --create-repo",
567
+ "Create a pipeline and associate it with an existing Bitbucket repository:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://bitbucket.org/myworkspace/myrepo",
568
+ "Create a pipeline with custom stage names instead of the default stages:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://github.com/myorg/myrepo --stage Dev --stage QA --stage Prod",
569
+ "Create a pipeline and associate one or more projects with it:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --name \"Release Pipeline\" --repo https://github.com/myorg/myrepo --project-id 0Hn000000000001 --project-id 0Hn000000000002"
578
570
  ],
579
571
  "flags": {
580
572
  "json": {
@@ -608,35 +600,103 @@
608
600
  "hasDynamicHelp": false,
609
601
  "multiple": false,
610
602
  "type": "option"
603
+ },
604
+ "name": {
605
+ "char": "n",
606
+ "name": "name",
607
+ "required": true,
608
+ "summary": "Name of the pipeline.",
609
+ "hasDynamicHelp": false,
610
+ "multiple": false,
611
+ "type": "option"
612
+ },
613
+ "repo": {
614
+ "char": "r",
615
+ "name": "repo",
616
+ "required": true,
617
+ "summary": "URL of an existing repository or the name of a repository to create.",
618
+ "hasDynamicHelp": false,
619
+ "multiple": false,
620
+ "type": "option"
621
+ },
622
+ "repo-type": {
623
+ "name": "repo-type",
624
+ "summary": "Type of the source code repository. Required when creating a repository using '--create-repo'.",
625
+ "hasDynamicHelp": false,
626
+ "multiple": false,
627
+ "options": [
628
+ "github",
629
+ "bitbucket"
630
+ ],
631
+ "type": "option"
632
+ },
633
+ "create-repo": {
634
+ "name": "create-repo",
635
+ "summary": "Create a repository if it doesn't exist.",
636
+ "allowNo": false,
637
+ "type": "boolean"
638
+ },
639
+ "repo-owner": {
640
+ "name": "repo-owner",
641
+ "summary": "Owner (organization or user) of the GitHub repository. Required when creating a GitHub repository using '--create-repo'.",
642
+ "hasDynamicHelp": false,
643
+ "multiple": false,
644
+ "type": "option"
645
+ },
646
+ "bitbucket-workspace": {
647
+ "name": "bitbucket-workspace",
648
+ "summary": "Bitbucket workspace that will own the repository. Required when creating a Bitbucket repository using '--create-repo'.",
649
+ "hasDynamicHelp": false,
650
+ "multiple": false,
651
+ "type": "option"
652
+ },
653
+ "bitbucket-project-key": {
654
+ "name": "bitbucket-project-key",
655
+ "summary": "Bitbucket project key to associate with the repository. Optional when creating a Bitbucket repository using '--create-repo'.",
656
+ "hasDynamicHelp": false,
657
+ "multiple": false,
658
+ "type": "option"
659
+ },
660
+ "stage": {
661
+ "char": "s",
662
+ "name": "stage",
663
+ "summary": "Name of a pipeline stage, in promotion order. Repeat the flag for each stage. Defaults to Integration, UAT, Staging, and Production.",
664
+ "hasDynamicHelp": false,
665
+ "multiple": true,
666
+ "type": "option"
667
+ },
668
+ "project-id": {
669
+ "name": "project-id",
670
+ "summary": "ID of a project to associate with the pipeline. Repeat the flag to associate multiple projects.",
671
+ "hasDynamicHelp": false,
672
+ "multiple": true,
673
+ "type": "option"
611
674
  }
612
675
  },
613
676
  "hasDynamicHelp": true,
614
677
  "hiddenAliases": [],
615
- "id": "devops:project:list",
678
+ "id": "devops:pipeline:create",
616
679
  "pluginAlias": "@salesforce/plugin-devops-center",
617
680
  "pluginName": "@salesforce/plugin-devops-center",
618
681
  "pluginType": "core",
619
682
  "strict": true,
620
- "summary": "List all DevOps Center projects in a Salesforce org.",
683
+ "summary": "Create a DevOps Center pipeline.",
621
684
  "enableJsonFlag": true,
622
685
  "isESM": true,
623
686
  "relativePath": [
624
687
  "lib",
625
688
  "commands",
626
689
  "devops",
627
- "project",
628
- "list.js"
690
+ "pipeline",
691
+ "create.js"
629
692
  ]
630
693
  },
631
- "devops:project:update": {
694
+ "devops:pipeline:get": {
632
695
  "aliases": [],
633
696
  "args": {},
634
- "description": "Update the name, description, or active status of a DevOps Center project. At least one of --name, --description, or --is-active must be provided.",
697
+ "description": "Returns full details for a single DevOps Center pipeline: its stages in order, the source code repository and branch associated with each stage, and any connected projects.",
635
698
  "examples": [
636
- "Rename a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --name \"MyApp Release v2\"",
637
- "Update the description of a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --description \"Updated release description\"",
638
- "Deactivate a project:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --no-is-active",
639
- "Update all fields at once:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --project-id 1Qg000000000001 --name \"Archived App\" --description \"Archived\" --no-is-active"
699
+ "Get details for a specific pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Do000000000001"
640
700
  ],
641
701
  "flags": {
642
702
  "json": {
@@ -671,64 +731,40 @@
671
731
  "multiple": false,
672
732
  "type": "option"
673
733
  },
674
- "project-id": {
734
+ "pipeline-id": {
675
735
  "char": "i",
676
- "name": "project-id",
736
+ "name": "pipeline-id",
677
737
  "required": true,
678
- "summary": "ID of the DevOps Center project to update.",
679
- "hasDynamicHelp": false,
680
- "multiple": false,
681
- "type": "option"
682
- },
683
- "name": {
684
- "char": "n",
685
- "name": "name",
686
- "summary": "New name for the project.",
687
- "hasDynamicHelp": false,
688
- "multiple": false,
689
- "type": "option"
690
- },
691
- "description": {
692
- "char": "d",
693
- "name": "description",
694
- "summary": "New description for the project.",
738
+ "summary": "ID of the DevOps Center pipeline.",
695
739
  "hasDynamicHelp": false,
696
740
  "multiple": false,
697
741
  "type": "option"
698
- },
699
- "is-active": {
700
- "name": "is-active",
701
- "summary": "Set the project active status. Use --is-active to activate or --no-is-active to deactivate.",
702
- "allowNo": true,
703
- "type": "boolean"
704
742
  }
705
743
  },
706
744
  "hasDynamicHelp": true,
707
745
  "hiddenAliases": [],
708
- "id": "devops:project:update",
746
+ "id": "devops:pipeline:get",
709
747
  "pluginAlias": "@salesforce/plugin-devops-center",
710
748
  "pluginName": "@salesforce/plugin-devops-center",
711
749
  "pluginType": "core",
712
750
  "strict": true,
713
- "summary": "Update a DevOps Center project.",
751
+ "summary": "Get details of a DevOps Center pipeline including its stages, repositories, and connected projects.",
714
752
  "enableJsonFlag": true,
715
753
  "isESM": true,
716
754
  "relativePath": [
717
755
  "lib",
718
756
  "commands",
719
757
  "devops",
720
- "project",
721
- "update.js"
758
+ "pipeline",
759
+ "get.js"
722
760
  ]
723
761
  },
724
- "devops:promotion:complete": {
762
+ "devops:pipeline:list": {
725
763
  "aliases": [],
726
764
  "args": {},
727
- "description": "Deploys work items that were merged into the pipeline branch outside of DevOps Center (externally merged) into the target stage org and updates DevOps Center records. Equivalent to the \"Complete Promotion\" action in the DevOps Center UI when a stage is out of sync.\n\nIf no undeployed work items are found for the stage, the command exits successfully with no action taken.",
765
+ "description": "Returns all DevOps Center pipelines in the org, including each pipeline's stages (in order), source code repository information per stage, and any connected projects.",
728
766
  "examples": [
729
- "Complete a promotion for an out-of-sync pipeline stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001",
730
- "Complete a promotion for a specific work item (e.g. first stage of a pipeline):\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001",
731
- "Complete a promotion with full deploy and a specific test level:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --deploy-all --test-level RunLocalTests"
767
+ "List all pipelines in the org:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org"
732
768
  ],
733
769
  "flags": {
734
770
  "json": {
@@ -762,82 +798,33 @@
762
798
  "hasDynamicHelp": false,
763
799
  "multiple": false,
764
800
  "type": "option"
765
- },
766
- "target-stage-id": {
767
- "char": "t",
768
- "name": "target-stage-id",
769
- "required": true,
770
- "summary": "ID of the out-of-sync pipeline stage to deploy to.",
771
- "hasDynamicHelp": false,
772
- "multiple": false,
773
- "type": "option"
774
- },
775
- "work-item-id": {
776
- "char": "i",
777
- "name": "work-item-id",
778
- "required": false,
779
- "summary": "ID of a specific work item to deploy. Omit to deploy all undeployed work items for the stage. Use this for the first stage of a pipeline where no source stage exists.",
780
- "hasDynamicHelp": false,
781
- "multiple": true,
782
- "type": "option"
783
- },
784
- "deploy-all": {
785
- "char": "a",
786
- "description": "If you don’t specify this flag, only changes in the stage’s branch are deployed.",
787
- "name": "deploy-all",
788
- "summary": "Deploy all metadata in the branch to the stage's org.",
789
- "allowNo": false,
790
- "type": "boolean"
791
- },
792
- "test-level": {
793
- "char": "l",
794
- "description": "Valid values are:\n\n- NoTestRun — No tests are run. This test level applies only to deployments to development environments, such as sandbox, Developer Edition, or trial orgs. This test level is the default for development environments.\n\n- RunSpecifiedTests — Runs only the tests that you specify with the --tests flag. Code coverage requirements differ from the default coverage requirements when using this test level. Executed tests must comprise a minimum of 75% code coverage for each class and trigger in the deployment package. This coverage is computed for each class and trigger individually and is different than the overall coverage percentage.\n\n- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default for production deployments that include Apex classes or triggers.\n\n- RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.\n\nIf you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more information, see the section \"Running Tests in a Deployment\" in the \"Metadata API Developer Guide\". (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm)",
795
- "name": "test-level",
796
- "summary": "Deployment Apex testing level.",
797
- "hasDynamicHelp": false,
798
- "multiple": false,
799
- "options": [
800
- "NoTestRun",
801
- "RunSpecifiedTests",
802
- "RunLocalTests",
803
- "RunAllTestsInOrg"
804
- ],
805
- "type": "option"
806
- },
807
- "tests": {
808
- "description": "Separate multiple test names with commas. Enclose the entire flag value in double quotes if a test name contains spaces.",
809
- "name": "tests",
810
- "summary": "Apex tests to run when --test-level is RunSpecifiedTests.",
811
- "hasDynamicHelp": false,
812
- "multiple": true,
813
- "type": "option"
814
801
  }
815
802
  },
816
803
  "hasDynamicHelp": true,
817
804
  "hiddenAliases": [],
818
- "id": "devops:promotion:complete",
805
+ "id": "devops:pipeline:list",
819
806
  "pluginAlias": "@salesforce/plugin-devops-center",
820
807
  "pluginName": "@salesforce/plugin-devops-center",
821
808
  "pluginType": "core",
822
809
  "strict": true,
823
- "summary": "Deploy undeployed work items to a pipeline stage org.",
810
+ "summary": "List DevOps Center pipelines with their stages, repositories, and connected projects.",
824
811
  "enableJsonFlag": true,
825
812
  "isESM": true,
826
813
  "relativePath": [
827
814
  "lib",
828
815
  "commands",
829
816
  "devops",
830
- "promotion",
831
- "complete.js"
817
+ "pipeline",
818
+ "list.js"
832
819
  ]
833
820
  },
834
- "devops:promotion:validate": {
821
+ "devops:pipeline:update": {
835
822
  "aliases": [],
836
823
  "args": {},
837
- "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.",
824
+ "description": "Activate, deactivate, or rename a DevOps Center pipeline. Use --activate to activate, --deactivate to deactivate, and --name to rename. You can combine --deactivate and --name in one command.\n\nA pipeline must have at least one stage before you can activate it. You can't modify the pipeline stages after you activate and promote changes through it.",
838
825
  "examples": [
839
- "Validate promotion of a work item to a target stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001",
840
- "Validate promotion of multiple work items:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --target-stage-id 1QV000000000001 --work-item-id 1fk000000000001 --work-item-id 1fk000000000002"
826
+ "Activate a pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --activate",
827
+ "Deactivate and rename in one step.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --deactivate --name \"My Pipeline\""
841
828
  ],
842
829
  "flags": {
843
830
  "json": {
@@ -872,41 +859,60 @@
872
859
  "multiple": false,
873
860
  "type": "option"
874
861
  },
875
- "target-stage-id": {
876
- "char": "t",
877
- "name": "target-stage-id",
862
+ "pipeline-id": {
863
+ "name": "pipeline-id",
878
864
  "required": true,
879
- "summary": "ID of the target pipeline stage to validate promotion to.",
865
+ "summary": "ID of the pipeline.",
880
866
  "hasDynamicHelp": false,
881
867
  "multiple": false,
882
868
  "type": "option"
883
869
  },
884
- "work-item-id": {
885
- "char": "i",
886
- "name": "work-item-id",
887
- "required": true,
888
- "summary": "ID of a work item to validate for promotion. Specify multiple times for multiple work items.",
870
+ "activate": {
871
+ "exclusive": [
872
+ "deactivate"
873
+ ],
874
+ "name": "activate",
875
+ "required": false,
876
+ "summary": "Activate the pipeline. Can't be used with --deactivate.",
877
+ "allowNo": false,
878
+ "type": "boolean"
879
+ },
880
+ "deactivate": {
881
+ "exclusive": [
882
+ "activate"
883
+ ],
884
+ "name": "deactivate",
885
+ "required": false,
886
+ "summary": "Deactivate the pipeline. Can't be used with --activate.",
887
+ "allowNo": false,
888
+ "type": "boolean"
889
+ },
890
+ "name": {
891
+ "char": "n",
892
+ "name": "name",
893
+ "required": false,
894
+ "summary": "New name for the pipeline.",
889
895
  "hasDynamicHelp": false,
890
- "multiple": true,
896
+ "multiple": false,
891
897
  "type": "option"
892
898
  }
893
899
  },
894
900
  "hasDynamicHelp": true,
895
901
  "hiddenAliases": [],
896
- "id": "devops:promotion:validate",
902
+ "id": "devops:pipeline:update",
897
903
  "pluginAlias": "@salesforce/plugin-devops-center",
898
904
  "pluginName": "@salesforce/plugin-devops-center",
899
905
  "pluginType": "core",
900
906
  "strict": true,
901
- "summary": "Validate work item promotion for a pipeline stage.",
907
+ "summary": "Update a DevOps Center pipeline.",
902
908
  "enableJsonFlag": true,
903
909
  "isESM": true,
904
910
  "relativePath": [
905
911
  "lib",
906
912
  "commands",
907
913
  "devops",
908
- "promotion",
909
- "validate.js"
914
+ "pipeline",
915
+ "update.js"
910
916
  ]
911
917
  },
912
918
  "devops:request:status": {
@@ -1869,7 +1875,7 @@
1869
1875
  "devops:stage:branch:add": {
1870
1876
  "aliases": [],
1871
1877
  "args": {},
1872
- "description": "By default, the branch must exist in the repository. Use --create-vcs-branch to create a branch if it doesn't exist.\nEach pipeline stage supports only one branch. Adding a branch replaces any existing branch linked to the pipeline stage.",
1878
+ "description": "By default, the branch must exist in the repository. Use --create-vcs-branch to create a branch if it doesn't exist.\nEach pipeline stage supports only one branch. If the stage already has a branch, the command blocks so the existing branch isn't orphaned; pass --force to replace it.",
1873
1879
  "examples": [
1874
1880
  "Add an existing branch to a stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000001 --branch-name main",
1875
1881
  "Create and add a branch to a pipeline stage:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000002 --branch-name integration --create-vcs-branch"
@@ -1937,6 +1943,12 @@
1937
1943
  "summary": "Create the branch in the remote repository if it doesn't already exist.",
1938
1944
  "allowNo": false,
1939
1945
  "type": "boolean"
1946
+ },
1947
+ "force": {
1948
+ "name": "force",
1949
+ "summary": "Replace the stage's existing branch. By default, the command blocks if the stage already has a branch to avoid orphaning it. With this flag, the new branch is associated and the previous branch record is removed if no other stage references it.",
1950
+ "allowNo": false,
1951
+ "type": "boolean"
1940
1952
  }
1941
1953
  },
1942
1954
  "hasDynamicHelp": true,
@@ -2116,6 +2128,12 @@
2116
2128
  "summary": "Don't auto-open the browser for OAuth authentication. The redirect URL is printed for manual use.",
2117
2129
  "allowNo": false,
2118
2130
  "type": "boolean"
2131
+ },
2132
+ "force": {
2133
+ "name": "force",
2134
+ "summary": "Replace the stage's existing environment. By default, the command blocks if the stage already has an environment to avoid orphaning it. With this flag, the new environment is added first and the previous one is removed only after the new environment is associated successfully.",
2135
+ "allowNo": false,
2136
+ "type": "boolean"
2119
2137
  }
2120
2138
  },
2121
2139
  "hasDynamicHelp": true,
@@ -2791,5 +2809,5 @@
2791
2809
  ]
2792
2810
  }
2793
2811
  },
2794
- "version": "2.2.0"
2812
+ "version": "2.3.2"
2795
2813
  }