Skip to content

Commit c989ff4

Browse files
committed
Added default run-tests entry in adfconfig
1 parent 864bac9 commit c989ff4

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

src/lambda_codebase/initial_commit/adfconfig.yml.j2

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ config:
3737
allow-empty-target: disabled
3838
# ^ Needs to be set to "enabled" to activate. Defaults to "disabled" when
3939
# not set.
40+
41+
# Tells whether or not run tests during the bootstrap pipeline,
42+
# Needs to be set to "enabled" to activate. Defaults to "disabled" when not set
43+
run-tests: disabled
44+
4045
# Optional config for multi-organization deployments of ADF:
4146
# org:
4247
# # Optional: Use this variable to define the AWS Organization in case of

src/template.yml

+4-13
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,6 @@ Parameters:
111111
- ERROR
112112
- CRITICAL
113113

114-
PerformTests:
115-
Description: >-
116-
Should ADF perform tox tests during bootstrap?
117-
Valid options are: true, false
118-
Type: String
119-
Default: "false"
120-
AllowedValues:
121-
- "true"
122-
- "false"
123-
124114
AllowBootstrappingOfManagementAccount:
125115
Description: >-
126116
Would ADF need to bootstrap the Management Account of your AWS
@@ -1659,8 +1649,6 @@ Resources:
16591649
Value: !Ref DeploymentAccountMainRegion
16601650
- Name: ACCOUNT_BOOTSTRAPPING_STATE_MACHINE_ARN
16611651
Value: !Ref AccountBootstrappingStateMachine
1662-
- Name: ADF_PERFORM_TESTS
1663-
Value: !Ref PerformTests
16641652
Type: LINUX_CONTAINER
16651653
Name: "adf-bootstrap-pipeline-build"
16661654
ServiceRole: !GetAtt BootstrapCodeBuildRole.Arn
@@ -1673,6 +1661,8 @@ Resources:
16731661
python: 3.12
16741662
pre_build:
16751663
commands:
1664+
- pip install yq --root-user-action ignore --quiet
1665+
- ADF_PERFORM_TESTS=`cat adfconfig.yml | yq -r '.config."run-tests" // "disabled"'`
16761666
- >-
16771667
pip install
16781668
-r adf-build/requirements.txt
@@ -1681,7 +1671,8 @@ Resources:
16811671
--root-user-action ignore
16821672
--quiet
16831673
- |
1684-
if [ "$ADF_PERFORM_TESTS" = "true" ] ; then
1674+
if [ "$ADF_PERFORM_TESTS" = "enabled" ] ; then
1675+
echo "Performing tests"
16851676
pip install \
16861677
-r requirements-dev.txt \
16871678
-r adf-build/requirements-dev.txt \

0 commit comments

Comments
 (0)