Skip to content

Commit 9dec108

Browse files
committed
ci: Make terraform and orchestratord tests depend on devel tags
1 parent fe620c7 commit 9dec108

File tree

5 files changed

+51
-19
lines changed

5 files changed

+51
-19
lines changed

ci/mkpipeline.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ def trim_test_selection_id(pipeline: Any, step_ids_to_run: set[int]) -> None:
624624
"build-aarch64",
625625
"build-x86_64-lto",
626626
"build-aarch64-lto",
627+
"devel-docker-tags",
627628
)
628629
and not step.get("async")
629630
):
@@ -646,6 +647,7 @@ def trim_test_selection_name(pipeline: Any, steps_to_run: set[str]) -> None:
646647
"build-aarch64",
647648
"build-x86_64-lto",
648649
"build-aarch64-lto",
650+
"devel-docker-tags",
649651
)
650652
and not step.get("async")
651653
):
@@ -921,6 +923,11 @@ def trim_builds(
921923
elif step.get("id") == "upload-debug-symbols-aarch64":
922924
if hash_check[Arch.AARCH64][1]:
923925
step["skip"] = True
926+
elif step.get("id") == "devel-docker-tags":
927+
step["concurrency"] = 1
928+
step["concurrency_group"] = (
929+
f"devel-docker-tags/{hash_check[Arch.X86_64][0]}"
930+
)
924931

925932

926933
_github_changed_files: set[str] | None = None

ci/nightly/pipeline.template.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ steps:
7474
queue: hetzner-aarch64-16cpu-32gb
7575
branches: "main"
7676

77+
- id: devel-docker-tags
78+
label: Tag development docker images
79+
command: bin/ci-builder run min bin/pyactivate -m ci.test.dev_tag
80+
inputs:
81+
- "*"
82+
depends_on:
83+
- build-x86_64
84+
- build-aarch64
85+
timeout_in_minutes: 20
86+
agents:
87+
queue: linux-aarch64-small
88+
coverage: skip
89+
# Fortify against intermittent DockerHub/GHCR issues
90+
retry:
91+
automatic:
92+
- exit_status: 1
93+
limit: 2
94+
7795
- group: Linters
7896
key: linters
7997
steps:
@@ -1442,7 +1460,7 @@ steps:
14421460
- id: terraform-aws
14431461
label: "Terraform + Helm Chart E2E on AWS"
14441462
artifact_paths: [test/terraform/aws-temporary/terraform.tfstate, "mz_debug_*.zip"]
1445-
depends_on: build-aarch64
1463+
depends_on: devel-docker-tags
14461464
timeout_in_minutes: 120
14471465
concurrency: 1
14481466
concurrency_group: 'terraform-aws'
@@ -1461,7 +1479,7 @@ steps:
14611479
- id: terraform-aws-upgrade
14621480
label: "Terraform + Helm Chart Upgrade on AWS"
14631481
artifact_paths: [test/terraform/aws-upgrade/terraform.tfstate, "mz_debug_*.zip"]
1464-
depends_on: build-aarch64
1482+
depends_on: devel-docker-tags
14651483
timeout_in_minutes: 120
14661484
concurrency: 1
14671485
concurrency_group: 'terraform-upgrade-aws'
@@ -1485,7 +1503,7 @@ steps:
14851503
- id: terraform-gcp
14861504
label: "Terraform + Helm Chart E2E on GCP"
14871505
artifact_paths: [test/terraform/gcp-temporary/terraform.tfstate, "mz_debug_*.zip"]
1488-
depends_on: build-aarch64
1506+
depends_on: devel-docker-tags
14891507
timeout_in_minutes: 120
14901508
concurrency: 1
14911509
concurrency_group: 'terraform-gcp'
@@ -1504,7 +1522,7 @@ steps:
15041522
- id: terraform-azure
15051523
label: "Terraform + Helm Chart E2E on Azure"
15061524
artifact_paths: [test/terraform/azure-temporary/terraform.tfstate, "mz_debug_*.zip"]
1507-
depends_on: build-aarch64
1525+
depends_on: devel-docker-tags
15081526
timeout_in_minutes: 120
15091527
concurrency: 1
15101528
concurrency_group: 'terraform-azure'
@@ -2346,7 +2364,7 @@ steps:
23462364
steps:
23472365
- id: orchestratord-defaults
23482366
label: "Orchestratord test (defaults from documentation)"
2349-
depends_on: build-aarch64
2367+
depends_on: devel-docker-tags
23502368
timeout_in_minutes: 120
23512369
plugins:
23522370
- ./ci/plugins/mzcompose:
@@ -2358,7 +2376,7 @@ steps:
23582376

23592377
- id: orchestratord-default-properties
23602378
label: "Orchestratord test (defaults for properties)"
2361-
depends_on: build-aarch64
2379+
depends_on: devel-docker-tags
23622380
timeout_in_minutes: 120
23632381
plugins:
23642382
- ./ci/plugins/mzcompose:
@@ -2370,7 +2388,7 @@ steps:
23702388

23712389
- id: orchestratord-individual
23722390
label: "Orchestratord test (individual properties)"
2373-
depends_on: build-aarch64
2391+
depends_on: devel-docker-tags
23742392
timeout_in_minutes: 120
23752393
plugins:
23762394
- ./ci/plugins/mzcompose:
@@ -2394,7 +2412,7 @@ steps:
23942412

23952413
- id: orchestratord-upgrade-individual
23962414
label: "Orchestratord test (upgrade, individual props)"
2397-
depends_on: build-aarch64
2415+
depends_on: devel-docker-tags
23982416
timeout_in_minutes: 120
23992417
plugins:
24002418
- ./ci/plugins/mzcompose:
@@ -2409,7 +2427,7 @@ steps:
24092427

24102428
- id: orchestratord-upgrade-combine
24112429
label: "Orchestratord test (upgrade, combine props)"
2412-
depends_on: build-aarch64
2430+
depends_on: devel-docker-tags
24132431
timeout_in_minutes: 120
24142432
plugins:
24152433
- ./ci/plugins/mzcompose:
@@ -2424,7 +2442,7 @@ steps:
24242442

24252443
- id: orchestratord-upgrade-chain-individual
24262444
label: "Orchestratord test (upgrade chain, individual props)"
2427-
depends_on: build-aarch64
2445+
depends_on: devel-docker-tags
24282446
timeout_in_minutes: 120
24292447
plugins:
24302448
- ./ci/plugins/mzcompose:
@@ -2439,7 +2457,7 @@ steps:
24392457

24402458
- id: orchestratord-upgrade-chain-combine
24412459
label: "Orchestratord test (upgrade chain, combine props)"
2442-
depends_on: build-aarch64
2460+
depends_on: devel-docker-tags
24432461
timeout_in_minutes: 120
24442462
plugins:
24452463
- ./ci/plugins/mzcompose:

ci/test/pipeline.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ steps:
140140
agents:
141141
queue: linux-aarch64-small
142142
coverage: skip
143-
# Fortify against intermittent DockerHub issues
143+
# Fortify against intermittent DockerHub/GHCR issues
144144
retry:
145145
automatic:
146146
- exit_status: 1

misc/python/materialize/mzbuild.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,10 +1451,17 @@ def publish_multiarch_images(
14511451
names = set(image.image.name for image in images)
14521452
assert len(names) == 1, "dependency sets did not contain identical images"
14531453
name = images[0].image.docker_name(tag)
1454-
spawn.runv(
1455-
["docker", "manifest", "create", name, *(image.spec() for image in images)]
1456-
)
1457-
spawn.runv(["docker", "manifest", "push", name])
1454+
if not is_docker_image_pushed(name):
1455+
spawn.runv(
1456+
[
1457+
"docker",
1458+
"manifest",
1459+
"create",
1460+
name,
1461+
*(image.spec() for image in images),
1462+
]
1463+
)
1464+
spawn.runv(["docker", "manifest", "push", name])
14581465
print(f"--- Nofifying for tag {tag}")
14591466
markdown = f"""Pushed images with Docker tag `{tag}`"""
14601467
spawn.runv(

test/terraform/mzcompose.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ def setup(
687687

688688
vars = [
689689
"-var",
690-
"operator_version={get_operator_version()}",
690+
f"operator_version={get_operator_version()}",
691691
]
692692
if orchestratord_override:
693693
vars += [
@@ -1170,7 +1170,7 @@ def workflow_gcp_temporary(c: Composition, parser: WorkflowArgumentParser) -> No
11701170

11711171
vars = [
11721172
"-var",
1173-
"operator_version={get_operator_version()}",
1173+
f"operator_version={get_operator_version()}",
11741174
]
11751175
if args.orchestratord_override:
11761176
vars += [
@@ -1282,7 +1282,7 @@ def workflow_azure_temporary(c: Composition, parser: WorkflowArgumentParser) ->
12821282

12831283
vars = [
12841284
"-var",
1285-
"operator_version={get_operator_version()}",
1285+
f"operator_version={get_operator_version()}",
12861286
]
12871287
if args.orchestratord_override:
12881288
vars += [

0 commit comments

Comments
 (0)