dbt-platform-helper 10.5.0__tar.gz → 10.6.1__tar.gz
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.
Potentially problematic release.
This version of dbt-platform-helper might be problematic. Click here for more details.
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/PKG-INFO +1 -1
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/codebase.py +34 -22
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/conduit.py +3 -2
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/default-extensions.yml +7 -0
- dbt_platform_helper-10.6.1/dbt_platform_helper/templates/.copilot/phases/pre_build.sh +23 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/environments/main.tf +9 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/buildspec.deploy.yml +1 -1
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/stack.ts +2 -1
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/svc/manifest-backend.yml +0 -10
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/svc/manifest-public.yml +0 -10
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/files.py +1 -1
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/versioning.py +11 -5
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/pyproject.toml +1 -1
- dbt_platform_helper-10.5.0/dbt_platform_helper/templates/.copilot/phases/pre_build.sh +0 -6
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/LICENSE +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/COMMANDS.md +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/README.md +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/__init__.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/addon-plans.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/addons-template-map.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/__init__.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/application.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/check_cloudformation.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/config.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/copilot.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/database.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/dns.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/environment.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/generate.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/notify.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/pipeline.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/secrets.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/constants.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/custom_resources/__init__.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/custom_resources/s3_object.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/exceptions.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/jinja2_tags.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/.copilot/config.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/.copilot/image_build_run.sh +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/.copilot/phases/build.sh +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/.copilot/phases/install.sh +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/.copilot/phases/post_build.sh +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/COMMANDS.md.jinja +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addon-instructions.txt +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/README.md +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/env/addons.parameters.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/env/aurora-postgres.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/env/monitoring.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/env/opensearch.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/env/rds-postgres.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/env/redis-cluster.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/env/s3.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/env/vpc.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/svc/appconfig-ipfilter.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/svc/prometheus-policy.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/svc/s3-policy.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/addons/svc/subscription-filter.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/ci-codebuild-role-policy.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/create-codebuild-role.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/custom-codebuild-role-policy.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/manifest.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/.gitignore +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/README.md +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/bin/override.ts +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/cdk.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/log_resource_policy.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/package-lock.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/package.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/stack.ts +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/overrides/tsconfig.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/env/terraform-overrides/cfn.patches.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/manifest.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/.gitignore +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/bin/override.ts +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/buildspec.image.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/cdk.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/package-lock.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/package.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/tsconfig.json +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/codebase/overrides/types.ts +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/environments/buildspec.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/environments/manifest.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/pipelines/environments/overrides/cfn.patches.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/svc/maintenance_pages/default.html +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/svc/maintenance_pages/dmas-migration.html +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/svc/maintenance_pages/migration.html +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/templates/svc/overrides/cfn.patches.yml +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/__init__.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/application.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/arn_parser.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/aws.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/click.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/cloudformation.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/cloudfoundry.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/git.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/manifests.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/messages.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/template.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/validation.py +0 -0
- {dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/platform_helper.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dbt-platform-helper
|
|
3
|
-
Version: 10.
|
|
3
|
+
Version: 10.6.1
|
|
4
4
|
Summary: Set of tools to help transfer applications/services from GOV.UK PaaS to DBT PaaS augmenting AWS Copilot.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Department for Business and Trade Platform Team
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/codebase.py
RENAMED
|
@@ -86,6 +86,38 @@ def prepare():
|
|
|
86
86
|
click.echo(mkfile(Path("./.copilot"), f"phases/{phase}.sh", phase_contents, overwrite=True))
|
|
87
87
|
|
|
88
88
|
|
|
89
|
+
def list_latest_images(ecr_client, ecr_repository_name, codebase_repository):
|
|
90
|
+
paginator = ecr_client.get_paginator("describe_images")
|
|
91
|
+
describe_images_response_iterator = paginator.paginate(
|
|
92
|
+
repositoryName=ecr_repository_name,
|
|
93
|
+
filter={"tagStatus": "TAGGED"},
|
|
94
|
+
)
|
|
95
|
+
images = []
|
|
96
|
+
for page in describe_images_response_iterator:
|
|
97
|
+
images += page["imageDetails"]
|
|
98
|
+
|
|
99
|
+
sorted_images = sorted(
|
|
100
|
+
images,
|
|
101
|
+
key=lambda i: i["imagePushedAt"],
|
|
102
|
+
reverse=True,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
MAX_RESULTS = 20
|
|
106
|
+
|
|
107
|
+
for image in sorted_images[:MAX_RESULTS]:
|
|
108
|
+
try:
|
|
109
|
+
commit_tag = next(t for t in image["imageTags"] if t.startswith("commit-"))
|
|
110
|
+
if not commit_tag:
|
|
111
|
+
continue
|
|
112
|
+
|
|
113
|
+
commit_hash = commit_tag.replace("commit-", "")
|
|
114
|
+
click.echo(
|
|
115
|
+
f" - https://github.com/{codebase_repository}/commit/{commit_hash} - published: {image['imagePushedAt']}"
|
|
116
|
+
)
|
|
117
|
+
except StopIteration:
|
|
118
|
+
continue
|
|
119
|
+
|
|
120
|
+
|
|
89
121
|
@codebase.command()
|
|
90
122
|
@click.option("--app", help="AWS application name", required=True)
|
|
91
123
|
@click.option(
|
|
@@ -116,29 +148,9 @@ def list(app, with_images):
|
|
|
116
148
|
for codebase in codebases:
|
|
117
149
|
click.echo(f"- {codebase['name']} (https://github.com/{codebase['repository']})")
|
|
118
150
|
if with_images:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
maxResults=20,
|
|
122
|
-
filter={"tagStatus": "TAGGED"},
|
|
151
|
+
list_latest_images(
|
|
152
|
+
ecr_client, f"{application.name}/{codebase['name']}", codebase["repository"]
|
|
123
153
|
)
|
|
124
|
-
images = sorted(
|
|
125
|
-
describe_images_response["imageDetails"],
|
|
126
|
-
key=lambda i: i["imagePushedAt"],
|
|
127
|
-
reverse=True,
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
for image in images:
|
|
131
|
-
try:
|
|
132
|
-
commit_tag = next(t for t in image["imageTags"] if t.startswith("commit-"))
|
|
133
|
-
if not commit_tag:
|
|
134
|
-
continue
|
|
135
|
-
|
|
136
|
-
commit_hash = commit_tag.replace("commit-", "")
|
|
137
|
-
click.echo(
|
|
138
|
-
f" - https://github.com/{codebase['repository']}/commit/{commit_hash} - published: {image['imagePushedAt']}"
|
|
139
|
-
)
|
|
140
|
-
except StopIteration:
|
|
141
|
-
continue
|
|
142
154
|
|
|
143
155
|
click.echo("")
|
|
144
156
|
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/conduit.py
RENAMED
|
@@ -315,6 +315,7 @@ def update_conduit_stack_resources(
|
|
|
315
315
|
addon_name: str,
|
|
316
316
|
task_name: str,
|
|
317
317
|
parameter_name: str,
|
|
318
|
+
access: str,
|
|
318
319
|
):
|
|
319
320
|
session = app.environments[env].session
|
|
320
321
|
cloudformation_client = session.client("cloudformation")
|
|
@@ -352,7 +353,7 @@ def update_conduit_stack_resources(
|
|
|
352
353
|
Properties:
|
|
353
354
|
RoleArn: {log_filter_role_arn}
|
|
354
355
|
LogGroupName: /copilot/{task_name}
|
|
355
|
-
FilterName: /copilot/conduit/{app.name}/{env}/{addon_type}/{addon_name}/{task_name.rsplit("-", 1)[1]}
|
|
356
|
+
FilterName: /copilot/conduit/{app.name}/{env}/{addon_type}/{addon_name}/{task_name.rsplit("-", 1)[1]}/{access}
|
|
356
357
|
FilterPattern: ''
|
|
357
358
|
DestinationArn: {destination_arn}
|
|
358
359
|
"""
|
|
@@ -386,7 +387,7 @@ def start_conduit(
|
|
|
386
387
|
create_addon_client_task(application, env, addon_type, addon_name, task_name, access)
|
|
387
388
|
add_stack_delete_policy_to_task_role(application, env, task_name)
|
|
388
389
|
update_conduit_stack_resources(
|
|
389
|
-
application, env, addon_type, addon_name, task_name, parameter_name
|
|
390
|
+
application, env, addon_type, addon_name, task_name, parameter_name, access
|
|
390
391
|
)
|
|
391
392
|
|
|
392
393
|
connect_to_addon_client_task(application, env, cluster_arn, task_name)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Exit early if something goes wrong
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
if [ -f "./.gitmodules" ]; then
|
|
7
|
+
echo ".gitmodules file exists. Modifying URLs..."
|
|
8
|
+
account_id=$(echo $CODESTAR_CONNECTION_ARN | cut -d':' -f5)
|
|
9
|
+
connection_id=$(echo $CODESTAR_CONNECTION_ARN | cut -d'/' -f2)
|
|
10
|
+
git_clone_base_url="https://codestar-connections.eu-west-2.amazonaws.com/git-http/$account_id/eu-west-2/$connection_id/uktrade"
|
|
11
|
+
|
|
12
|
+
git config --global credential.helper '!aws codecommit credential-helper $@'
|
|
13
|
+
git config --global credential.UseHttpPath true
|
|
14
|
+
|
|
15
|
+
sed -i "s|url = git@github.com:uktrade/\(.*\).git|url = $git_clone_base_url/\1.git|g" ./.gitmodules
|
|
16
|
+
|
|
17
|
+
git submodule update --init --remote --recursive
|
|
18
|
+
|
|
19
|
+
else
|
|
20
|
+
echo ".gitmodules file does not exist. No URLs to update."
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# Add commands below to run as part of the pre_build phase
|
|
@@ -36,3 +36,12 @@ module "extensions" {
|
|
|
36
36
|
environment = "{{ environment }}"
|
|
37
37
|
vpc_name = "{{ config.vpc }}"
|
|
38
38
|
}
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
Clean up because terraform modules were initially deployed with a -tf suffix. This block moves those modules to naming without a suffix.
|
|
42
|
+
Can be removed once all services have moved to the new naming.
|
|
43
|
+
*/
|
|
44
|
+
moved {
|
|
45
|
+
from = module.extensions-tf
|
|
46
|
+
to = module.extensions
|
|
47
|
+
}
|
|
@@ -78,6 +78,7 @@ export class TransformedStack extends cdk.Stack {
|
|
|
78
78
|
const envVars = [
|
|
79
79
|
{name: 'AWS_ACCOUNT_ID', value: this.account},
|
|
80
80
|
{name: 'ECR_REPOSITORY', value: this.ecrRepository()},
|
|
81
|
+
{name: 'CODESTAR_CONNECTION_ARN', value: this.codestarConnection.arn},
|
|
81
82
|
];
|
|
82
83
|
if (this.additionalEcrRepository()){
|
|
83
84
|
envVars.push({name: 'ADDITIONAL_ECR_REPOSITORY', value: this.additionalEcrRepository()});
|
|
@@ -115,7 +116,7 @@ export class TransformedStack extends cdk.Stack {
|
|
|
115
116
|
location: `https://github.com/${this.codebaseConfiguration.repository}.git`,
|
|
116
117
|
gitCloneDepth: 0,
|
|
117
118
|
auth: {type: 'OAUTH'},
|
|
118
|
-
gitSubmodulesConfig: {fetchSubmodules:
|
|
119
|
+
gitSubmodulesConfig: {fetchSubmodules: false},
|
|
119
120
|
buildSpec: stringify(parse(
|
|
120
121
|
readFileSync(path.join(__dirname, 'buildspec.image.yml')).toString('utf-8'),
|
|
121
122
|
)),
|
|
@@ -38,18 +38,8 @@ network:
|
|
|
38
38
|
storage:
|
|
39
39
|
readonly_fs: true # Limit to read-only access to mounted root filesystems.
|
|
40
40
|
|
|
41
|
-
observability:
|
|
42
|
-
tracing: awsxray
|
|
43
|
-
|
|
44
41
|
variables: # Pass environment variables as key value pairs.
|
|
45
42
|
PORT: 8080 # The bootstrap container requires a $PORT env var
|
|
46
|
-
OTEL_PROPAGATORS: xray
|
|
47
|
-
OTEL_PYTHON_ID_GENERATOR: xray
|
|
48
|
-
OTEL_SERVICE_NAME: ${COPILOT_APPLICATION_NAME}-${COPILOT_ENVIRONMENT_NAME}-{{ name }}
|
|
49
|
-
OTEL_METRICS_EXPORTER: none
|
|
50
|
-
OTEL_TRACES_EXPORTER: otlp
|
|
51
|
-
OTEL_TRACES_SAMPLER: traceidratio
|
|
52
|
-
OTEL_TRACES_SAMPLER_ARG: "0.05"
|
|
53
43
|
{%- for envvar, value in env_vars.items() %}
|
|
54
44
|
{{ envvar }}: {{ value }}
|
|
55
45
|
{%- endfor %}
|
|
@@ -74,20 +74,10 @@ network:
|
|
|
74
74
|
storage:
|
|
75
75
|
readonly_fs: true # Limit to read-only access to mounted root filesystems.
|
|
76
76
|
|
|
77
|
-
observability:
|
|
78
|
-
tracing: awsxray
|
|
79
|
-
|
|
80
77
|
# Optional fields for more advanced use-cases.
|
|
81
78
|
#
|
|
82
79
|
variables: # Pass environment variables as key value pairs.
|
|
83
80
|
PORT: 8080
|
|
84
|
-
OTEL_PROPAGATORS: xray
|
|
85
|
-
OTEL_PYTHON_ID_GENERATOR: xray
|
|
86
|
-
OTEL_SERVICE_NAME: ${COPILOT_APPLICATION_NAME}-${COPILOT_ENVIRONMENT_NAME}-{{ name }}
|
|
87
|
-
OTEL_METRICS_EXPORTER: none
|
|
88
|
-
OTEL_TRACES_EXPORTER: otlp
|
|
89
|
-
OTEL_TRACES_SAMPLER: traceidratio
|
|
90
|
-
OTEL_TRACES_SAMPLER_ARG: "0.05"
|
|
91
81
|
{%- for envvar, value in env_vars.items() %}
|
|
92
82
|
{{ envvar }}: {{ value }}
|
|
93
83
|
{%- endfor %}
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/files.py
RENAMED
|
@@ -61,7 +61,7 @@ def generate_override_files_from_template(base_path, overrides_path, output_dir,
|
|
|
61
61
|
templates = Environment(
|
|
62
62
|
loader=FileSystemLoader(f"{overrides_path}"), keep_trailing_newline=True
|
|
63
63
|
)
|
|
64
|
-
environments = ",
|
|
64
|
+
environments = ",".join([env["name"] for env in template_data["environments"]])
|
|
65
65
|
data = {"environments": environments}
|
|
66
66
|
|
|
67
67
|
def generate_files_for_dir(pattern):
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/versioning.py
RENAMED
|
@@ -90,7 +90,7 @@ def get_github_released_version(repository: str, tags: bool = False) -> Tuple[in
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
def get_platform_helper_versions() -> PlatformHelperVersions:
|
|
93
|
-
|
|
93
|
+
locally_installed_version = parse_version(version("dbt-platform-helper"))
|
|
94
94
|
|
|
95
95
|
package_info = requests.get("https://pypi.org/pypi/dbt-platform-helper/json").json()
|
|
96
96
|
released_versions = package_info["releases"].keys()
|
|
@@ -98,10 +98,16 @@ def get_platform_helper_versions() -> PlatformHelperVersions:
|
|
|
98
98
|
parsed_released_versions.sort(reverse=True)
|
|
99
99
|
latest_release = parsed_released_versions[0]
|
|
100
100
|
|
|
101
|
-
version_from_file =
|
|
101
|
+
version_from_file = None
|
|
102
|
+
message = "Cannot get dbt-platform-helper version from file '.platform-helper-version'. Check if file exists."
|
|
103
|
+
|
|
104
|
+
try:
|
|
105
|
+
version_from_file = parse_version(Path(".platform-helper-version").read_text())
|
|
106
|
+
except FileNotFoundError:
|
|
107
|
+
click.secho(f"{message}", fg="yellow")
|
|
102
108
|
|
|
103
109
|
return PlatformHelperVersions(
|
|
104
|
-
local_version=
|
|
110
|
+
local_version=locally_installed_version,
|
|
105
111
|
latest_release=latest_release,
|
|
106
112
|
platform_helper_file_version=version_from_file,
|
|
107
113
|
)
|
|
@@ -156,8 +162,8 @@ def validate_template_version(app_version: Tuple[int, int, int], template_file_p
|
|
|
156
162
|
|
|
157
163
|
def generate_platform_helper_version_file(directory="."):
|
|
158
164
|
base_path = Path(directory)
|
|
159
|
-
|
|
160
|
-
click.echo(mkfile(base_path, ".platform-helper-version", f"{
|
|
165
|
+
local_version = string_version(get_platform_helper_versions().local_version)
|
|
166
|
+
click.echo(mkfile(base_path, ".platform-helper-version", f"{local_version}\n"))
|
|
161
167
|
|
|
162
168
|
|
|
163
169
|
def check_platform_helper_version_needs_update():
|
|
@@ -3,7 +3,7 @@ line-length = 100
|
|
|
3
3
|
|
|
4
4
|
[tool.poetry]
|
|
5
5
|
name = "dbt-platform-helper"
|
|
6
|
-
version = "10.
|
|
6
|
+
version = "10.6.1"
|
|
7
7
|
description = "Set of tools to help transfer applications/services from GOV.UK PaaS to DBT PaaS augmenting AWS Copilot."
|
|
8
8
|
authors = ["Department for Business and Trade Platform Team <sre-team@digital.trade.gov.uk>"]
|
|
9
9
|
license = "MIT"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/addon-plans.yml
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/config.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/copilot.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/database.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/dns.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/generate.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/notify.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/pipeline.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/commands/secrets.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/jinja2_tags.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/__init__.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/application.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/arn_parser.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/click.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/cloudfoundry.py
RENAMED
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/manifests.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/messages.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/template.py
RENAMED
|
File without changes
|
{dbt_platform_helper-10.5.0 → dbt_platform_helper-10.6.1}/dbt_platform_helper/utils/validation.py
RENAMED
|
File without changes
|
|
File without changes
|