@salesforce/plugin-devops-center 2.0.1 → 2.1.1
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.
- package/README.md +51 -44
- package/lib/commands/devops/pipeline/create.d.ts +1 -1
- package/lib/commands/devops/pipeline/create.js +5 -4
- package/lib/commands/devops/pipeline/create.js.map +1 -1
- package/lib/commands/devops/pipeline/update.d.ts +2 -1
- package/lib/commands/devops/pipeline/update.js +10 -4
- package/lib/commands/devops/pipeline/update.js.map +1 -1
- package/lib/commands/devops/stage/environment/add.js +36 -4
- package/lib/commands/devops/stage/environment/add.js.map +1 -1
- package/lib/utils/createPipeline.d.ts +1 -2
- package/lib/utils/createPipeline.js +4 -7
- package/lib/utils/createPipeline.js.map +1 -1
- package/messages/devops.pipeline.create.md +11 -7
- package/messages/devops.pipeline.update.md +10 -6
- package/messages/devops.stage.environment.add.md +4 -0
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +31 -17
- package/package.json +3 -3
- package/schemas/devops-pipeline-create.json +0 -3
package/README.md
CHANGED
|
@@ -96,14 +96,15 @@ Create a DevOps Center pipeline.
|
|
|
96
96
|
USAGE
|
|
97
97
|
$ sf devops pipeline create -o <value> -n <value> -r <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
98
98
|
[--repo-type github|bitbucket] [--create-repo] [--repo-owner <value>] [--bitbucket-workspace <value>]
|
|
99
|
-
[--bitbucket-project-key <value>] [-
|
|
99
|
+
[--bitbucket-project-key <value>] [-s <value>...]
|
|
100
100
|
|
|
101
101
|
FLAGS
|
|
102
|
-
-d, --description=<value> Description of the pipeline.
|
|
103
102
|
-n, --name=<value> (required) Name of the pipeline.
|
|
104
103
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
105
104
|
configuration variable is already set.
|
|
106
105
|
-r, --repo=<value> (required) URL of an existing repository or the name of a repository to create.
|
|
106
|
+
-s, --stage=<value>... Name of a pipeline stage, in promotion order. Repeat the flag for each stage.
|
|
107
|
+
Defaults to Integration, UAT, Staging, and Production.
|
|
107
108
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
108
109
|
--bitbucket-project-key=<value> Bitbucket project key to associate with the repository. Optional when creating a
|
|
109
110
|
Bitbucket repository using '--create-repo'.
|
|
@@ -127,28 +128,33 @@ DESCRIPTION
|
|
|
127
128
|
create the pipeline, add stages, and activate the pipeline.
|
|
128
129
|
|
|
129
130
|
EXAMPLES
|
|
130
|
-
Create a pipeline and associate it with an existing GitHub repository
|
|
131
|
+
Create a pipeline and associate it with an existing GitHub repository:
|
|
131
132
|
|
|
132
133
|
$ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo \
|
|
133
134
|
https://github.com/myorg/myrepo
|
|
134
135
|
|
|
135
|
-
Create a pipeline and associate it with a new GitHub repository
|
|
136
|
+
Create a pipeline and associate it with a new GitHub repository:
|
|
136
137
|
|
|
137
138
|
$ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type \
|
|
138
139
|
github --repo-owner myorg --create-repo
|
|
139
140
|
|
|
140
|
-
Create a pipeline and create a new Bitbucket repository
|
|
141
|
+
Create a pipeline and create a new Bitbucket repository:
|
|
141
142
|
|
|
142
143
|
$ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type \
|
|
143
144
|
bitbucket --bitbucket-workspace myworkspace --bitbucket-project-key PROJ --create-repo
|
|
144
145
|
|
|
145
|
-
Create a pipeline
|
|
146
|
+
Create a pipeline and associate it with an existing Bitbucket repository:
|
|
146
147
|
|
|
147
148
|
$ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo \
|
|
148
|
-
https://bitbucket.org/myworkspace/myrepo
|
|
149
|
+
https://bitbucket.org/myworkspace/myrepo
|
|
150
|
+
|
|
151
|
+
Create a pipeline with custom stage names instead of the default stages:
|
|
152
|
+
|
|
153
|
+
$ sf devops pipeline create --target-org my-devops-org --name "Release Pipeline" --repo \
|
|
154
|
+
https://github.com/myorg/myrepo --stage Dev --stage QA --stage Prod
|
|
149
155
|
```
|
|
150
156
|
|
|
151
|
-
_See code: [src/commands/devops/pipeline/create.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
157
|
+
_See code: [src/commands/devops/pipeline/create.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/create.ts)_
|
|
152
158
|
|
|
153
159
|
## `sf devops pipeline get`
|
|
154
160
|
|
|
@@ -180,7 +186,7 @@ EXAMPLES
|
|
|
180
186
|
$ sf devops pipeline get --target-org my-devops-org --pipeline-id 0Do000000000001
|
|
181
187
|
```
|
|
182
188
|
|
|
183
|
-
_See code: [src/commands/devops/pipeline/get.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
189
|
+
_See code: [src/commands/devops/pipeline/get.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/get.ts)_
|
|
184
190
|
|
|
185
191
|
## `sf devops pipeline list`
|
|
186
192
|
|
|
@@ -211,7 +217,7 @@ EXAMPLES
|
|
|
211
217
|
$ sf devops pipeline list --target-org my-devops-org
|
|
212
218
|
```
|
|
213
219
|
|
|
214
|
-
_See code: [src/commands/devops/pipeline/list.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
220
|
+
_See code: [src/commands/devops/pipeline/list.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/list.ts)_
|
|
215
221
|
|
|
216
222
|
## `sf devops pipeline project add`
|
|
217
223
|
|
|
@@ -245,7 +251,7 @@ EXAMPLES
|
|
|
245
251
|
0Hn000000000001
|
|
246
252
|
```
|
|
247
253
|
|
|
248
|
-
_See code: [src/commands/devops/pipeline/project/add.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
254
|
+
_See code: [src/commands/devops/pipeline/project/add.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/project/add.ts)_
|
|
249
255
|
|
|
250
256
|
## `sf devops pipeline project delete`
|
|
251
257
|
|
|
@@ -279,7 +285,7 @@ EXAMPLES
|
|
|
279
285
|
0Hn000000000001
|
|
280
286
|
```
|
|
281
287
|
|
|
282
|
-
_See code: [src/commands/devops/pipeline/project/delete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
288
|
+
_See code: [src/commands/devops/pipeline/project/delete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/project/delete.ts)_
|
|
283
289
|
|
|
284
290
|
## `sf devops pipeline stage add`
|
|
285
291
|
|
|
@@ -320,7 +326,7 @@ EXAMPLES
|
|
|
320
326
|
--next-stage-id 0Xc000000000003
|
|
321
327
|
```
|
|
322
328
|
|
|
323
|
-
_See code: [src/commands/devops/pipeline/stage/add.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
329
|
+
_See code: [src/commands/devops/pipeline/stage/add.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/stage/add.ts)_
|
|
324
330
|
|
|
325
331
|
## `sf devops pipeline stage delete`
|
|
326
332
|
|
|
@@ -355,7 +361,7 @@ EXAMPLES
|
|
|
355
361
|
0Xc000000000002
|
|
356
362
|
```
|
|
357
363
|
|
|
358
|
-
_See code: [src/commands/devops/pipeline/stage/delete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
364
|
+
_See code: [src/commands/devops/pipeline/stage/delete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/stage/delete.ts)_
|
|
359
365
|
|
|
360
366
|
## `sf devops pipeline stage update`
|
|
361
367
|
|
|
@@ -388,7 +394,7 @@ EXAMPLES
|
|
|
388
394
|
$ sf devops pipeline stage update --target-org my-devops-org --stage-id 1QV000000000001 --name "Integration"
|
|
389
395
|
```
|
|
390
396
|
|
|
391
|
-
_See code: [src/commands/devops/pipeline/stage/update.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
397
|
+
_See code: [src/commands/devops/pipeline/stage/update.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/stage/update.ts)_
|
|
392
398
|
|
|
393
399
|
## `sf devops pipeline update`
|
|
394
400
|
|
|
@@ -397,14 +403,15 @@ Update a DevOps Center pipeline.
|
|
|
397
403
|
```
|
|
398
404
|
USAGE
|
|
399
405
|
$ sf devops pipeline update -o <value> --pipeline-id <value> [--json] [--flags-dir <value>] [--api-version <value>]
|
|
400
|
-
[--
|
|
406
|
+
[--activate | --deactivate] [-n <value>]
|
|
401
407
|
|
|
402
408
|
FLAGS
|
|
403
409
|
-n, --name=<value> New name for the pipeline.
|
|
404
410
|
-o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
|
|
405
411
|
configuration variable is already set.
|
|
406
|
-
--
|
|
412
|
+
--activate Activate the pipeline. Can't be used with --deactivate.
|
|
407
413
|
--api-version=<value> Override the api version used for api requests made by this command
|
|
414
|
+
--deactivate Deactivate the pipeline. Can't be used with --activate.
|
|
408
415
|
--pipeline-id=<value> (required) ID of the pipeline.
|
|
409
416
|
|
|
410
417
|
GLOBAL FLAGS
|
|
@@ -414,8 +421,8 @@ GLOBAL FLAGS
|
|
|
414
421
|
DESCRIPTION
|
|
415
422
|
Update a DevOps Center pipeline.
|
|
416
423
|
|
|
417
|
-
Activate, deactivate, or rename a DevOps Center pipeline. Use --
|
|
418
|
-
--name to rename. You can combine --
|
|
424
|
+
Activate, deactivate, or rename a DevOps Center pipeline. Use --activate to activate, --deactivate to deactivate, and
|
|
425
|
+
--name to rename. You can combine --deactivate and --name in one command.
|
|
419
426
|
|
|
420
427
|
A pipeline must have at least one stage before you can activate it. You can't modify the pipeline stages after you
|
|
421
428
|
activate and promote changes through it.
|
|
@@ -423,15 +430,15 @@ DESCRIPTION
|
|
|
423
430
|
EXAMPLES
|
|
424
431
|
Activate a pipeline:
|
|
425
432
|
|
|
426
|
-
$ sf devops pipeline update --target-org my-devops-org --pipeline-id 0XB000000000001 --
|
|
433
|
+
$ sf devops pipeline update --target-org my-devops-org --pipeline-id 0XB000000000001 --activate
|
|
427
434
|
|
|
428
435
|
Deactivate and rename in one step.
|
|
429
436
|
|
|
430
|
-
$ sf devops pipeline update --target-org my-devops-org --pipeline-id 0XB000000000001 --
|
|
437
|
+
$ sf devops pipeline update --target-org my-devops-org --pipeline-id 0XB000000000001 --deactivate --name "My \
|
|
431
438
|
Pipeline"
|
|
432
439
|
```
|
|
433
440
|
|
|
434
|
-
_See code: [src/commands/devops/pipeline/update.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
441
|
+
_See code: [src/commands/devops/pipeline/update.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/pipeline/update.ts)_
|
|
435
442
|
|
|
436
443
|
## `sf devops project create`
|
|
437
444
|
|
|
@@ -468,7 +475,7 @@ EXAMPLES
|
|
|
468
475
|
update"
|
|
469
476
|
```
|
|
470
477
|
|
|
471
|
-
_See code: [src/commands/devops/project/create.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
478
|
+
_See code: [src/commands/devops/project/create.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/project/create.ts)_
|
|
472
479
|
|
|
473
480
|
## `sf devops project list`
|
|
474
481
|
|
|
@@ -503,7 +510,7 @@ EXAMPLES
|
|
|
503
510
|
$ sf devops project list --target-org devops-center@example.com
|
|
504
511
|
```
|
|
505
512
|
|
|
506
|
-
_See code: [src/commands/devops/project/list.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
513
|
+
_See code: [src/commands/devops/project/list.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/project/list.ts)_
|
|
507
514
|
|
|
508
515
|
## `sf devops project update`
|
|
509
516
|
|
|
@@ -553,7 +560,7 @@ EXAMPLES
|
|
|
553
560
|
--description "Archived" --no-is-active
|
|
554
561
|
```
|
|
555
562
|
|
|
556
|
-
_See code: [src/commands/devops/project/update.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
563
|
+
_See code: [src/commands/devops/project/update.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/project/update.ts)_
|
|
557
564
|
|
|
558
565
|
## `sf devops promote`
|
|
559
566
|
|
|
@@ -653,7 +660,7 @@ FLAG DESCRIPTIONS
|
|
|
653
660
|
spaces.
|
|
654
661
|
```
|
|
655
662
|
|
|
656
|
-
_See code: [src/commands/devops/promote.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
663
|
+
_See code: [src/commands/devops/promote.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/promote.ts)_
|
|
657
664
|
|
|
658
665
|
## `sf devops promotion complete`
|
|
659
666
|
|
|
@@ -736,7 +743,7 @@ FLAG DESCRIPTIONS
|
|
|
736
743
|
spaces.
|
|
737
744
|
```
|
|
738
745
|
|
|
739
|
-
_See code: [src/commands/devops/promotion/complete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
746
|
+
_See code: [src/commands/devops/promotion/complete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/promotion/complete.ts)_
|
|
740
747
|
|
|
741
748
|
## `sf devops promotion validate`
|
|
742
749
|
|
|
@@ -777,7 +784,7 @@ EXAMPLES
|
|
|
777
784
|
1fk000000000001 --work-item-id 1fk000000000002
|
|
778
785
|
```
|
|
779
786
|
|
|
780
|
-
_See code: [src/commands/devops/promotion/validate.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
787
|
+
_See code: [src/commands/devops/promotion/validate.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/promotion/validate.ts)_
|
|
781
788
|
|
|
782
789
|
## `sf devops request status`
|
|
783
790
|
|
|
@@ -808,7 +815,7 @@ EXAMPLES
|
|
|
808
815
|
$ sf devops request status --target-org my-devops-org --request-token a0B000000000001
|
|
809
816
|
```
|
|
810
817
|
|
|
811
|
-
_See code: [src/commands/devops/request/status.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
818
|
+
_See code: [src/commands/devops/request/status.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/request/status.ts)_
|
|
812
819
|
|
|
813
820
|
## `sf devops review create`
|
|
814
821
|
|
|
@@ -845,7 +852,7 @@ EXAMPLES
|
|
|
845
852
|
$ sf devops review create --target-org my-devops-org --work-item-id 0Wx000000000001
|
|
846
853
|
```
|
|
847
854
|
|
|
848
|
-
_See code: [src/commands/devops/review/create.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
855
|
+
_See code: [src/commands/devops/review/create.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/review/create.ts)_
|
|
849
856
|
|
|
850
857
|
## `sf devops stage branch add`
|
|
851
858
|
|
|
@@ -888,7 +895,7 @@ EXAMPLES
|
|
|
888
895
|
--branch-name integration --create-vcs-branch
|
|
889
896
|
```
|
|
890
897
|
|
|
891
|
-
_See code: [src/commands/devops/stage/branch/add.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
898
|
+
_See code: [src/commands/devops/stage/branch/add.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/stage/branch/add.ts)_
|
|
892
899
|
|
|
893
900
|
## `sf devops stage branch delete`
|
|
894
901
|
|
|
@@ -926,7 +933,7 @@ EXAMPLES
|
|
|
926
933
|
0Xp000000000001
|
|
927
934
|
```
|
|
928
935
|
|
|
929
|
-
_See code: [src/commands/devops/stage/branch/delete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
936
|
+
_See code: [src/commands/devops/stage/branch/delete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/stage/branch/delete.ts)_
|
|
930
937
|
|
|
931
938
|
## `sf devops stage environment add`
|
|
932
939
|
|
|
@@ -966,7 +973,7 @@ EXAMPLES
|
|
|
966
973
|
Production_Org --org-type Production
|
|
967
974
|
```
|
|
968
975
|
|
|
969
|
-
_See code: [src/commands/devops/stage/environment/add.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
976
|
+
_See code: [src/commands/devops/stage/environment/add.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/stage/environment/add.ts)_
|
|
970
977
|
|
|
971
978
|
## `sf devops stage environment delete`
|
|
972
979
|
|
|
@@ -1000,7 +1007,7 @@ EXAMPLES
|
|
|
1000
1007
|
0Xe000000000001
|
|
1001
1008
|
```
|
|
1002
1009
|
|
|
1003
|
-
_See code: [src/commands/devops/stage/environment/delete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1010
|
+
_See code: [src/commands/devops/stage/environment/delete.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/stage/environment/delete.ts)_
|
|
1004
1011
|
|
|
1005
1012
|
## `sf devops work-item combine`
|
|
1006
1013
|
|
|
@@ -1049,7 +1056,7 @@ FLAG DESCRIPTIONS
|
|
|
1049
1056
|
are merged into the parent's branch during promotion.
|
|
1050
1057
|
```
|
|
1051
1058
|
|
|
1052
|
-
_See code: [src/commands/devops/work-item/combine.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1059
|
+
_See code: [src/commands/devops/work-item/combine.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/work-item/combine.ts)_
|
|
1053
1060
|
|
|
1054
1061
|
## `sf devops work-item create`
|
|
1055
1062
|
|
|
@@ -1090,7 +1097,7 @@ EXAMPLES
|
|
|
1090
1097
|
--description "Implement dark mode toggle in settings page"
|
|
1091
1098
|
```
|
|
1092
1099
|
|
|
1093
|
-
_See code: [src/commands/devops/work-item/create.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1100
|
+
_See code: [src/commands/devops/work-item/create.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/work-item/create.ts)_
|
|
1094
1101
|
|
|
1095
1102
|
## `sf devops work-item list`
|
|
1096
1103
|
|
|
@@ -1126,7 +1133,7 @@ EXAMPLES
|
|
|
1126
1133
|
$ sf devops work-item list --target-org my-devops-org --project-id 1Qg000000000001 --json
|
|
1127
1134
|
```
|
|
1128
1135
|
|
|
1129
|
-
_See code: [src/commands/devops/work-item/list.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1136
|
+
_See code: [src/commands/devops/work-item/list.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/work-item/list.ts)_
|
|
1130
1137
|
|
|
1131
1138
|
## `sf devops work-item prepare`
|
|
1132
1139
|
|
|
@@ -1167,7 +1174,7 @@ EXAMPLES
|
|
|
1167
1174
|
--target-stage-id 05S000000000002
|
|
1168
1175
|
```
|
|
1169
1176
|
|
|
1170
|
-
_See code: [src/commands/devops/work-item/prepare.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1177
|
+
_See code: [src/commands/devops/work-item/prepare.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/work-item/prepare.ts)_
|
|
1171
1178
|
|
|
1172
1179
|
## `sf devops work-item update`
|
|
1173
1180
|
|
|
@@ -1214,7 +1221,7 @@ EXAMPLES
|
|
|
1214
1221
|
--description "Users can't log in on mobile" --status "In Progress"
|
|
1215
1222
|
```
|
|
1216
1223
|
|
|
1217
|
-
_See code: [src/commands/devops/work-item/update.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1224
|
+
_See code: [src/commands/devops/work-item/update.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/devops/work-item/update.ts)_
|
|
1218
1225
|
|
|
1219
1226
|
## `sf project deploy pipeline quick`
|
|
1220
1227
|
|
|
@@ -1288,7 +1295,7 @@ FLAG DESCRIPTIONS
|
|
|
1288
1295
|
"sf project deploy pipeline report".
|
|
1289
1296
|
```
|
|
1290
1297
|
|
|
1291
|
-
_See code: [src/commands/project/deploy/pipeline/quick.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1298
|
+
_See code: [src/commands/project/deploy/pipeline/quick.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/project/deploy/pipeline/quick.ts)_
|
|
1292
1299
|
|
|
1293
1300
|
## `sf project deploy pipeline report`
|
|
1294
1301
|
|
|
@@ -1336,7 +1343,7 @@ FLAG DESCRIPTIONS
|
|
|
1336
1343
|
your most recent operation was longer than 3 days ago, this flag won't find the job ID.
|
|
1337
1344
|
```
|
|
1338
1345
|
|
|
1339
|
-
_See code: [src/commands/project/deploy/pipeline/report.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1346
|
+
_See code: [src/commands/project/deploy/pipeline/report.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/project/deploy/pipeline/report.ts)_
|
|
1340
1347
|
|
|
1341
1348
|
## `sf project deploy pipeline resume`
|
|
1342
1349
|
|
|
@@ -1403,7 +1410,7 @@ FLAG DESCRIPTIONS
|
|
|
1403
1410
|
returns the job ID. To check the status of the operation, run "sf project deploy pipeline report".
|
|
1404
1411
|
```
|
|
1405
1412
|
|
|
1406
|
-
_See code: [src/commands/project/deploy/pipeline/resume.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1413
|
+
_See code: [src/commands/project/deploy/pipeline/resume.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/project/deploy/pipeline/resume.ts)_
|
|
1407
1414
|
|
|
1408
1415
|
## `sf project deploy pipeline start`
|
|
1409
1416
|
|
|
@@ -1503,7 +1510,7 @@ FLAG DESCRIPTIONS
|
|
|
1503
1510
|
"sf project deploy pipeline report".
|
|
1504
1511
|
```
|
|
1505
1512
|
|
|
1506
|
-
_See code: [src/commands/project/deploy/pipeline/start.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1513
|
+
_See code: [src/commands/project/deploy/pipeline/start.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/project/deploy/pipeline/start.ts)_
|
|
1507
1514
|
|
|
1508
1515
|
## `sf project deploy pipeline validate`
|
|
1509
1516
|
|
|
@@ -1603,7 +1610,7 @@ FLAG DESCRIPTIONS
|
|
|
1603
1610
|
"sf project deploy pipeline report".
|
|
1604
1611
|
```
|
|
1605
1612
|
|
|
1606
|
-
_See code: [src/commands/project/deploy/pipeline/validate.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.
|
|
1613
|
+
_See code: [src/commands/project/deploy/pipeline/validate.ts](https://github.com/salesforcecli/plugin-devops-center/blob/2.1.1/src/commands/project/deploy/pipeline/validate.ts)_
|
|
1607
1614
|
|
|
1608
1615
|
<!-- commandsstop -->
|
|
1609
1616
|
|
|
@@ -15,7 +15,7 @@ export default class DevopsPipelineCreate extends SfCommand<CreatePipelineResult
|
|
|
15
15
|
'repo-owner': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
16
|
'bitbucket-workspace': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
17
|
'bitbucket-project-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
-
|
|
18
|
+
stage: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
19
|
};
|
|
20
20
|
run(): Promise<CreatePipelineResult>;
|
|
21
21
|
private resolveRepoType;
|
|
@@ -54,9 +54,10 @@ export default class DevopsPipelineCreate extends SfCommand {
|
|
|
54
54
|
'bitbucket-project-key': Flags.string({
|
|
55
55
|
summary: messages.getMessage('flags.bitbucket-project-key.summary'),
|
|
56
56
|
}),
|
|
57
|
-
|
|
58
|
-
summary: messages.getMessage('flags.
|
|
59
|
-
char: '
|
|
57
|
+
stage: Flags.string({
|
|
58
|
+
summary: messages.getMessage('flags.stage.summary'),
|
|
59
|
+
char: 's',
|
|
60
|
+
multiple: true,
|
|
60
61
|
}),
|
|
61
62
|
};
|
|
62
63
|
async run() {
|
|
@@ -91,13 +92,13 @@ export default class DevopsPipelineCreate extends SfCommand {
|
|
|
91
92
|
result = await createPipeline({
|
|
92
93
|
connection,
|
|
93
94
|
name: flags['name'],
|
|
94
|
-
description: flags['description'],
|
|
95
95
|
repo: flags['repo'],
|
|
96
96
|
repoType,
|
|
97
97
|
createRepo: flags['create-repo'],
|
|
98
98
|
repoOwner: flags['repo-owner'],
|
|
99
99
|
bitbucketWorkspace: flags['bitbucket-workspace'],
|
|
100
100
|
bitbucketProjectKey: flags['bitbucket-project-key'],
|
|
101
|
+
stages: flags['stage'],
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
104
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/devops/pipeline/create.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,cAAc,EAEd,cAAc,EACd,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,wBAAwB,CAAC,CAAC;AACrG,MAAM,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,cAAc,CAAC,CAAC;AAEtG,MAAM,CAAC,OAA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 -9,7 +9,8 @@ export default class DevopsPipelineUpdate extends SfCommand<PipelineUpdateResult
|
|
|
9
9
|
'target-org': import("@oclif/core/interfaces").OptionFlag<Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
'pipeline-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
-
|
|
12
|
+
activate: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
deactivate: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
private static getPipelineState;
|
|
@@ -33,10 +33,15 @@ export default class DevopsPipelineUpdate extends SfCommand {
|
|
|
33
33
|
required: true,
|
|
34
34
|
char: undefined,
|
|
35
35
|
}),
|
|
36
|
-
|
|
37
|
-
summary: messages.getMessage('flags.
|
|
36
|
+
activate: Flags.boolean({
|
|
37
|
+
summary: messages.getMessage('flags.activate.summary'),
|
|
38
38
|
required: false,
|
|
39
|
-
|
|
39
|
+
exclusive: ['deactivate'],
|
|
40
|
+
}),
|
|
41
|
+
deactivate: Flags.boolean({
|
|
42
|
+
summary: messages.getMessage('flags.deactivate.summary'),
|
|
43
|
+
required: false,
|
|
44
|
+
exclusive: ['activate'],
|
|
40
45
|
}),
|
|
41
46
|
name: Flags.string({
|
|
42
47
|
summary: messages.getMessage('flags.name.summary'),
|
|
@@ -58,7 +63,8 @@ export default class DevopsPipelineUpdate extends SfCommand {
|
|
|
58
63
|
const org = flags['target-org'];
|
|
59
64
|
const connection = org.getConnection(flags['api-version']);
|
|
60
65
|
const pipelineId = flags['pipeline-id'];
|
|
61
|
-
|
|
66
|
+
// Derive tri-state: true = activate, false = deactivate, undefined = neither requested.
|
|
67
|
+
const activateFlag = flags.activate ? true : flags.deactivate ? false : undefined;
|
|
62
68
|
const newName = flags.name;
|
|
63
69
|
if (activateFlag === undefined && newName === undefined) {
|
|
64
70
|
this.error(messages.getMessage('error.NoFlags'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/devops/pipeline/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAc,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAwB,MAAM,oCAAoC,CAAC;AAClH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,wBAAwB,CAAC,CAAC;AACrG,MAAM,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,cAAc,CAAC,CAAC;AAEtG,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAA+B;IACxE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE;QACpC,aAAa,EAAE,KAAK,CAAC,YAAY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AAY,KAAK,IAAI,EAAE,CAAC;YAC1B,MAAM,cAAc,GAAG,MAAM,gBAAgB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC,CAAC;YAC1E,MAAM,CAAC,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC;YACtC,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;YAC/B,IAAI,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACnD,CAAC;QAED,0CAA0C;QAC1C,MAAM,YAAY,GAA0C,EAAE,CAAC;QAC/D,IAAI,YAAY,KAAK,KAAK;YAAE,YAAY,CAAC,QAAQ,GAAG,KAAK,CAAC;QAC1D,IAAI,OAAO,KAAK,SAAS;YAAE,YAAY,CAAC,IAAI,GAAG,OAAO,CAAC;QAEvD,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzC,MAAM,oBAAoB,CAAC,UAAU,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;YACjE,IAAI,YAAY,KAAK,KAAK,EAAE,CAAC;gBAC3B,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC;gBAC3B,IAAI,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;YACrD,CAAC;YACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;gBACtB,IAAI,CAAC,GAAG,CAAC,yCAAyC,OAAO,IAAI,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import { execFile } from 'node:child_process';
|
|
17
17
|
import { Messages } from '@salesforce/core';
|
|
18
18
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
19
19
|
import { addStageEnvironment } from '../../../../utils/addStageEnvironment.js';
|
|
@@ -22,10 +22,42 @@ import { validateSalesforceId } from '../../../../utils/soqlUtils.js';
|
|
|
22
22
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
23
23
|
const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'devops.stage.environment.add');
|
|
24
24
|
const commonErrorMessages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
|
|
25
|
+
/**
|
|
26
|
+
* Validates that a server-provided redirect URL is a well-formed http(s) URL, and
|
|
27
|
+
* returns its normalized form. Rejects anything else so a malicious endpoint can't
|
|
28
|
+
* smuggle shell metacharacters or non-web schemes (javascript:, file:, etc.) into
|
|
29
|
+
* the browser-open step. Throws on invalid input.
|
|
30
|
+
*/
|
|
31
|
+
function sanitizeRedirectUrl(url) {
|
|
32
|
+
let parsed;
|
|
33
|
+
try {
|
|
34
|
+
parsed = new URL(url);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
throw new Error(messages.getMessage('error.InvalidRedirectUrl', [url]));
|
|
38
|
+
}
|
|
39
|
+
if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {
|
|
40
|
+
throw new Error(messages.getMessage('error.InvalidRedirectUrl', [url]));
|
|
41
|
+
}
|
|
42
|
+
// Return the normalized href: quotes, spaces, and other unsafe characters are
|
|
43
|
+
// percent-encoded, so no shell metacharacters survive.
|
|
44
|
+
return parsed.href;
|
|
45
|
+
}
|
|
25
46
|
function openUrl(url) {
|
|
26
47
|
const platform = process.platform;
|
|
27
|
-
|
|
28
|
-
|
|
48
|
+
// Pass the URL as a separate argument (never interpolated into a shell string),
|
|
49
|
+
// so it can't be interpreted as a command even if it contained metacharacters.
|
|
50
|
+
// On Windows, `start` is a cmd builtin; its first quoted argument is the window
|
|
51
|
+
// title, so pass an empty title before the URL.
|
|
52
|
+
if (platform === 'darwin') {
|
|
53
|
+
execFile('open', [url]);
|
|
54
|
+
}
|
|
55
|
+
else if (platform === 'win32') {
|
|
56
|
+
execFile('cmd', ['/c', 'start', '', url]);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
execFile('xdg-open', [url]);
|
|
60
|
+
}
|
|
29
61
|
}
|
|
30
62
|
function decodeRedirectUrl(url) {
|
|
31
63
|
return url.replace(/&/g, '&');
|
|
@@ -100,7 +132,7 @@ export default class DevopsStageEnvironmentAdd extends SfCommand {
|
|
|
100
132
|
environmentName,
|
|
101
133
|
orgType,
|
|
102
134
|
onCreated: (data) => {
|
|
103
|
-
const url = decodeRedirectUrl(data.redirectUrl);
|
|
135
|
+
const url = sanitizeRedirectUrl(decodeRedirectUrl(data.redirectUrl));
|
|
104
136
|
if (!noBrowser) {
|
|
105
137
|
openUrl(url);
|
|
106
138
|
this.log(messages.getMessage('info.BrowserOpened'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../src/commands/devops/stage/environment/add.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"add.js","sourceRoot":"","sources":["../../../../../src/commands/devops/stage/environment/add.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAsC,MAAM,0CAA0C,CAAC;AACnH,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAA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IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,+BAA+B,EAAE,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACzF,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -7,19 +7,18 @@ export type RepoInfo = {
|
|
|
7
7
|
export type CreatePipelineParams = {
|
|
8
8
|
connection: Connection;
|
|
9
9
|
name: string;
|
|
10
|
-
description?: string;
|
|
11
10
|
repo: string;
|
|
12
11
|
repoType: string;
|
|
13
12
|
createRepo?: boolean;
|
|
14
13
|
repoOwner?: string;
|
|
15
14
|
bitbucketWorkspace?: string;
|
|
16
15
|
bitbucketProjectKey?: string;
|
|
16
|
+
stages?: string[];
|
|
17
17
|
};
|
|
18
18
|
export type CreatePipelineResult = {
|
|
19
19
|
success: boolean;
|
|
20
20
|
pipelineId?: string;
|
|
21
21
|
name?: string;
|
|
22
|
-
description?: string;
|
|
23
22
|
status?: string;
|
|
24
23
|
repository?: RepoInfo;
|
|
25
24
|
error?: string;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { execSync } from 'node:child_process';
|
|
17
|
-
const
|
|
17
|
+
const DEFAULT_STAGE_NAMES = ['Integration', 'UAT', 'Staging', 'Production'];
|
|
18
18
|
/**
|
|
19
19
|
* Detects repo type from a URL. Returns 'github' or 'bitbucket', or undefined.
|
|
20
20
|
*/
|
|
@@ -86,12 +86,13 @@ export class GitHubOwnerNotFoundError extends Error {
|
|
|
86
86
|
* POST /services/data/v{version}/connect/devops/pipelines
|
|
87
87
|
*/
|
|
88
88
|
export async function createPipeline(params) {
|
|
89
|
-
const { connection, name,
|
|
89
|
+
const { connection, name, repo, repoType, createRepo, repoOwner, bitbucketWorkspace, bitbucketProjectKey, stages } = params;
|
|
90
90
|
const path = `/services/data/v${connection.getApiVersion()}/connect/devops/pipelines`;
|
|
91
|
+
const stageNames = stages && stages.length > 0 ? stages : DEFAULT_STAGE_NAMES;
|
|
91
92
|
const payload = {
|
|
92
93
|
name,
|
|
93
94
|
vcsType: repoType,
|
|
94
|
-
stages:
|
|
95
|
+
stages: stageNames.map((stageName) => ({ name: stageName })),
|
|
95
96
|
};
|
|
96
97
|
if (createRepo) {
|
|
97
98
|
payload.createVcsRepo = true;
|
|
@@ -110,9 +111,6 @@ export async function createPipeline(params) {
|
|
|
110
111
|
else {
|
|
111
112
|
payload.vcsRepoUrl = repo;
|
|
112
113
|
}
|
|
113
|
-
if (description) {
|
|
114
|
-
payload.description = description;
|
|
115
|
-
}
|
|
116
114
|
const data = await connection.request({
|
|
117
115
|
method: 'POST',
|
|
118
116
|
url: path,
|
|
@@ -123,7 +121,6 @@ export async function createPipeline(params) {
|
|
|
123
121
|
success: true,
|
|
124
122
|
pipelineId: data.id,
|
|
125
123
|
name,
|
|
126
|
-
description,
|
|
127
124
|
status: data.status ?? 'Inactive',
|
|
128
125
|
repository: {
|
|
129
126
|
repoUrl: repo,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPipeline.js","sourceRoot":"","sources":["../../src/utils/createPipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"createPipeline.js","sourceRoot":"","sources":["../../src/utils/createPipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAoC9C,MAAM,mBAAmB,GAAG,CAAC,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAe;IAC5C,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IACpC,IAAI,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC;Q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ACR,OAAO,EAAE,UAAU,IAAI,KAAK;SAC7B;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -38,27 +38,31 @@ Bitbucket workspace that will own the repository. Required when creating a Bitbu
|
|
|
38
38
|
|
|
39
39
|
Bitbucket project key to associate with the repository. Optional when creating a Bitbucket repository using '--create-repo'.
|
|
40
40
|
|
|
41
|
-
# flags.
|
|
41
|
+
# flags.stage.summary
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Name of a pipeline stage, in promotion order. Repeat the flag for each stage. Defaults to Integration, UAT, Staging, and Production.
|
|
44
44
|
|
|
45
45
|
# examples
|
|
46
46
|
|
|
47
|
-
- Create a pipeline and associate it with an existing GitHub repository
|
|
47
|
+
- Create a pipeline and associate it with an existing GitHub repository:
|
|
48
48
|
|
|
49
49
|
<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo https://github.com/myorg/myrepo
|
|
50
50
|
|
|
51
|
-
- Create a pipeline and associate it with a new GitHub repository
|
|
51
|
+
- Create a pipeline and associate it with a new GitHub repository:
|
|
52
52
|
|
|
53
53
|
<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo
|
|
54
54
|
|
|
55
|
-
- Create a pipeline and create a new Bitbucket repository
|
|
55
|
+
- Create a pipeline and create a new Bitbucket repository:
|
|
56
56
|
|
|
57
57
|
<%= 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
|
|
58
58
|
|
|
59
|
-
- Create a pipeline
|
|
59
|
+
- Create a pipeline and associate it with an existing Bitbucket repository:
|
|
60
60
|
|
|
61
|
-
<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo https://bitbucket.org/myworkspace/myrepo
|
|
61
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo https://bitbucket.org/myworkspace/myrepo
|
|
62
|
+
|
|
63
|
+
- Create a pipeline with custom stage names instead of the default stages:
|
|
64
|
+
|
|
65
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo https://github.com/myorg/myrepo --stage Dev --stage QA --stage Prod
|
|
62
66
|
|
|
63
67
|
# error.RepoTypeRequired
|
|
64
68
|
|
|
@@ -4,7 +4,7 @@ Update a DevOps Center pipeline.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
Activate, deactivate, or rename a DevOps Center pipeline. Use --
|
|
7
|
+
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.
|
|
8
8
|
|
|
9
9
|
A 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.
|
|
10
10
|
|
|
@@ -12,9 +12,13 @@ A pipeline must have at least one stage before you can activate it. You can't mo
|
|
|
12
12
|
|
|
13
13
|
ID of the pipeline.
|
|
14
14
|
|
|
15
|
-
# flags.
|
|
15
|
+
# flags.activate.summary
|
|
16
16
|
|
|
17
|
-
Activate the pipeline.
|
|
17
|
+
Activate the pipeline. Can't be used with --deactivate.
|
|
18
|
+
|
|
19
|
+
# flags.deactivate.summary
|
|
20
|
+
|
|
21
|
+
Deactivate the pipeline. Can't be used with --activate.
|
|
18
22
|
|
|
19
23
|
# flags.name.summary
|
|
20
24
|
|
|
@@ -24,15 +28,15 @@ New name for the pipeline.
|
|
|
24
28
|
|
|
25
29
|
- Activate a pipeline:
|
|
26
30
|
|
|
27
|
-
<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --
|
|
31
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --activate
|
|
28
32
|
|
|
29
33
|
- Deactivate and rename in one step.
|
|
30
34
|
|
|
31
|
-
<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --
|
|
35
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --deactivate --name "My Pipeline"
|
|
32
36
|
|
|
33
37
|
# error.NoFlags
|
|
34
38
|
|
|
35
|
-
Provide at least one of --
|
|
39
|
+
Provide at least one of --activate, --deactivate, or --name.
|
|
36
40
|
|
|
37
41
|
# error.NoStages
|
|
38
42
|
|
|
@@ -63,3 +63,7 @@ Failed to create environment for stage: %s
|
|
|
63
63
|
# error.AuthTimeout
|
|
64
64
|
|
|
65
65
|
Authentication timed out. The environment was created but not yet authenticated. Re-run the command or authenticate manually via the org's DevOps Center setup.
|
|
66
|
+
|
|
67
|
+
# error.InvalidRedirectUrl
|
|
68
|
+
|
|
69
|
+
The server returned an invalid authentication redirect URL: %s. Expected an http or https URL.
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-devops-center",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/plugin-devops-center",
|
|
9
|
-
"version": "2.
|
|
9
|
+
"version": "2.1.1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@jsforce/jsforce-node": "^3",
|
package/oclif.manifest.json
CHANGED
|
@@ -137,10 +137,11 @@
|
|
|
137
137
|
"args": {},
|
|
138
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.",
|
|
139
139
|
"examples": [
|
|
140
|
-
"Create a pipeline and associate it with an existing GitHub repository
|
|
141
|
-
"Create a pipeline and associate it with a new GitHub repository
|
|
142
|
-
"Create a pipeline and create a new Bitbucket repository
|
|
143
|
-
"Create a pipeline
|
|
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"
|
|
144
145
|
],
|
|
145
146
|
"flags": {
|
|
146
147
|
"json": {
|
|
@@ -231,12 +232,12 @@
|
|
|
231
232
|
"multiple": false,
|
|
232
233
|
"type": "option"
|
|
233
234
|
},
|
|
234
|
-
"
|
|
235
|
-
"char": "
|
|
236
|
-
"name": "
|
|
237
|
-
"summary": "
|
|
235
|
+
"stage": {
|
|
236
|
+
"char": "s",
|
|
237
|
+
"name": "stage",
|
|
238
|
+
"summary": "Name of a pipeline stage, in promotion order. Repeat the flag for each stage. Defaults to Integration, UAT, Staging, and Production.",
|
|
238
239
|
"hasDynamicHelp": false,
|
|
239
|
-
"multiple":
|
|
240
|
+
"multiple": true,
|
|
240
241
|
"type": "option"
|
|
241
242
|
}
|
|
242
243
|
},
|
|
@@ -388,10 +389,10 @@
|
|
|
388
389
|
"devops:pipeline:update": {
|
|
389
390
|
"aliases": [],
|
|
390
391
|
"args": {},
|
|
391
|
-
"description": "Activate, deactivate, or rename a DevOps Center pipeline. Use --
|
|
392
|
+
"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.",
|
|
392
393
|
"examples": [
|
|
393
|
-
"Activate a pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --
|
|
394
|
-
"Deactivate and rename in one step.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --
|
|
394
|
+
"Activate a pipeline:\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --activate",
|
|
395
|
+
"Deactivate and rename in one step.\n<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0XB000000000001 --deactivate --name \"My Pipeline\""
|
|
395
396
|
],
|
|
396
397
|
"flags": {
|
|
397
398
|
"json": {
|
|
@@ -434,11 +435,24 @@
|
|
|
434
435
|
"multiple": false,
|
|
435
436
|
"type": "option"
|
|
436
437
|
},
|
|
437
|
-
"
|
|
438
|
-
"
|
|
438
|
+
"activate": {
|
|
439
|
+
"exclusive": [
|
|
440
|
+
"deactivate"
|
|
441
|
+
],
|
|
442
|
+
"name": "activate",
|
|
443
|
+
"required": false,
|
|
444
|
+
"summary": "Activate the pipeline. Can't be used with --deactivate.",
|
|
445
|
+
"allowNo": false,
|
|
446
|
+
"type": "boolean"
|
|
447
|
+
},
|
|
448
|
+
"deactivate": {
|
|
449
|
+
"exclusive": [
|
|
450
|
+
"activate"
|
|
451
|
+
],
|
|
452
|
+
"name": "deactivate",
|
|
439
453
|
"required": false,
|
|
440
|
-
"summary": "
|
|
441
|
-
"allowNo":
|
|
454
|
+
"summary": "Deactivate the pipeline. Can't be used with --activate.",
|
|
455
|
+
"allowNo": false,
|
|
442
456
|
"type": "boolean"
|
|
443
457
|
},
|
|
444
458
|
"name": {
|
|
@@ -2769,5 +2783,5 @@
|
|
|
2769
2783
|
]
|
|
2770
2784
|
}
|
|
2771
2785
|
},
|
|
2772
|
-
"version": "2.
|
|
2786
|
+
"version": "2.1.1"
|
|
2773
2787
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-devops-center",
|
|
3
3
|
"description": "The DevOps Center CLI plugin provides a command-line alternative to performing equivalent actions in the DevOps Center graphical UI",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.1.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Salesforce",
|
|
7
7
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
}
|
|
257
257
|
},
|
|
258
258
|
"sfdx": {
|
|
259
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-devops-center/2.
|
|
260
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-devops-center/2.
|
|
259
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-devops-center/2.1.1.crt",
|
|
260
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-devops-center/2.1.1.sig"
|
|
261
261
|
}
|
|
262
262
|
}
|