c2cciutils 1.7.0.dev2__py3-none-any.whl → 1.7.0.dev6__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.
- c2cciutils/applications-versions.yaml +1 -0
- c2cciutils/applications.yaml +11 -0
- c2cciutils/publish.py +10 -23
- c2cciutils/scripts/download_applications.py +4 -2
- c2cciutils/scripts/k8s/install.py +1 -1
- c2cciutils/scripts/publish.py +6 -21
- {c2cciutils-1.7.0.dev2.dist-info → c2cciutils-1.7.0.dev6.dist-info}/METADATA +1 -1
- {c2cciutils-1.7.0.dev2.dist-info → c2cciutils-1.7.0.dev6.dist-info}/RECORD +11 -11
- {c2cciutils-1.7.0.dev2.dist-info → c2cciutils-1.7.0.dev6.dist-info}/LICENSE +0 -0
- {c2cciutils-1.7.0.dev2.dist-info → c2cciutils-1.7.0.dev6.dist-info}/WHEEL +0 -0
- {c2cciutils-1.7.0.dev2.dist-info → c2cciutils-1.7.0.dev6.dist-info}/entry_points.txt +0 -0
c2cciutils/applications.yaml
CHANGED
|
@@ -9,3 +9,14 @@ k3d-io/k3d:
|
|
|
9
9
|
- k3d
|
|
10
10
|
- - k3d
|
|
11
11
|
- --version
|
|
12
|
+
helm/chart-releaser:
|
|
13
|
+
get-file-name: chart-releaser_{short_version}_linux_amd64.tar.gz
|
|
14
|
+
type: tar
|
|
15
|
+
tar-file-name: cr
|
|
16
|
+
to-file-name: cr
|
|
17
|
+
finish-commands:
|
|
18
|
+
- - chmod
|
|
19
|
+
- +x
|
|
20
|
+
- cr
|
|
21
|
+
- - cr
|
|
22
|
+
- version
|
c2cciutils/publish.py
CHANGED
|
@@ -337,7 +337,6 @@ def docker(
|
|
|
337
337
|
image_config: c2cciutils.configuration.PublishDockerImage,
|
|
338
338
|
tag_src: str,
|
|
339
339
|
tag_dst: str,
|
|
340
|
-
latest: bool,
|
|
341
340
|
alt_tags: list[str],
|
|
342
341
|
images_full: list[str],
|
|
343
342
|
) -> bool:
|
|
@@ -378,17 +377,6 @@ def docker(
|
|
|
378
377
|
check=True,
|
|
379
378
|
)
|
|
380
379
|
new_images_full.append(f"{config['server']}/{image_config['name']}:{tag_dst}")
|
|
381
|
-
if latest:
|
|
382
|
-
subprocess.run(
|
|
383
|
-
[
|
|
384
|
-
"docker",
|
|
385
|
-
"tag",
|
|
386
|
-
f"{image_config['name']}:{tag_src}",
|
|
387
|
-
f"{config['server']}/{image_config['name']}:{tag_src}",
|
|
388
|
-
],
|
|
389
|
-
check=True,
|
|
390
|
-
)
|
|
391
|
-
new_images_full.append(f"{config['server']}/{image_config['name']}:{tag_src}")
|
|
392
380
|
for alt_tag in alt_tags:
|
|
393
381
|
subprocess.run(
|
|
394
382
|
[
|
|
@@ -412,18 +400,17 @@ def docker(
|
|
|
412
400
|
check=True,
|
|
413
401
|
)
|
|
414
402
|
new_images_full.append(f"{image_config['name']}:{tag_dst}")
|
|
415
|
-
if latest and tag_src != tag_dst:
|
|
416
|
-
new_images_full.append(f"{image_config['name']}:{tag_src}")
|
|
417
403
|
for alt_tag in alt_tags:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
404
|
+
if tag_src != alt_tag:
|
|
405
|
+
subprocess.run(
|
|
406
|
+
[
|
|
407
|
+
"docker",
|
|
408
|
+
"tag",
|
|
409
|
+
f"{image_config['name']}:{tag_src}",
|
|
410
|
+
f"{image_config['name']}:{alt_tag}",
|
|
411
|
+
],
|
|
412
|
+
check=True,
|
|
413
|
+
)
|
|
427
414
|
new_images_full.append(f"{image_config['name']}:{alt_tag}")
|
|
428
415
|
|
|
429
416
|
for image in new_images_full:
|
|
@@ -7,7 +7,7 @@ import tarfile
|
|
|
7
7
|
import urllib
|
|
8
8
|
from glob import glob
|
|
9
9
|
from io import BytesIO
|
|
10
|
-
from typing import cast
|
|
10
|
+
from typing import Optional, cast
|
|
11
11
|
|
|
12
12
|
import requests
|
|
13
13
|
import yaml
|
|
@@ -38,7 +38,7 @@ def main() -> None:
|
|
|
38
38
|
download_applications(applications, versions)
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
def download_c2cciutils_applications() -> None:
|
|
41
|
+
def download_c2cciutils_applications(name: Optional[str] = None) -> None:
|
|
42
42
|
"""Download the applications defined in the c2cciutils package."""
|
|
43
43
|
with open(
|
|
44
44
|
os.path.join(os.path.dirname(os.path.dirname(__file__)), "applications-versions.yaml"),
|
|
@@ -51,6 +51,8 @@ def download_c2cciutils_applications() -> None:
|
|
|
51
51
|
applications = cast(
|
|
52
52
|
applications_definition.ApplicationsConfiguration, yaml.load(config_file, Loader=yaml.SafeLoader)
|
|
53
53
|
)
|
|
54
|
+
if name is not None:
|
|
55
|
+
applications = {name: applications[name]}
|
|
54
56
|
download_applications(applications, versions)
|
|
55
57
|
|
|
56
58
|
|
|
@@ -22,7 +22,7 @@ def main() -> None:
|
|
|
22
22
|
config = c2cciutils.get_config()
|
|
23
23
|
|
|
24
24
|
_print("::group::Install")
|
|
25
|
-
c2cciutils.scripts.download_applications.download_c2cciutils_applications()
|
|
25
|
+
c2cciutils.scripts.download_applications.download_c2cciutils_applications("k3d-io/k3d")
|
|
26
26
|
_print("::endgroup::")
|
|
27
27
|
|
|
28
28
|
_print("::group::Create cluster")
|
c2cciutils/scripts/publish.py
CHANGED
|
@@ -9,7 +9,6 @@ import os
|
|
|
9
9
|
import re
|
|
10
10
|
import subprocess # nosec
|
|
11
11
|
import sys
|
|
12
|
-
import tarfile
|
|
13
12
|
from re import Match
|
|
14
13
|
from typing import Optional, cast
|
|
15
14
|
|
|
@@ -193,7 +192,6 @@ def main() -> None:
|
|
|
193
192
|
config.get("publish", {}).get("docker", {}) if config.get("publish", {}).get("docker", False) else {},
|
|
194
193
|
)
|
|
195
194
|
if docker_config:
|
|
196
|
-
latest = False
|
|
197
195
|
full_repo = c2cciutils.get_repository()
|
|
198
196
|
full_repo_split = full_repo.split("/")
|
|
199
197
|
master_branch, _ = c2cciutils.get_master_branch(full_repo_split)
|
|
@@ -216,7 +214,6 @@ def main() -> None:
|
|
|
216
214
|
|
|
217
215
|
security = c2cciutils.security.Security(security_text)
|
|
218
216
|
version_index = security.headers.index("Version")
|
|
219
|
-
latest = security.data[-1][version_index] == version
|
|
220
217
|
|
|
221
218
|
row_index = -1
|
|
222
219
|
for index, row in enumerate(security.data):
|
|
@@ -224,10 +221,12 @@ def main() -> None:
|
|
|
224
221
|
row_index = index
|
|
225
222
|
break
|
|
226
223
|
|
|
227
|
-
alt_tags =
|
|
224
|
+
alt_tags = set()
|
|
228
225
|
if "Alternate Tag" in security.headers:
|
|
229
226
|
tag_index = security.headers.index("Alternate Tag")
|
|
230
|
-
alt_tags = security.data[row_index][tag_index].split(",")
|
|
227
|
+
alt_tags = {t.strip() for t in security.data[row_index][tag_index].split(",")}
|
|
228
|
+
if security.data[-1][version_index] == version:
|
|
229
|
+
alt_tags.add("latest")
|
|
231
230
|
|
|
232
231
|
images_src: set[str] = set()
|
|
233
232
|
images_full: list[str] = []
|
|
@@ -285,22 +284,13 @@ def main() -> None:
|
|
|
285
284
|
|
|
286
285
|
if args.dry_run:
|
|
287
286
|
print(f"Publishing {image_dst} to {name}, skipping (dry run)")
|
|
288
|
-
if latest:
|
|
289
|
-
print(f"Publishing {image_source} to {name}, skipping (dry run)")
|
|
290
287
|
for alt_tag in current_alt_tag:
|
|
291
288
|
print(
|
|
292
289
|
f"Publishing {image_conf['name']}:{alt_tag} to {name}, skipping (dry run)"
|
|
293
290
|
)
|
|
294
291
|
else:
|
|
295
292
|
success &= c2cciutils.publish.docker(
|
|
296
|
-
conf,
|
|
297
|
-
name,
|
|
298
|
-
image_conf,
|
|
299
|
-
tag_src,
|
|
300
|
-
tag_dst,
|
|
301
|
-
latest,
|
|
302
|
-
current_alt_tag,
|
|
303
|
-
images_full,
|
|
293
|
+
conf, name, image_conf, tag_src, tag_dst, current_alt_tag, images_full
|
|
304
294
|
)
|
|
305
295
|
|
|
306
296
|
if google_calendar_publish:
|
|
@@ -405,12 +395,7 @@ def main() -> None:
|
|
|
405
395
|
config.get("publish", {}).get("helm", {}) if config.get("publish", {}).get("helm", False) else {},
|
|
406
396
|
)
|
|
407
397
|
if helm_config and helm_config["folders"] and version_type in helm_config.get("versions", []):
|
|
408
|
-
|
|
409
|
-
response = requests.get(url, stream=True, timeout=int(os.environ.get("C2CCIUTILS_TIMEOUT", "30")))
|
|
410
|
-
with tarfile.open(fileobj=response.raw, mode="r:gz") as file:
|
|
411
|
-
filename_re = re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9._/-]*$")
|
|
412
|
-
members = [member for member in file.getmembers() if filename_re.match(member.name) is not None]
|
|
413
|
-
file.extractall(path=os.path.expanduser("~/.local/bin"), members=members) # nosec
|
|
398
|
+
c2cciutils.scripts.download_applications.download_c2cciutils_applications("helm/chart-releaser")
|
|
414
399
|
|
|
415
400
|
owner, repo = full_repo_split
|
|
416
401
|
commit_sha = (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
c2cciutils/__init__.py,sha256=7I1DBWTIacQmf-BWioEyY7Zwf8S-OK3hntXq2UNF_RM,18227
|
|
2
|
-
c2cciutils/applications-versions.yaml,sha256=
|
|
3
|
-
c2cciutils/applications.yaml,sha256=
|
|
2
|
+
c2cciutils/applications-versions.yaml,sha256=PxrLqMlg46X3VMfeas_dEfIEHgQhN_m5kNvPXRTXeSQ,224
|
|
3
|
+
c2cciutils/applications.yaml,sha256=yn0XRi08cS29A_jXPofcBPxsGBv7PEBliztjRC3WtfM,504
|
|
4
4
|
c2cciutils/applications_definition.py,sha256=MdQVc_yYCcYmGP2dpaaWjn7-MqU5CaiyncjoajWbaTQ,1220
|
|
5
5
|
c2cciutils/audit.py,sha256=PHF_WWmNwEVXjWvlaz8aLGjnxmX6I-SmgJOWLvtTkJg,9028
|
|
6
6
|
c2cciutils/branches.graphql,sha256=UZrj1RO-H527M1SKqWm1VnkWtNsuKTnPTf4BCU2YcOU,358
|
|
@@ -555,7 +555,7 @@ c2cciutils/node_modules/yallist/yallist.js,sha256=aaEPcm0m-NgEo96urInwEG3foD1XbR
|
|
|
555
555
|
c2cciutils/package-lock.json,sha256=oo8vIQMt8di2MB8wVk76yQUXQ5mQXV7CcuWAmJivrZM,14545
|
|
556
556
|
c2cciutils/package.json,sha256=zlbbc0gNAj7nNmW0VXydTuu9GPpSmqGg0-wdtubgcoY,134
|
|
557
557
|
c2cciutils/pr_checks.py,sha256=AQxfojIja5RbGgixVWtfMQ4vyuAYjILpv2rLGGfDbkE,10100
|
|
558
|
-
c2cciutils/publish.py,sha256=
|
|
558
|
+
c2cciutils/publish.py,sha256=GB1UaJ0PmIcfRoTl5fQWOcK6RUDoo2woU96K_JgAPbI,18154
|
|
559
559
|
c2cciutils/schema-applications.json,sha256=Uc-U2xER-FrR67ec-67K2C9kvHFO7hBlAEAQhrdUKoA,1548
|
|
560
560
|
c2cciutils/schema.json,sha256=oeOy4cjyBgmGmd_h5FmVEELul8QvA1CuI0ORD1plVns,22561
|
|
561
561
|
c2cciutils/scripts/__init__.py,sha256=N4tcdvUifXQrK9vEvFWrGvoyY9oZ0uRcjb-FoYe41cc,36
|
|
@@ -563,22 +563,22 @@ c2cciutils/scripts/audit.py,sha256=MUQqpA8CNkbSyK5e0HiSC5w-4GPKYEqFgV82lIwKkQk,1
|
|
|
563
563
|
c2cciutils/scripts/clean.py,sha256=tpyipZjqK7om9_dNiLxvz6-l6le7N0L03inkrKe7Y_A,3039
|
|
564
564
|
c2cciutils/scripts/docker_logs.py,sha256=OoTstW3oUVpICASgLTCYfjDtgcuYMJxWDcy2pXyr6tE,1712
|
|
565
565
|
c2cciutils/scripts/docker_versions_gen.py,sha256=M_VzKlhqsmUwd9GgPIU9EW6eCmMmytkJQEhOFjYVZl4,1316
|
|
566
|
-
c2cciutils/scripts/download_applications.py,sha256=
|
|
566
|
+
c2cciutils/scripts/download_applications.py,sha256=Lxnm2XJSfDtZc47xUtJQx52N2tIARYioTvPEXKOMMJ0,4490
|
|
567
567
|
c2cciutils/scripts/env.py,sha256=4AmCZa2NPF1TaPrzpk5DnrCrMO_cWbFjKK3IM3XSg8s,375
|
|
568
568
|
c2cciutils/scripts/k8s/__init__.py,sha256=ESPfnAzxPBK-TXColaFlz0OxAouX_fHV8MDamhVEsYw,69
|
|
569
569
|
c2cciutils/scripts/k8s/db.py,sha256=GK1tzzyCqrCyIJzcBdIXjyNJUXrBPFNa-9fdtwxyrlU,3268
|
|
570
|
-
c2cciutils/scripts/k8s/install.py,sha256=
|
|
570
|
+
c2cciutils/scripts/k8s/install.py,sha256=OIQ8KHA3Pst2pjO2E-J5FYNaBHW-i-fqCXlAUcG1tw0,933
|
|
571
571
|
c2cciutils/scripts/k8s/logs.py,sha256=-xJYu8BBUmSmMrPEwiTBKZjJBRyIlMp1depCB04_NWs,2655
|
|
572
572
|
c2cciutils/scripts/k8s/wait.py,sha256=qzQn6hbB9p1CX4bUxrkukPnbu_p6oRNem29WiMtplNk,5661
|
|
573
573
|
c2cciutils/scripts/main.py,sha256=pj9gPIrmDUctVPEtaQQGZo-7k7mMeIs14sKQ7w6Sw1Y,1162
|
|
574
574
|
c2cciutils/scripts/pin_pipenv.py,sha256=jBTwlolcEL0MUyq6VYzO-adkcL1gqN7B3kBb3UjTo2k,2150
|
|
575
575
|
c2cciutils/scripts/pr_checks.py,sha256=lhCt7COlqSm26ue1xNSx4zReTA-Nxj3wHA0a8GEU-MU,2182
|
|
576
|
-
c2cciutils/scripts/publish.py,sha256=
|
|
576
|
+
c2cciutils/scripts/publish.py,sha256=fJLlE2O7FN3tWC63es4VRxg0oHI-cAZrzS3ri6mA0F4,18786
|
|
577
577
|
c2cciutils/scripts/trigger_image_update.py,sha256=UPCSgFcllewo1NOC7kUkJ2QMXU0dCA2QAq6LFQHr0Uw,2780
|
|
578
578
|
c2cciutils/scripts/version.py,sha256=gqg4l5Lm3ttdIziB2GKPiXn5gDsQboRa_KyiF4lIWf0,7630
|
|
579
579
|
c2cciutils/security.py,sha256=X4qI1xhKoeRVRSpHV5VHNgYpEYkLHiC7D3XFdtlDAVQ,1511
|
|
580
|
-
c2cciutils-1.7.0.
|
|
581
|
-
c2cciutils-1.7.0.
|
|
582
|
-
c2cciutils-1.7.0.
|
|
583
|
-
c2cciutils-1.7.0.
|
|
584
|
-
c2cciutils-1.7.0.
|
|
580
|
+
c2cciutils-1.7.0.dev6.dist-info/entry_points.txt,sha256=jPDp7KeB0Fz_TpOwbOODeW2WEcdLNJZACPtKpRqtHs4,1030
|
|
581
|
+
c2cciutils-1.7.0.dev6.dist-info/LICENSE,sha256=pK1gU5i1jYBv--vi5omcf6-86pYmAWk6ZGbdERjAgcw,1307
|
|
582
|
+
c2cciutils-1.7.0.dev6.dist-info/WHEEL,sha256=gSF7fibx4crkLz_A-IKR6kcuq0jJ64KNCkG8_bcaEao,88
|
|
583
|
+
c2cciutils-1.7.0.dev6.dist-info/METADATA,sha256=uLiJTOu3TC5ZEOhz6BBEQGCAQ_9nz_qKAlYsS8jM4F4,19656
|
|
584
|
+
c2cciutils-1.7.0.dev6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|