dbt-platform-helper 10.6.0__py3-none-any.whl → 10.6.1__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.
- dbt_platform_helper/commands/codebase.py +34 -22
- dbt_platform_helper/templates/environments/main.tf +9 -0
- {dbt_platform_helper-10.6.0.dist-info → dbt_platform_helper-10.6.1.dist-info}/METADATA +1 -1
- {dbt_platform_helper-10.6.0.dist-info → dbt_platform_helper-10.6.1.dist-info}/RECORD +7 -7
- {dbt_platform_helper-10.6.0.dist-info → dbt_platform_helper-10.6.1.dist-info}/LICENSE +0 -0
- {dbt_platform_helper-10.6.0.dist-info → dbt_platform_helper-10.6.1.dist-info}/WHEEL +0 -0
- {dbt_platform_helper-10.6.0.dist-info → dbt_platform_helper-10.6.1.dist-info}/entry_points.txt +0 -0
|
@@ -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
|
|
|
@@ -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
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dbt-platform-helper
|
|
3
|
-
Version: 10.6.
|
|
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
|
|
@@ -6,7 +6,7 @@ dbt_platform_helper/addons-template-map.yml,sha256=oG-kj-jTpU70LebW8uaYG2febcysd
|
|
|
6
6
|
dbt_platform_helper/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
dbt_platform_helper/commands/application.py,sha256=1XTBfdZBDj1vOFkAWjTxxTNFtko4YB9Q0_tVdxavwAo,9957
|
|
8
8
|
dbt_platform_helper/commands/check_cloudformation.py,sha256=aLif3yMHKuZO0uvdUjTH9FdRZNIpCqtWvE3aFQMozoc,3226
|
|
9
|
-
dbt_platform_helper/commands/codebase.py,sha256=
|
|
9
|
+
dbt_platform_helper/commands/codebase.py,sha256=NchJzH-yxv5mXCe2rPyXVNHmXGEvjFUv0KhMKYsLNNQ,11380
|
|
10
10
|
dbt_platform_helper/commands/conduit.py,sha256=6UGl8doZ8x1URIOCsOxzm66Qx4FuIGGB8t4C7T9JoqU,14872
|
|
11
11
|
dbt_platform_helper/commands/config.py,sha256=NOHea7OAjrl6XHlW6HMLn0m0T5lFPyNH3HXoyCOWsJk,12070
|
|
12
12
|
dbt_platform_helper/commands/copilot.py,sha256=-_hl6nYLq-fSA35IIcvjpWwsqfdSqp5lvZt4Eq_ztvs,16525
|
|
@@ -58,7 +58,7 @@ dbt_platform_helper/templates/env/overrides/package.json,sha256=dLDirCV_IljHPl1j
|
|
|
58
58
|
dbt_platform_helper/templates/env/overrides/stack.ts,sha256=mh5xBJ_enJGUflIDlD-aRLKB_IE5OcvM6W8dGUdB-io,1910
|
|
59
59
|
dbt_platform_helper/templates/env/overrides/tsconfig.json,sha256=xOAruVlYLYq9vU1MiIruhrIXDWYVXjbxy9Y42bHh5xE,710
|
|
60
60
|
dbt_platform_helper/templates/env/terraform-overrides/cfn.patches.yml,sha256=cFlg69fvi9kzpz13ZAeY1asseZ6TuUex-6s76jG3oL4,259
|
|
61
|
-
dbt_platform_helper/templates/environments/main.tf,sha256=
|
|
61
|
+
dbt_platform_helper/templates/environments/main.tf,sha256=6tgxyGLvllZCiN2ryYwNM6fcm6wijb-LMjwdb9UckyU,1579
|
|
62
62
|
dbt_platform_helper/templates/pipelines/codebase/manifest.yml,sha256=Mby5ri_w0K9r3cJVdUN-c9adnu2cVvDgHpY4qvHggCE,1980
|
|
63
63
|
dbt_platform_helper/templates/pipelines/codebase/overrides/.gitignore,sha256=duFipE4GPjdkrYo-sO1jjCXdmSMoYNoFJLZ19lUKfL0,169
|
|
64
64
|
dbt_platform_helper/templates/pipelines/codebase/overrides/bin/override.ts,sha256=iD6Tsl8YTd3DW7NDk6ythkROmtX2OouU8DMSeWAqd_Y,227
|
|
@@ -94,8 +94,8 @@ dbt_platform_helper/utils/template.py,sha256=raRx4QUCVJtKfvJK08Egg6gwWcs3r3V4nPW
|
|
|
94
94
|
dbt_platform_helper/utils/validation.py,sha256=ppsygq95kWmOeQxg-uGeqUpChb_dUuc7cQklQt8uzQw,21326
|
|
95
95
|
dbt_platform_helper/utils/versioning.py,sha256=byefjKUIW77yelSa0my0h37bcJl_Zi4AMRyUmjtAsVw,7499
|
|
96
96
|
platform_helper.py,sha256=hiTc983-UiUcJl6jLFNnVk7Yg3aEWbbCvM_tNPbLZRs,2176
|
|
97
|
-
dbt_platform_helper-10.6.
|
|
98
|
-
dbt_platform_helper-10.6.
|
|
99
|
-
dbt_platform_helper-10.6.
|
|
100
|
-
dbt_platform_helper-10.6.
|
|
101
|
-
dbt_platform_helper-10.6.
|
|
97
|
+
dbt_platform_helper-10.6.1.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
|
|
98
|
+
dbt_platform_helper-10.6.1.dist-info/METADATA,sha256=MwlGWjVXKKD0wvhekUIjWYHUVPBj76hZHtmxARSd_Oo,3126
|
|
99
|
+
dbt_platform_helper-10.6.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
100
|
+
dbt_platform_helper-10.6.1.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
|
|
101
|
+
dbt_platform_helper-10.6.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{dbt_platform_helper-10.6.0.dist-info → dbt_platform_helper-10.6.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|