Skip to content

Commit 4d5fbea

Browse files
authored
feat: add git token support (#74)
1 parent 3df2ad3 commit 4d5fbea

File tree

3 files changed

+222
-21
lines changed

3 files changed

+222
-21
lines changed

ibm_catalog.json

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"tags": [
88
"solution",
99
"enterprise_app",
10-
"ibm_beta",
11-
"security"
10+
"security",
11+
"ibm_created"
1212
],
1313
"keywords": [
1414
"compliance",
@@ -296,9 +296,44 @@
296296
"key": "existing_secrets_manager_crn",
297297
"required": false,
298298
"type": "string",
299-
"default_value": "",
299+
"default_value": "__NULL__",
300300
"description": "The CRN of an existing Secrets Manager instance"
301-
}
301+
},
302+
{
303+
"key": "autostart",
304+
"required": false,
305+
"type": "boolean",
306+
"default_value": false,
307+
"description": "Set to `true` to automatically run the CI pipeline."
308+
},
309+
{
310+
"key": "create_git_token",
311+
"required": false,
312+
"type": "boolean",
313+
"default_value": false,
314+
"description": "Set to `true` to create a Git Token secret in the speficied Secrets Manager, using the name set in `repo_git_token_secret_name` and the value set in `repo_git_token_secret_value`."
315+
},
316+
{
317+
"key": "repo_git_token_secret_name",
318+
"required": false,
319+
"type": "string",
320+
"default_value": "",
321+
"description": "The name for the Git Token secret in Secrets Manager."
322+
},
323+
{
324+
"key": "repo_git_token_secret_value",
325+
"required": false,
326+
"type": "password",
327+
"default_value": "",
328+
"description": "The value of the Git Token secret that is created if `create_git_token` is set to `true`."
329+
},
330+
{
331+
"key": "repo_group",
332+
"required": false,
333+
"type": "string",
334+
"default_value": "",
335+
"description": "The name of the Git repository owner/group. This setting applies to all all the compliance repositories and sample app."
336+
}
302337
],
303338
"outputs": [
304339
{
@@ -605,7 +640,49 @@
605640
"default_value": "",
606641
"description": "Name of the Git token secret in the secret provider used for accessing the sample (or bring your own) application repository.",
607642
"required": false
608-
}
643+
},
644+
{
645+
"key": "existing_secrets_manager_crn",
646+
"required": false,
647+
"type": "string",
648+
"default_value": "__NULL__",
649+
"description": "The CRN of an existing Secrets Manager instance"
650+
},
651+
{
652+
"key": "autostart",
653+
"required": false,
654+
"type": "boolean",
655+
"default_value": false,
656+
"description": "Set to `true` to automatically run the CI pipeline."
657+
},
658+
{
659+
"key": "create_git_token",
660+
"required": false,
661+
"type": "boolean",
662+
"default_value": false,
663+
"description": "Set to `true` to create a Git Token secret in the speficied Secrets Manager, using the name set in `repo_git_token_secret_name` and the value set in `repo_git_token_secret_value`."
664+
},
665+
{
666+
"key": "repo_git_token_secret_name",
667+
"required": false,
668+
"type": "string",
669+
"default_value": "",
670+
"description": "The name for the Git Token secret in Secrets Manager."
671+
},
672+
{
673+
"key": "repo_git_token_secret_value",
674+
"required": false,
675+
"type": "password",
676+
"default_value": "",
677+
"description": "The value of the Git Token secret that is created if `create_git_token` is set to `true`."
678+
},
679+
{
680+
"key": "repo_group",
681+
"required": false,
682+
"type": "string",
683+
"default_value": "",
684+
"description": "The name of the Git repository owner/group. This setting applies to all all the compliance repositories and sample app."
685+
}
609686
],
610687
"outputs": [
611688
{

kubernetes/stack_definition.json

Lines changed: 75 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,54 @@
198198
"hidden": false,
199199
"default": "",
200200
"required": false
201+
},
202+
{
203+
"name": "existing_secrets_manager_crn",
204+
"required": false,
205+
"type": "string",
206+
"hidden": false,
207+
"default": "__NULL__",
208+
"custom_config": {}
209+
},
210+
{
211+
"name": "autostart",
212+
"required": false,
213+
"type": "boolean",
214+
"hidden": false,
215+
"default": false,
216+
"custom_config": {}
217+
},
218+
{
219+
"name": "create_git_token",
220+
"required": false,
221+
"type": "boolean",
222+
"hidden": false,
223+
"default": false,
224+
"custom_config": {}
225+
},
226+
{
227+
"name": "repo_git_token_secret_name",
228+
"required": false,
229+
"type": "string",
230+
"hidden": false,
231+
"default": "",
232+
"custom_config": {}
233+
},
234+
{
235+
"name": "repo_git_token_secret_value",
236+
"required": false,
237+
"type": "password",
238+
"hidden": false,
239+
"default": "",
240+
"custom_config": {}
241+
},
242+
{
243+
"name": "repo_group",
244+
"required": false,
245+
"type": "string",
246+
"hidden": false,
247+
"default": "",
248+
"custom_config": {}
201249
}
202250
],
203251
"members": [
@@ -221,7 +269,7 @@
221269
}
222270
],
223271
"name": "1 - Key Management",
224-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.58ca29c8-694e-41a8-8beb-866cb24b48e6-global"
272+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.3b5c0ef5-6438-4e7b-8a88-88636bc590c6-global"
225273
},
226274
{
227275
"inputs": [
@@ -243,7 +291,7 @@
243291
}
244292
],
245293
"name": "2 - Cloud Object Storage",
246-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.48d7439d-aaf6-42a1-bb4d-a73775caf0c2-global"
294+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.f039fa0e-24f7-4c12-a617-1dee12997859-global"
247295
},
248296
{
249297
"inputs": [
@@ -307,7 +355,7 @@
307355
}
308356
],
309357
"name": "4 - Event Notifications",
310-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.ef41f37e-25b7-4dc2-89b3-08d38df6789d-global"
358+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.dfffe742-c7a1-452e-90b1-3080f1f57f78-global"
311359
},
312360
{
313361
"inputs": [
@@ -327,6 +375,10 @@
327375
"name": "prefix",
328376
"value": "ref:../../inputs/prefix"
329377
},
378+
{
379+
"name": "existing_secrets_manager_crn",
380+
"value": "ref:../../inputs/existing_secrets_manager_crn"
381+
},
330382
{
331383
"name": "existing_kms_instance_crn",
332384
"value": "ref:../../members/1 - Key Management/outputs/kms_instance_crn"
@@ -341,7 +393,7 @@
341393
}
342394
],
343395
"name": "5 - Secrets Manager",
344-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.03587d2d-38bd-42c3-983b-72469702e038-global"
396+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.e314e905-ca89-4947-aa94-23d270516f0e-global"
345397
},
346398
{
347399
"inputs": [
@@ -395,11 +447,11 @@
395447
}
396448
],
397449
"name": "6 - Security and Compliance Center",
398-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.88be4381-4dfe-45ee-a2f9-1d48bb6f300a-global"
450+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.29b5ef2b-a3c1-4798-9595-ed1263945f82-global"
399451
},
400452
{
401453
"name": "7 - DevSecOps Toolchains",
402-
"version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.d0d2aff1-8f34-4fa8-bc00-92378edd2226-global",
454+
"version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.7721322c-d795-4e44-b9a9-e10ee1565a06-global",
403455
"inputs": [
404456
{
405457
"name": "ibmcloud_api_key",
@@ -451,7 +503,7 @@
451503
},
452504
{
453505
"name": "autostart",
454-
"value": "true"
506+
"value": "ref:../../inputs/autostart"
455507
},
456508
{
457509
"name": "prefix",
@@ -528,6 +580,22 @@
528580
{
529581
"name": "add_container_name_suffix",
530582
"value": "true"
583+
},
584+
{
585+
"name": "create_git_token",
586+
"value": "ref:../../inputs/create_git_token"
587+
},
588+
{
589+
"name": "repo_git_token_secret_name",
590+
"value": "ref:../../inputs/repo_git_token_secret_name"
591+
},
592+
{
593+
"name": "repo_git_token_secret_value",
594+
"value": "ref:../../inputs/repo_git_token_secret_value"
595+
},
596+
{
597+
"name": "repo_group",
598+
"value": "ref:../../inputs/repo_git_token_secret_value"
531599
}
532600
]
533601
}

stack_definition.json

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,46 @@
161161
"hidden": false,
162162
"default": "__NULL__",
163163
"custom_config": {}
164+
},
165+
{
166+
"name": "autostart",
167+
"required": false,
168+
"type": "boolean",
169+
"hidden": false,
170+
"default": false,
171+
"custom_config": {}
172+
},
173+
{
174+
"name": "create_git_token",
175+
"required": false,
176+
"type": "boolean",
177+
"hidden": false,
178+
"default": false,
179+
"custom_config": {}
180+
},
181+
{
182+
"name": "repo_git_token_secret_name",
183+
"required": false,
184+
"type": "string",
185+
"hidden": false,
186+
"default": "",
187+
"custom_config": {}
188+
},
189+
{
190+
"name": "repo_git_token_secret_value",
191+
"required": false,
192+
"type": "password",
193+
"hidden": false,
194+
"default": "",
195+
"custom_config": {}
196+
},
197+
{
198+
"name": "repo_group",
199+
"required": false,
200+
"type": "string",
201+
"hidden": false,
202+
"default": "",
203+
"custom_config": {}
164204
}
165205
],
166206
"members": [
@@ -184,7 +224,7 @@
184224
}
185225
],
186226
"name": "1 - Key Management",
187-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.58ca29c8-694e-41a8-8beb-866cb24b48e6-global"
227+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.3b5c0ef5-6438-4e7b-8a88-88636bc590c6-global"
188228
},
189229
{
190230
"inputs": [
@@ -206,7 +246,7 @@
206246
}
207247
],
208248
"name": "2 - Cloud Object Storage",
209-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.48d7439d-aaf6-42a1-bb4d-a73775caf0c2-global"
249+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.f039fa0e-24f7-4c12-a617-1dee12997859-global"
210250
},
211251
{
212252
"inputs": [
@@ -270,7 +310,7 @@
270310
}
271311
],
272312
"name": "4 - Event Notifications",
273-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.ef41f37e-25b7-4dc2-89b3-08d38df6789d-global"
313+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.dfffe742-c7a1-452e-90b1-3080f1f57f78-global"
274314
},
275315
{
276316
"inputs": [
@@ -308,7 +348,7 @@
308348
}
309349
],
310350
"name": "5 - Secrets Manager",
311-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.03587d2d-38bd-42c3-983b-72469702e038-global"
351+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.e314e905-ca89-4947-aa94-23d270516f0e-global"
312352
},
313353
{
314354
"inputs": [
@@ -362,7 +402,7 @@
362402
}
363403
],
364404
"name": "6 - Security and Compliance Center",
365-
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.88be4381-4dfe-45ee-a2f9-1d48bb6f300a-global"
405+
"version_locator": "7a4d68b4-cf8b-40cd-a3d1-f49aff526eb3.29b5ef2b-a3c1-4798-9595-ed1263945f82-global"
366406
},
367407
{
368408
"inputs": [
@@ -388,7 +428,7 @@
388428
},
389429
{
390430
"name": "8 - DevSecOps Toolchains",
391-
"version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.72e3b0a3-9d6c-4b85-be2c-baed5a5ac732-global",
431+
"version_locator": "1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.4efc4831-c0ce-4c27-8f88-021d5985e7f5-global",
392432
"inputs": [
393433
{
394434
"name": "ibmcloud_api_key",
@@ -439,9 +479,9 @@
439479
"value": "ref:../../inputs/registry_namespace"
440480
},
441481
{
442-
"name": "autostart",
443-
"value": "true"
444-
},
482+
"name": "autostart",
483+
"value": "ref:../../inputs/autostart"
484+
},
445485
{
446486
"name": "prefix",
447487
"value": "ref:../../inputs/prefix"
@@ -497,6 +537,22 @@
497537
{
498538
"name": "cd_code_engine_project",
499539
"value": "ref:../../members/7 - Code Engine Project/outputs/project_1_name"
540+
},
541+
{
542+
"name": "create_git_token",
543+
"value": "ref:../../inputs/create_git_token"
544+
},
545+
{
546+
"name": "repo_git_token_secret_name",
547+
"value": "ref:../../inputs/repo_git_token_secret_name"
548+
},
549+
{
550+
"name": "repo_git_token_secret_value",
551+
"value": "ref:../../inputs/repo_git_token_secret_value"
552+
},
553+
{
554+
"name": "repo_group",
555+
"value": "ref:../../inputs/repo_git_token_secret_value"
500556
}
501557
]
502558
}

0 commit comments

Comments
 (0)