projen 0.79.4__py3-none-any.whl → 0.98.25__py3-none-any.whl
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.
- projen/__init__.py +1234 -86
- projen/_jsii/__init__.py +20 -2
- projen/_jsii/projen@0.98.25.jsii.tgz +0 -0
- projen/awscdk/__init__.py +1758 -230
- projen/build/__init__.py +290 -129
- projen/cdk/__init__.py +1030 -151
- projen/cdk8s/__init__.py +833 -109
- projen/cdktf/__init__.py +389 -50
- projen/circleci/__init__.py +35 -1
- projen/github/__init__.py +2224 -312
- projen/github/workflows/__init__.py +403 -17
- projen/gitlab/__init__.py +241 -8
- projen/java/__init__.py +471 -4
- projen/javascript/__init__.py +2276 -143
- projen/javascript/biome_config/__init__.py +5461 -0
- projen/python/__init__.py +3390 -1037
- projen/python/uv_config/__init__.py +3933 -0
- projen/release/__init__.py +1080 -138
- projen/typescript/__init__.py +992 -118
- projen/vscode/__init__.py +22 -1
- projen/web/__init__.py +1456 -163
- {projen-0.79.4.data → projen-0.98.25.data}/scripts/projen +1 -1
- {projen-0.79.4.dist-info → projen-0.98.25.dist-info}/METADATA +42 -41
- projen-0.98.25.dist-info/RECORD +28 -0
- {projen-0.79.4.dist-info → projen-0.98.25.dist-info}/WHEEL +1 -1
- projen/_jsii/projen@0.79.4.jsii.tgz +0 -0
- projen-0.79.4.dist-info/RECORD +0 -26
- {projen-0.79.4.dist-info → projen-0.98.25.dist-info}/LICENSE +0 -0
- {projen-0.79.4.dist-info → projen-0.98.25.dist-info}/top_level.txt +0 -0
projen/build/__init__.py
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
from pkgutil import extend_path
|
|
2
|
+
__path__ = extend_path(__path__, __name__)
|
|
3
|
+
|
|
1
4
|
import abc
|
|
2
5
|
import builtins
|
|
3
6
|
import datetime
|
|
@@ -8,7 +11,22 @@ import jsii
|
|
|
8
11
|
import publication
|
|
9
12
|
import typing_extensions
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
import typeguard
|
|
15
|
+
from importlib.metadata import version as _metadata_package_version
|
|
16
|
+
TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
|
|
17
|
+
|
|
18
|
+
def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
|
|
19
|
+
if TYPEGUARD_MAJOR_VERSION <= 2:
|
|
20
|
+
return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
|
|
21
|
+
else:
|
|
22
|
+
if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
|
|
23
|
+
pass
|
|
24
|
+
else:
|
|
25
|
+
if TYPEGUARD_MAJOR_VERSION == 3:
|
|
26
|
+
typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
|
|
27
|
+
typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
|
|
28
|
+
else:
|
|
29
|
+
typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
|
|
12
30
|
|
|
13
31
|
from .._jsii import *
|
|
14
32
|
|
|
@@ -255,34 +273,34 @@ class BuildWorkflow(
|
|
|
255
273
|
self,
|
|
256
274
|
project: _Project_57d89203,
|
|
257
275
|
*,
|
|
258
|
-
artifacts_directory: builtins.str,
|
|
259
276
|
build_task: _Task_9fa875b6,
|
|
277
|
+
artifacts_directory: typing.Optional[builtins.str] = None,
|
|
260
278
|
container_image: typing.Optional[builtins.str] = None,
|
|
261
|
-
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
262
279
|
git_identity: typing.Optional[typing.Union[_GitIdentity_6effc3de, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
263
280
|
mutable_build: typing.Optional[builtins.bool] = None,
|
|
264
|
-
name: typing.Optional[builtins.str] = None,
|
|
265
|
-
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
266
281
|
post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
267
|
-
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
268
282
|
runs_on: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
269
283
|
runs_on_group: typing.Optional[typing.Union[_GroupRunnerOptions_148c59c1, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
284
|
+
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
285
|
+
name: typing.Optional[builtins.str] = None,
|
|
286
|
+
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
287
|
+
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
270
288
|
workflow_triggers: typing.Optional[typing.Union[_Triggers_e9ae7617, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
271
289
|
) -> None:
|
|
272
290
|
'''
|
|
273
291
|
:param project: -
|
|
274
|
-
:param artifacts_directory: (experimental) A name of a directory that includes build artifacts.
|
|
275
292
|
:param build_task: (experimental) The task to execute in order to build the project.
|
|
293
|
+
:param artifacts_directory: (experimental) A name of a directory that includes build artifacts. Default: "dist"
|
|
276
294
|
:param container_image: (experimental) The container image to use for builds. Default: - the default workflow container
|
|
277
|
-
:param
|
|
278
|
-
:param git_identity: (experimental) Git identity to use for the workflow. Default: - default identity
|
|
295
|
+
:param git_identity: (experimental) Git identity to use for the workflow. Default: - default GitHub Actions user
|
|
279
296
|
:param mutable_build: (experimental) Automatically update files modified during builds to pull-request branches. This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged. Implies that PR builds do not have anti-tamper checks. This is enabled by default only if ``githubTokenSecret`` is set. Otherwise it is disabled, which implies that file changes that happen during build will not be pushed back to the branch. Default: true
|
|
280
|
-
:param name: (experimental) Name of the buildfile (e.g. "build" becomes "build.yml"). Default: "build"
|
|
281
|
-
:param permissions: (experimental) Permissions granted to the build job To limit job permissions for ``contents``, the desired permissions have to be explicitly set, e.g.: ``{ contents: JobPermission.NONE }``. Default: ``{ contents: JobPermission.WRITE }``
|
|
282
297
|
:param post_build_steps: (experimental) Steps to execute after build. Default: []
|
|
283
|
-
:param pre_build_steps: (experimental) Steps to execute before the build. Default: []
|
|
284
298
|
:param runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
|
|
285
299
|
:param runs_on_group: (experimental) Github Runner Group selection options.
|
|
300
|
+
:param env: (experimental) Build environment variables. Default: {}
|
|
301
|
+
:param name: (experimental) Name of the buildfile (e.g. "build" becomes "build.yml"). Default: "build"
|
|
302
|
+
:param permissions: (experimental) Permissions granted to the build job To limit job permissions for ``contents``, the desired permissions have to be explicitly set, e.g.: ``{ contents: JobPermission.NONE }``. Default: ``{ contents: JobPermission.WRITE }``
|
|
303
|
+
:param pre_build_steps: (experimental) Steps to execute before the build. Default: []
|
|
286
304
|
:param workflow_triggers: (experimental) Build workflow triggers. Default: "{ pullRequest: {}, workflowDispatch: {} }"
|
|
287
305
|
|
|
288
306
|
:stability: experimental
|
|
@@ -291,18 +309,18 @@ class BuildWorkflow(
|
|
|
291
309
|
type_hints = typing.get_type_hints(_typecheckingstub__f4d192684ec38f19e56855947a401da7aa8d483beaeef832704f28ff43d5ffe5)
|
|
292
310
|
check_type(argname="argument project", value=project, expected_type=type_hints["project"])
|
|
293
311
|
options = BuildWorkflowOptions(
|
|
294
|
-
artifacts_directory=artifacts_directory,
|
|
295
312
|
build_task=build_task,
|
|
313
|
+
artifacts_directory=artifacts_directory,
|
|
296
314
|
container_image=container_image,
|
|
297
|
-
env=env,
|
|
298
315
|
git_identity=git_identity,
|
|
299
316
|
mutable_build=mutable_build,
|
|
300
|
-
name=name,
|
|
301
|
-
permissions=permissions,
|
|
302
317
|
post_build_steps=post_build_steps,
|
|
303
|
-
pre_build_steps=pre_build_steps,
|
|
304
318
|
runs_on=runs_on,
|
|
305
319
|
runs_on_group=runs_on_group,
|
|
320
|
+
env=env,
|
|
321
|
+
name=name,
|
|
322
|
+
permissions=permissions,
|
|
323
|
+
pre_build_steps=pre_build_steps,
|
|
306
324
|
workflow_triggers=workflow_triggers,
|
|
307
325
|
)
|
|
308
326
|
|
|
@@ -484,120 +502,295 @@ class BuildWorkflow(
|
|
|
484
502
|
'''
|
|
485
503
|
return typing.cast(typing.List[builtins.str], jsii.get(self, "buildJobIds"))
|
|
486
504
|
|
|
505
|
+
@builtins.property
|
|
506
|
+
@jsii.member(jsii_name="name")
|
|
507
|
+
def name(self) -> builtins.str:
|
|
508
|
+
'''(experimental) Name of generated github workflow.
|
|
509
|
+
|
|
510
|
+
:stability: experimental
|
|
511
|
+
'''
|
|
512
|
+
return typing.cast(builtins.str, jsii.get(self, "name"))
|
|
513
|
+
|
|
487
514
|
|
|
488
515
|
@jsii.data_type(
|
|
489
|
-
jsii_type="projen.build.
|
|
516
|
+
jsii_type="projen.build.BuildWorkflowCommonOptions",
|
|
490
517
|
jsii_struct_bases=[],
|
|
491
518
|
name_mapping={
|
|
492
|
-
"
|
|
519
|
+
"env": "env",
|
|
520
|
+
"name": "name",
|
|
521
|
+
"permissions": "permissions",
|
|
522
|
+
"pre_build_steps": "preBuildSteps",
|
|
523
|
+
"workflow_triggers": "workflowTriggers",
|
|
524
|
+
},
|
|
525
|
+
)
|
|
526
|
+
class BuildWorkflowCommonOptions:
|
|
527
|
+
def __init__(
|
|
528
|
+
self,
|
|
529
|
+
*,
|
|
530
|
+
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
531
|
+
name: typing.Optional[builtins.str] = None,
|
|
532
|
+
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
533
|
+
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
534
|
+
workflow_triggers: typing.Optional[typing.Union[_Triggers_e9ae7617, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
535
|
+
) -> None:
|
|
536
|
+
'''
|
|
537
|
+
:param env: (experimental) Build environment variables. Default: {}
|
|
538
|
+
:param name: (experimental) Name of the buildfile (e.g. "build" becomes "build.yml"). Default: "build"
|
|
539
|
+
:param permissions: (experimental) Permissions granted to the build job To limit job permissions for ``contents``, the desired permissions have to be explicitly set, e.g.: ``{ contents: JobPermission.NONE }``. Default: ``{ contents: JobPermission.WRITE }``
|
|
540
|
+
:param pre_build_steps: (experimental) Steps to execute before the build. Default: []
|
|
541
|
+
:param workflow_triggers: (experimental) Build workflow triggers. Default: "{ pullRequest: {}, workflowDispatch: {} }"
|
|
542
|
+
|
|
543
|
+
:stability: experimental
|
|
544
|
+
'''
|
|
545
|
+
if isinstance(permissions, dict):
|
|
546
|
+
permissions = _JobPermissions_3b5b53dc(**permissions)
|
|
547
|
+
if isinstance(workflow_triggers, dict):
|
|
548
|
+
workflow_triggers = _Triggers_e9ae7617(**workflow_triggers)
|
|
549
|
+
if __debug__:
|
|
550
|
+
type_hints = typing.get_type_hints(_typecheckingstub__c47ecd67d7b1fa42db0bfe937571471191786b92fd702c85fceb89eb2d1b05c5)
|
|
551
|
+
check_type(argname="argument env", value=env, expected_type=type_hints["env"])
|
|
552
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
553
|
+
check_type(argname="argument permissions", value=permissions, expected_type=type_hints["permissions"])
|
|
554
|
+
check_type(argname="argument pre_build_steps", value=pre_build_steps, expected_type=type_hints["pre_build_steps"])
|
|
555
|
+
check_type(argname="argument workflow_triggers", value=workflow_triggers, expected_type=type_hints["workflow_triggers"])
|
|
556
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
557
|
+
if env is not None:
|
|
558
|
+
self._values["env"] = env
|
|
559
|
+
if name is not None:
|
|
560
|
+
self._values["name"] = name
|
|
561
|
+
if permissions is not None:
|
|
562
|
+
self._values["permissions"] = permissions
|
|
563
|
+
if pre_build_steps is not None:
|
|
564
|
+
self._values["pre_build_steps"] = pre_build_steps
|
|
565
|
+
if workflow_triggers is not None:
|
|
566
|
+
self._values["workflow_triggers"] = workflow_triggers
|
|
567
|
+
|
|
568
|
+
@builtins.property
|
|
569
|
+
def env(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
570
|
+
'''(experimental) Build environment variables.
|
|
571
|
+
|
|
572
|
+
:default: {}
|
|
573
|
+
|
|
574
|
+
:stability: experimental
|
|
575
|
+
'''
|
|
576
|
+
result = self._values.get("env")
|
|
577
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
578
|
+
|
|
579
|
+
@builtins.property
|
|
580
|
+
def name(self) -> typing.Optional[builtins.str]:
|
|
581
|
+
'''(experimental) Name of the buildfile (e.g. "build" becomes "build.yml").
|
|
582
|
+
|
|
583
|
+
:default: "build"
|
|
584
|
+
|
|
585
|
+
:stability: experimental
|
|
586
|
+
'''
|
|
587
|
+
result = self._values.get("name")
|
|
588
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
589
|
+
|
|
590
|
+
@builtins.property
|
|
591
|
+
def permissions(self) -> typing.Optional[_JobPermissions_3b5b53dc]:
|
|
592
|
+
'''(experimental) Permissions granted to the build job To limit job permissions for ``contents``, the desired permissions have to be explicitly set, e.g.: ``{ contents: JobPermission.NONE }``.
|
|
593
|
+
|
|
594
|
+
:default: ``{ contents: JobPermission.WRITE }``
|
|
595
|
+
|
|
596
|
+
:stability: experimental
|
|
597
|
+
'''
|
|
598
|
+
result = self._values.get("permissions")
|
|
599
|
+
return typing.cast(typing.Optional[_JobPermissions_3b5b53dc], result)
|
|
600
|
+
|
|
601
|
+
@builtins.property
|
|
602
|
+
def pre_build_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
|
|
603
|
+
'''(experimental) Steps to execute before the build.
|
|
604
|
+
|
|
605
|
+
:default: []
|
|
606
|
+
|
|
607
|
+
:stability: experimental
|
|
608
|
+
'''
|
|
609
|
+
result = self._values.get("pre_build_steps")
|
|
610
|
+
return typing.cast(typing.Optional[typing.List[_JobStep_c3287c05]], result)
|
|
611
|
+
|
|
612
|
+
@builtins.property
|
|
613
|
+
def workflow_triggers(self) -> typing.Optional[_Triggers_e9ae7617]:
|
|
614
|
+
'''(experimental) Build workflow triggers.
|
|
615
|
+
|
|
616
|
+
:default: "{ pullRequest: {}, workflowDispatch: {} }"
|
|
617
|
+
|
|
618
|
+
:stability: experimental
|
|
619
|
+
'''
|
|
620
|
+
result = self._values.get("workflow_triggers")
|
|
621
|
+
return typing.cast(typing.Optional[_Triggers_e9ae7617], result)
|
|
622
|
+
|
|
623
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
624
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
625
|
+
|
|
626
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
627
|
+
return not (rhs == self)
|
|
628
|
+
|
|
629
|
+
def __repr__(self) -> str:
|
|
630
|
+
return "BuildWorkflowCommonOptions(%s)" % ", ".join(
|
|
631
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
632
|
+
)
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
@jsii.data_type(
|
|
636
|
+
jsii_type="projen.build.BuildWorkflowOptions",
|
|
637
|
+
jsii_struct_bases=[BuildWorkflowCommonOptions],
|
|
638
|
+
name_mapping={
|
|
639
|
+
"env": "env",
|
|
640
|
+
"name": "name",
|
|
641
|
+
"permissions": "permissions",
|
|
642
|
+
"pre_build_steps": "preBuildSteps",
|
|
643
|
+
"workflow_triggers": "workflowTriggers",
|
|
493
644
|
"build_task": "buildTask",
|
|
645
|
+
"artifacts_directory": "artifactsDirectory",
|
|
494
646
|
"container_image": "containerImage",
|
|
495
|
-
"env": "env",
|
|
496
647
|
"git_identity": "gitIdentity",
|
|
497
648
|
"mutable_build": "mutableBuild",
|
|
498
|
-
"name": "name",
|
|
499
|
-
"permissions": "permissions",
|
|
500
649
|
"post_build_steps": "postBuildSteps",
|
|
501
|
-
"pre_build_steps": "preBuildSteps",
|
|
502
650
|
"runs_on": "runsOn",
|
|
503
651
|
"runs_on_group": "runsOnGroup",
|
|
504
|
-
"workflow_triggers": "workflowTriggers",
|
|
505
652
|
},
|
|
506
653
|
)
|
|
507
|
-
class BuildWorkflowOptions:
|
|
654
|
+
class BuildWorkflowOptions(BuildWorkflowCommonOptions):
|
|
508
655
|
def __init__(
|
|
509
656
|
self,
|
|
510
657
|
*,
|
|
511
|
-
|
|
658
|
+
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
659
|
+
name: typing.Optional[builtins.str] = None,
|
|
660
|
+
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
661
|
+
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
662
|
+
workflow_triggers: typing.Optional[typing.Union[_Triggers_e9ae7617, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
512
663
|
build_task: _Task_9fa875b6,
|
|
664
|
+
artifacts_directory: typing.Optional[builtins.str] = None,
|
|
513
665
|
container_image: typing.Optional[builtins.str] = None,
|
|
514
|
-
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
515
666
|
git_identity: typing.Optional[typing.Union[_GitIdentity_6effc3de, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
516
667
|
mutable_build: typing.Optional[builtins.bool] = None,
|
|
517
|
-
name: typing.Optional[builtins.str] = None,
|
|
518
|
-
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
519
668
|
post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
520
|
-
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
521
669
|
runs_on: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
522
670
|
runs_on_group: typing.Optional[typing.Union[_GroupRunnerOptions_148c59c1, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
523
|
-
workflow_triggers: typing.Optional[typing.Union[_Triggers_e9ae7617, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
524
671
|
) -> None:
|
|
525
672
|
'''
|
|
526
|
-
:param artifacts_directory: (experimental) A name of a directory that includes build artifacts.
|
|
527
|
-
:param build_task: (experimental) The task to execute in order to build the project.
|
|
528
|
-
:param container_image: (experimental) The container image to use for builds. Default: - the default workflow container
|
|
529
673
|
:param env: (experimental) Build environment variables. Default: {}
|
|
530
|
-
:param git_identity: (experimental) Git identity to use for the workflow. Default: - default identity
|
|
531
|
-
:param mutable_build: (experimental) Automatically update files modified during builds to pull-request branches. This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged. Implies that PR builds do not have anti-tamper checks. This is enabled by default only if ``githubTokenSecret`` is set. Otherwise it is disabled, which implies that file changes that happen during build will not be pushed back to the branch. Default: true
|
|
532
674
|
:param name: (experimental) Name of the buildfile (e.g. "build" becomes "build.yml"). Default: "build"
|
|
533
675
|
:param permissions: (experimental) Permissions granted to the build job To limit job permissions for ``contents``, the desired permissions have to be explicitly set, e.g.: ``{ contents: JobPermission.NONE }``. Default: ``{ contents: JobPermission.WRITE }``
|
|
534
|
-
:param post_build_steps: (experimental) Steps to execute after build. Default: []
|
|
535
676
|
:param pre_build_steps: (experimental) Steps to execute before the build. Default: []
|
|
677
|
+
:param workflow_triggers: (experimental) Build workflow triggers. Default: "{ pullRequest: {}, workflowDispatch: {} }"
|
|
678
|
+
:param build_task: (experimental) The task to execute in order to build the project.
|
|
679
|
+
:param artifacts_directory: (experimental) A name of a directory that includes build artifacts. Default: "dist"
|
|
680
|
+
:param container_image: (experimental) The container image to use for builds. Default: - the default workflow container
|
|
681
|
+
:param git_identity: (experimental) Git identity to use for the workflow. Default: - default GitHub Actions user
|
|
682
|
+
:param mutable_build: (experimental) Automatically update files modified during builds to pull-request branches. This means that any files synthesized by projen or e.g. test snapshots will always be up-to-date before a PR is merged. Implies that PR builds do not have anti-tamper checks. This is enabled by default only if ``githubTokenSecret`` is set. Otherwise it is disabled, which implies that file changes that happen during build will not be pushed back to the branch. Default: true
|
|
683
|
+
:param post_build_steps: (experimental) Steps to execute after build. Default: []
|
|
536
684
|
:param runs_on: (experimental) Github Runner selection labels. Default: ["ubuntu-latest"]
|
|
537
685
|
:param runs_on_group: (experimental) Github Runner Group selection options.
|
|
538
|
-
:param workflow_triggers: (experimental) Build workflow triggers. Default: "{ pullRequest: {}, workflowDispatch: {} }"
|
|
539
686
|
|
|
540
687
|
:stability: experimental
|
|
541
688
|
'''
|
|
542
|
-
if isinstance(git_identity, dict):
|
|
543
|
-
git_identity = _GitIdentity_6effc3de(**git_identity)
|
|
544
689
|
if isinstance(permissions, dict):
|
|
545
690
|
permissions = _JobPermissions_3b5b53dc(**permissions)
|
|
546
|
-
if isinstance(runs_on_group, dict):
|
|
547
|
-
runs_on_group = _GroupRunnerOptions_148c59c1(**runs_on_group)
|
|
548
691
|
if isinstance(workflow_triggers, dict):
|
|
549
692
|
workflow_triggers = _Triggers_e9ae7617(**workflow_triggers)
|
|
693
|
+
if isinstance(git_identity, dict):
|
|
694
|
+
git_identity = _GitIdentity_6effc3de(**git_identity)
|
|
695
|
+
if isinstance(runs_on_group, dict):
|
|
696
|
+
runs_on_group = _GroupRunnerOptions_148c59c1(**runs_on_group)
|
|
550
697
|
if __debug__:
|
|
551
698
|
type_hints = typing.get_type_hints(_typecheckingstub__9d08c9df51ed0147527f9d30b5f0f37c5e4482b10a1ea4f55a14885626d0721e)
|
|
552
|
-
check_type(argname="argument
|
|
699
|
+
check_type(argname="argument env", value=env, expected_type=type_hints["env"])
|
|
700
|
+
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
701
|
+
check_type(argname="argument permissions", value=permissions, expected_type=type_hints["permissions"])
|
|
702
|
+
check_type(argname="argument pre_build_steps", value=pre_build_steps, expected_type=type_hints["pre_build_steps"])
|
|
703
|
+
check_type(argname="argument workflow_triggers", value=workflow_triggers, expected_type=type_hints["workflow_triggers"])
|
|
553
704
|
check_type(argname="argument build_task", value=build_task, expected_type=type_hints["build_task"])
|
|
705
|
+
check_type(argname="argument artifacts_directory", value=artifacts_directory, expected_type=type_hints["artifacts_directory"])
|
|
554
706
|
check_type(argname="argument container_image", value=container_image, expected_type=type_hints["container_image"])
|
|
555
|
-
check_type(argname="argument env", value=env, expected_type=type_hints["env"])
|
|
556
707
|
check_type(argname="argument git_identity", value=git_identity, expected_type=type_hints["git_identity"])
|
|
557
708
|
check_type(argname="argument mutable_build", value=mutable_build, expected_type=type_hints["mutable_build"])
|
|
558
|
-
check_type(argname="argument name", value=name, expected_type=type_hints["name"])
|
|
559
|
-
check_type(argname="argument permissions", value=permissions, expected_type=type_hints["permissions"])
|
|
560
709
|
check_type(argname="argument post_build_steps", value=post_build_steps, expected_type=type_hints["post_build_steps"])
|
|
561
|
-
check_type(argname="argument pre_build_steps", value=pre_build_steps, expected_type=type_hints["pre_build_steps"])
|
|
562
710
|
check_type(argname="argument runs_on", value=runs_on, expected_type=type_hints["runs_on"])
|
|
563
711
|
check_type(argname="argument runs_on_group", value=runs_on_group, expected_type=type_hints["runs_on_group"])
|
|
564
|
-
check_type(argname="argument workflow_triggers", value=workflow_triggers, expected_type=type_hints["workflow_triggers"])
|
|
565
712
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
566
|
-
"artifacts_directory": artifacts_directory,
|
|
567
713
|
"build_task": build_task,
|
|
568
714
|
}
|
|
569
|
-
if container_image is not None:
|
|
570
|
-
self._values["container_image"] = container_image
|
|
571
715
|
if env is not None:
|
|
572
716
|
self._values["env"] = env
|
|
573
|
-
if git_identity is not None:
|
|
574
|
-
self._values["git_identity"] = git_identity
|
|
575
|
-
if mutable_build is not None:
|
|
576
|
-
self._values["mutable_build"] = mutable_build
|
|
577
717
|
if name is not None:
|
|
578
718
|
self._values["name"] = name
|
|
579
719
|
if permissions is not None:
|
|
580
720
|
self._values["permissions"] = permissions
|
|
581
|
-
if post_build_steps is not None:
|
|
582
|
-
self._values["post_build_steps"] = post_build_steps
|
|
583
721
|
if pre_build_steps is not None:
|
|
584
722
|
self._values["pre_build_steps"] = pre_build_steps
|
|
723
|
+
if workflow_triggers is not None:
|
|
724
|
+
self._values["workflow_triggers"] = workflow_triggers
|
|
725
|
+
if artifacts_directory is not None:
|
|
726
|
+
self._values["artifacts_directory"] = artifacts_directory
|
|
727
|
+
if container_image is not None:
|
|
728
|
+
self._values["container_image"] = container_image
|
|
729
|
+
if git_identity is not None:
|
|
730
|
+
self._values["git_identity"] = git_identity
|
|
731
|
+
if mutable_build is not None:
|
|
732
|
+
self._values["mutable_build"] = mutable_build
|
|
733
|
+
if post_build_steps is not None:
|
|
734
|
+
self._values["post_build_steps"] = post_build_steps
|
|
585
735
|
if runs_on is not None:
|
|
586
736
|
self._values["runs_on"] = runs_on
|
|
587
737
|
if runs_on_group is not None:
|
|
588
738
|
self._values["runs_on_group"] = runs_on_group
|
|
589
|
-
if workflow_triggers is not None:
|
|
590
|
-
self._values["workflow_triggers"] = workflow_triggers
|
|
591
739
|
|
|
592
740
|
@builtins.property
|
|
593
|
-
def
|
|
594
|
-
'''(experimental)
|
|
741
|
+
def env(self) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
|
|
742
|
+
'''(experimental) Build environment variables.
|
|
743
|
+
|
|
744
|
+
:default: {}
|
|
595
745
|
|
|
596
746
|
:stability: experimental
|
|
597
747
|
'''
|
|
598
|
-
result = self._values.get("
|
|
599
|
-
|
|
600
|
-
|
|
748
|
+
result = self._values.get("env")
|
|
749
|
+
return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
|
|
750
|
+
|
|
751
|
+
@builtins.property
|
|
752
|
+
def name(self) -> typing.Optional[builtins.str]:
|
|
753
|
+
'''(experimental) Name of the buildfile (e.g. "build" becomes "build.yml").
|
|
754
|
+
|
|
755
|
+
:default: "build"
|
|
756
|
+
|
|
757
|
+
:stability: experimental
|
|
758
|
+
'''
|
|
759
|
+
result = self._values.get("name")
|
|
760
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
761
|
+
|
|
762
|
+
@builtins.property
|
|
763
|
+
def permissions(self) -> typing.Optional[_JobPermissions_3b5b53dc]:
|
|
764
|
+
'''(experimental) Permissions granted to the build job To limit job permissions for ``contents``, the desired permissions have to be explicitly set, e.g.: ``{ contents: JobPermission.NONE }``.
|
|
765
|
+
|
|
766
|
+
:default: ``{ contents: JobPermission.WRITE }``
|
|
767
|
+
|
|
768
|
+
:stability: experimental
|
|
769
|
+
'''
|
|
770
|
+
result = self._values.get("permissions")
|
|
771
|
+
return typing.cast(typing.Optional[_JobPermissions_3b5b53dc], result)
|
|
772
|
+
|
|
773
|
+
@builtins.property
|
|
774
|
+
def pre_build_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
|
|
775
|
+
'''(experimental) Steps to execute before the build.
|
|
776
|
+
|
|
777
|
+
:default: []
|
|
778
|
+
|
|
779
|
+
:stability: experimental
|
|
780
|
+
'''
|
|
781
|
+
result = self._values.get("pre_build_steps")
|
|
782
|
+
return typing.cast(typing.Optional[typing.List[_JobStep_c3287c05]], result)
|
|
783
|
+
|
|
784
|
+
@builtins.property
|
|
785
|
+
def workflow_triggers(self) -> typing.Optional[_Triggers_e9ae7617]:
|
|
786
|
+
'''(experimental) Build workflow triggers.
|
|
787
|
+
|
|
788
|
+
:default: "{ pullRequest: {}, workflowDispatch: {} }"
|
|
789
|
+
|
|
790
|
+
:stability: experimental
|
|
791
|
+
'''
|
|
792
|
+
result = self._values.get("workflow_triggers")
|
|
793
|
+
return typing.cast(typing.Optional[_Triggers_e9ae7617], result)
|
|
601
794
|
|
|
602
795
|
@builtins.property
|
|
603
796
|
def build_task(self) -> _Task_9fa875b6:
|
|
@@ -610,32 +803,32 @@ class BuildWorkflowOptions:
|
|
|
610
803
|
return typing.cast(_Task_9fa875b6, result)
|
|
611
804
|
|
|
612
805
|
@builtins.property
|
|
613
|
-
def
|
|
614
|
-
'''(experimental)
|
|
806
|
+
def artifacts_directory(self) -> typing.Optional[builtins.str]:
|
|
807
|
+
'''(experimental) A name of a directory that includes build artifacts.
|
|
615
808
|
|
|
616
|
-
:default:
|
|
809
|
+
:default: "dist"
|
|
617
810
|
|
|
618
811
|
:stability: experimental
|
|
619
812
|
'''
|
|
620
|
-
result = self._values.get("
|
|
813
|
+
result = self._values.get("artifacts_directory")
|
|
621
814
|
return typing.cast(typing.Optional[builtins.str], result)
|
|
622
815
|
|
|
623
816
|
@builtins.property
|
|
624
|
-
def
|
|
625
|
-
'''(experimental)
|
|
817
|
+
def container_image(self) -> typing.Optional[builtins.str]:
|
|
818
|
+
'''(experimental) The container image to use for builds.
|
|
626
819
|
|
|
627
|
-
:default:
|
|
820
|
+
:default: - the default workflow container
|
|
628
821
|
|
|
629
822
|
:stability: experimental
|
|
630
823
|
'''
|
|
631
|
-
result = self._values.get("
|
|
632
|
-
return typing.cast(typing.Optional[
|
|
824
|
+
result = self._values.get("container_image")
|
|
825
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
633
826
|
|
|
634
827
|
@builtins.property
|
|
635
828
|
def git_identity(self) -> typing.Optional[_GitIdentity_6effc3de]:
|
|
636
829
|
'''(experimental) Git identity to use for the workflow.
|
|
637
830
|
|
|
638
|
-
:default: - default
|
|
831
|
+
:default: - default GitHub Actions user
|
|
639
832
|
|
|
640
833
|
:stability: experimental
|
|
641
834
|
'''
|
|
@@ -662,28 +855,6 @@ class BuildWorkflowOptions:
|
|
|
662
855
|
result = self._values.get("mutable_build")
|
|
663
856
|
return typing.cast(typing.Optional[builtins.bool], result)
|
|
664
857
|
|
|
665
|
-
@builtins.property
|
|
666
|
-
def name(self) -> typing.Optional[builtins.str]:
|
|
667
|
-
'''(experimental) Name of the buildfile (e.g. "build" becomes "build.yml").
|
|
668
|
-
|
|
669
|
-
:default: "build"
|
|
670
|
-
|
|
671
|
-
:stability: experimental
|
|
672
|
-
'''
|
|
673
|
-
result = self._values.get("name")
|
|
674
|
-
return typing.cast(typing.Optional[builtins.str], result)
|
|
675
|
-
|
|
676
|
-
@builtins.property
|
|
677
|
-
def permissions(self) -> typing.Optional[_JobPermissions_3b5b53dc]:
|
|
678
|
-
'''(experimental) Permissions granted to the build job To limit job permissions for ``contents``, the desired permissions have to be explicitly set, e.g.: ``{ contents: JobPermission.NONE }``.
|
|
679
|
-
|
|
680
|
-
:default: ``{ contents: JobPermission.WRITE }``
|
|
681
|
-
|
|
682
|
-
:stability: experimental
|
|
683
|
-
'''
|
|
684
|
-
result = self._values.get("permissions")
|
|
685
|
-
return typing.cast(typing.Optional[_JobPermissions_3b5b53dc], result)
|
|
686
|
-
|
|
687
858
|
@builtins.property
|
|
688
859
|
def post_build_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
|
|
689
860
|
'''(experimental) Steps to execute after build.
|
|
@@ -695,17 +866,6 @@ class BuildWorkflowOptions:
|
|
|
695
866
|
result = self._values.get("post_build_steps")
|
|
696
867
|
return typing.cast(typing.Optional[typing.List[_JobStep_c3287c05]], result)
|
|
697
868
|
|
|
698
|
-
@builtins.property
|
|
699
|
-
def pre_build_steps(self) -> typing.Optional[typing.List[_JobStep_c3287c05]]:
|
|
700
|
-
'''(experimental) Steps to execute before the build.
|
|
701
|
-
|
|
702
|
-
:default: []
|
|
703
|
-
|
|
704
|
-
:stability: experimental
|
|
705
|
-
'''
|
|
706
|
-
result = self._values.get("pre_build_steps")
|
|
707
|
-
return typing.cast(typing.Optional[typing.List[_JobStep_c3287c05]], result)
|
|
708
|
-
|
|
709
869
|
@builtins.property
|
|
710
870
|
def runs_on(self) -> typing.Optional[typing.List[builtins.str]]:
|
|
711
871
|
'''(experimental) Github Runner selection labels.
|
|
@@ -730,17 +890,6 @@ class BuildWorkflowOptions:
|
|
|
730
890
|
result = self._values.get("runs_on_group")
|
|
731
891
|
return typing.cast(typing.Optional[_GroupRunnerOptions_148c59c1], result)
|
|
732
892
|
|
|
733
|
-
@builtins.property
|
|
734
|
-
def workflow_triggers(self) -> typing.Optional[_Triggers_e9ae7617]:
|
|
735
|
-
'''(experimental) Build workflow triggers.
|
|
736
|
-
|
|
737
|
-
:default: "{ pullRequest: {}, workflowDispatch: {} }"
|
|
738
|
-
|
|
739
|
-
:stability: experimental
|
|
740
|
-
'''
|
|
741
|
-
result = self._values.get("workflow_triggers")
|
|
742
|
-
return typing.cast(typing.Optional[_Triggers_e9ae7617], result)
|
|
743
|
-
|
|
744
893
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
745
894
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
746
895
|
|
|
@@ -757,6 +906,7 @@ __all__ = [
|
|
|
757
906
|
"AddPostBuildJobCommandsOptions",
|
|
758
907
|
"AddPostBuildJobTaskOptions",
|
|
759
908
|
"BuildWorkflow",
|
|
909
|
+
"BuildWorkflowCommonOptions",
|
|
760
910
|
"BuildWorkflowOptions",
|
|
761
911
|
]
|
|
762
912
|
|
|
@@ -785,18 +935,18 @@ def _typecheckingstub__8875bca09077fb03ccffe7b968539b2dfce687a745e71024f884a06b5
|
|
|
785
935
|
def _typecheckingstub__f4d192684ec38f19e56855947a401da7aa8d483beaeef832704f28ff43d5ffe5(
|
|
786
936
|
project: _Project_57d89203,
|
|
787
937
|
*,
|
|
788
|
-
artifacts_directory: builtins.str,
|
|
789
938
|
build_task: _Task_9fa875b6,
|
|
939
|
+
artifacts_directory: typing.Optional[builtins.str] = None,
|
|
790
940
|
container_image: typing.Optional[builtins.str] = None,
|
|
791
|
-
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
792
941
|
git_identity: typing.Optional[typing.Union[_GitIdentity_6effc3de, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
793
942
|
mutable_build: typing.Optional[builtins.bool] = None,
|
|
794
|
-
name: typing.Optional[builtins.str] = None,
|
|
795
|
-
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
796
943
|
post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
797
|
-
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
798
944
|
runs_on: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
799
945
|
runs_on_group: typing.Optional[typing.Union[_GroupRunnerOptions_148c59c1, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
946
|
+
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
947
|
+
name: typing.Optional[builtins.str] = None,
|
|
948
|
+
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
949
|
+
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
800
950
|
workflow_triggers: typing.Optional[typing.Union[_Triggers_e9ae7617, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
801
951
|
) -> None:
|
|
802
952
|
"""Type checking stubs"""
|
|
@@ -856,21 +1006,32 @@ def _typecheckingstub__43bc47daca0c138fa9c8bc13154f9acea9c452e82f2dc45b3f3a655c6
|
|
|
856
1006
|
"""Type checking stubs"""
|
|
857
1007
|
pass
|
|
858
1008
|
|
|
1009
|
+
def _typecheckingstub__c47ecd67d7b1fa42db0bfe937571471191786b92fd702c85fceb89eb2d1b05c5(
|
|
1010
|
+
*,
|
|
1011
|
+
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
1012
|
+
name: typing.Optional[builtins.str] = None,
|
|
1013
|
+
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1014
|
+
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1015
|
+
workflow_triggers: typing.Optional[typing.Union[_Triggers_e9ae7617, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1016
|
+
) -> None:
|
|
1017
|
+
"""Type checking stubs"""
|
|
1018
|
+
pass
|
|
1019
|
+
|
|
859
1020
|
def _typecheckingstub__9d08c9df51ed0147527f9d30b5f0f37c5e4482b10a1ea4f55a14885626d0721e(
|
|
860
1021
|
*,
|
|
861
|
-
|
|
1022
|
+
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
1023
|
+
name: typing.Optional[builtins.str] = None,
|
|
1024
|
+
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
1025
|
+
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
1026
|
+
workflow_triggers: typing.Optional[typing.Union[_Triggers_e9ae7617, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
862
1027
|
build_task: _Task_9fa875b6,
|
|
1028
|
+
artifacts_directory: typing.Optional[builtins.str] = None,
|
|
863
1029
|
container_image: typing.Optional[builtins.str] = None,
|
|
864
|
-
env: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
|
|
865
1030
|
git_identity: typing.Optional[typing.Union[_GitIdentity_6effc3de, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
866
1031
|
mutable_build: typing.Optional[builtins.bool] = None,
|
|
867
|
-
name: typing.Optional[builtins.str] = None,
|
|
868
|
-
permissions: typing.Optional[typing.Union[_JobPermissions_3b5b53dc, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
869
1032
|
post_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
870
|
-
pre_build_steps: typing.Optional[typing.Sequence[typing.Union[_JobStep_c3287c05, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
871
1033
|
runs_on: typing.Optional[typing.Sequence[builtins.str]] = None,
|
|
872
1034
|
runs_on_group: typing.Optional[typing.Union[_GroupRunnerOptions_148c59c1, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
873
|
-
workflow_triggers: typing.Optional[typing.Union[_Triggers_e9ae7617, typing.Dict[builtins.str, typing.Any]]] = None,
|
|
874
1035
|
) -> None:
|
|
875
1036
|
"""Type checking stubs"""
|
|
876
1037
|
pass
|