Skip to content

Commit fd7dcf8

Browse files
committed
self-managed release: Adapt automation to v26.0.0
1 parent 6e12a0d commit fd7dcf8

File tree

8 files changed

+84
-322
lines changed

8 files changed

+84
-322
lines changed

ci/deploy/docker.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from materialize import ci_util, git, mzbuild, spawn
1414
from materialize.mz_version import MzVersion
1515
from materialize.rustc_flags import Sanitizer
16-
from materialize.version_list import get_all_mz_versions, get_self_managed_versions
16+
from materialize.version_list import get_all_mz_versions
1717
from materialize.xcompile import Arch
1818

1919

@@ -54,19 +54,7 @@ def include_image(image: mzbuild.Image) -> bool:
5454
for repo in repos
5555
]
5656

57-
if ci_helm_chart_version and ci_mz_version:
58-
# On tag builds, always tag the images as such.
59-
mzbuild.tag_multiarch_images(
60-
f"self-managed-{ci_helm_chart_version}", ci_mz_version, deps
61-
)
62-
63-
version = MzVersion.parse_mz(ci_mz_version)
64-
latest_version = max(
65-
t for t in get_self_managed_versions() if t.prerelease is None
66-
)
67-
if version == latest_version:
68-
mzbuild.tag_multiarch_images("latest-self-managed", ci_mz_version, deps)
69-
elif buildkite_tag:
57+
if buildkite_tag:
7058
# On tag builds, always tag the images as such.
7159
mzbuild.publish_multiarch_images(buildkite_tag, deps)
7260

ci/deploy/pipeline.template.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,50 @@
1111
priority: 30
1212

1313
steps:
14-
- command: bin/ci-builder run nightly ci/deploy/devsite.sh
14+
- id: deploy-devsite
15+
label: ":rocket: Dev. site"
16+
command: bin/ci-builder run nightly ci/deploy/devsite.sh
1517
branches: main
1618
timeout_in_minutes: 60
1719
agents:
1820
queue: linux-x86_64
1921
concurrency: 1
2022
concurrency_group: deploy/devsite
2123

22-
- command: bin/ci-builder run stable bin/pyactivate -m ci.deploy.docker
24+
- id: deploy-docker
25+
label: ":rocket: :docker:"
26+
command: bin/ci-builder run stable bin/pyactivate -m ci.deploy.docker
2327
timeout_in_minutes: 30
2428
agents:
2529
queue: linux-x86_64-small
2630
concurrency: 1
2731
concurrency_group: deploy/linux
2832

29-
- command: bin/ci-builder run stable bin/pyactivate -m ci.deploy.pypi
33+
- id: deploy-pypi
34+
label: ":rocket: :pypi:"
35+
command: bin/ci-builder run stable bin/pyactivate -m ci.deploy.pypi
3036
timeout_in_minutes: 30
31-
concurrency: 1
32-
concurrency_group: deploy/pypi
3337
agents:
3438
queue: linux-x86_64-small
39+
concurrency: 1
40+
concurrency_group: deploy/pypi
3541

36-
- command: bin/ci-builder run stable bin/pyactivate -m ci.deploy.npm
42+
- id: deploy-npm
43+
label: ":rocket: :npm:"
44+
command: bin/ci-builder run stable bin/pyactivate -m ci.deploy.npm
3745
timeout_in_minutes: 30
46+
agents:
47+
queue: linux-x86_64-small
3848
concurrency: 1
3949
concurrency_group: deploy/npm
50+
51+
- id: deploy-helm-chart
52+
label: ":rocket: :helm:"
53+
command: bin/ci-builder run stable misc/helm-charts/publish.sh
54+
depends_on: "deploy-docker"
55+
branches: "v*.*"
56+
timeout_in_minutes: 30
4057
agents:
41-
queue: linux-x86_64-small
58+
queue: linux-aarch64-small
59+
concurrency: 1
60+
concurrency_group: deploy/helm_chart

ci/mkpipeline.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ def fetch_hashes() -> None:
197197
args.sanitizer,
198198
lto,
199199
)
200+
add_nightly_deploy_dependency(pipeline, args.pipeline)
200201
remove_dependencies_on_prs(pipeline, args.pipeline, hash_check)
201202
remove_mz_specific_keys(pipeline)
202203

@@ -818,6 +819,29 @@ def visit(step: PipelineStep) -> None:
818819
]
819820

820821

822+
def add_nightly_deploy_dependency(pipeline: Any, pipeline_name: str) -> None:
823+
"""In release builds orchestratord and terraform tests in Nightly require
824+
the release tag to exist already, so we have to wait for the Deploy step to
825+
finish before triggering Nightly. But we don't want to make the Deploy step
826+
synchronous in non-release builds since it would make the test run take
827+
significantly longer to finish."""
828+
tag = os.environ["BUILDKITE_TAG"]
829+
if pipeline_name != "test" or not tag:
830+
return
831+
832+
previous_step: dict | None = None
833+
for step in steps(pipeline):
834+
if step.get("id") == "deploy":
835+
step["async"] = False
836+
assert previous_step and "wait" in previous_step
837+
previous_step["skip"] = True
838+
839+
if step.get("id") == "nightly-if-release":
840+
step["depends_on"] = "deploy"
841+
842+
previous_step = step
843+
844+
821845
def add_cargo_test_dependency(
822846
pipeline: Any,
823847
pipeline_name: str,

ci/publish-helm-charts/pipeline.template.yml

Lines changed: 0 additions & 142 deletions
This file was deleted.

ci/test/pipeline.template.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -767,19 +767,6 @@ steps:
767767
- wait: ~
768768
continue_on_failure: true
769769

770-
- id: coverage-pr-analyze
771-
label: Analyze code coverage for PR
772-
timeout_in_minutes: 20
773-
command: bin/ci-builder run stable ci/test/coverage_report.sh
774-
inputs: ["*"]
775-
priority: 1
776-
agents:
777-
queue: hetzner-aarch64-8cpu-16gb
778-
coverage: only
779-
780-
- wait: ~
781-
continue_on_failure: true
782-
783770
- id: deploy
784771
label: Deploy
785772
trigger: deploy
@@ -792,3 +779,16 @@ steps:
792779
BUILDKITE_TAG: "$BUILDKITE_TAG"
793780
coverage: skip
794781
sanitizer: skip
782+
783+
- wait: ~
784+
continue_on_failure: true
785+
786+
- id: coverage-pr-analyze
787+
label: Analyze code coverage for PR
788+
timeout_in_minutes: 20
789+
command: bin/ci-builder run stable ci/test/coverage_report.sh
790+
inputs: ["*"]
791+
priority: 1
792+
agents:
793+
queue: hetzner-aarch64-8cpu-16gb
794+
coverage: only

misc/helm-charts/operator-weekly/Chart.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)