Skip to content

Commit 4422a1f

Browse files
committed
mzcompose: Also pull from GHCR in CI
1 parent 89f66eb commit 4422a1f

File tree

12 files changed

+35
-9
lines changed

12 files changed

+35
-9
lines changed

bin/ci-builder

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ build() {
128128
--build-arg "RUST_TARGET_FEATURES=$rust_target_features" \
129129
--build-arg "BAZEL_VERSION=$bazel_version" \
130130
--tag docker.io/materialize/ci-builder:"$tag" \
131-
--tag ghcr.io/materialize/ci-builder:"$tag" \
131+
--tag ghcr.io/materializeinc/ci-builder:"$tag" \
132132
--tag materialize/ci-builder:"$cache_tag" \
133133
--target $docker_target \
134134
"$@" ci/builder
@@ -169,20 +169,25 @@ print(hash.decode())
169169
')
170170
cache_tag=cache-$flavor-$rust_version-$arch_go
171171

172+
image_registry="materialize"
173+
if ui_is_truthy "${CI:-0}"; then
174+
image_registry="ghcr.io/materializeinc"
175+
fi
172176

173177
case "$cmd" in
174178
build)
175179
build "$@"
176180
;;
177181
exists)
178-
docker manifest inspect materialize/ci-builder:"$tag" &> /dev/null
182+
docker manifest inspect "$image_registry"/ci-builder:"$tag" &> /dev/null
179183
;;
180184
tag)
181185
echo "$tag"
182186
;;
183187
push)
184188
build "$@"
185189
docker push materialize/ci-builder:"$tag"
190+
docker push ghcr.io/materializeinc/ci-builder:"$tag"
186191
docker push materialize/ci-builder:"$cache_tag"
187192
;;
188193
run)
@@ -243,6 +248,7 @@ case "$cmd" in
243248
--env AZURE_SERVICE_ACCOUNT_TENANT
244249
--env GCP_SERVICE_ACCOUNT_JSON
245250
--env GITHUB_TOKEN
251+
--env GITHUB_GHCR_TOKEN
246252
--env GPG_KEY
247253
--env LAUNCHDARKLY_API_TOKEN
248254
--env LAUNCHDARKLY_SDK_KEY
@@ -392,7 +398,7 @@ case "$cmd" in
392398
args+=(--volume "$GIT_ROOT_DIR:$GIT_ROOT_DIR")
393399
fi
394400
rm -f "$cid_file"
395-
docker run "${args[@]}" "materialize/ci-builder:$tag" eatmydata "${docker_command[@]}"
401+
docker run "${args[@]}" "$image_registry/ci-builder:$tag" eatmydata "${docker_command[@]}"
396402
;;
397403
root-shell)
398404
docker exec --interactive --tty --user 0:0 "$(<"$cid_file")" eatmydata ci/builder/root-shell.sh

ci/deploy/docker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def main() -> None:
3737
bazel=bazel,
3838
bazel_remote_cache=bazel_remote_cache,
3939
bazel_lto=bazel_lto,
40+
image_registry="materialize",
4041
),
4142
mzbuild.Repository(
4243
Path("."),
@@ -46,6 +47,7 @@ def main() -> None:
4647
bazel=bazel,
4748
bazel_remote_cache=bazel_remote_cache,
4849
bazel_lto=bazel_lto,
50+
image_registry="materialize",
4951
),
5052
]
5153
buildkite_tag = os.environ["BUILDKITE_TAG"]

ci/deploy_mz-debug/linux.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def main() -> None:
3030
bazel=bazel,
3131
bazel_remote_cache=bazel_remote_cache,
3232
bazel_lto=bazel_lto,
33+
image_registry="materialize",
3334
)
3435
target = f"{repo.rd.arch}-unknown-linux-gnu"
3536

ci/deploy_mz/docker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def main() -> None:
3232
bazel=bazel,
3333
bazel_remote_cache=bazel_remote_cache,
3434
bazel_lto=bazel_lto,
35+
image_registry="materialize",
3536
),
3637
mzbuild.Repository(
3738
Path("."),
@@ -41,6 +42,7 @@ def main() -> None:
4142
bazel=bazel,
4243
bazel_remote_cache=bazel_remote_cache,
4344
bazel_lto=bazel_lto,
45+
image_registry="materialize",
4446
),
4547
]
4648

ci/deploy_mz/linux.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def main() -> None:
3131
bazel=bazel,
3232
bazel_remote_cache=bazel_remote_cache,
3333
bazel_lto=bazel_lto,
34+
image_registry="materialize",
3435
)
3536
target = f"{repo.rd.arch}-unknown-linux-gnu"
3637

ci/deploy_mz_lsp_server/linux.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def main() -> None:
3232
bazel=bazel,
3333
bazel_remote_cache=bazel_remote_cache,
3434
bazel_lto=bazel_lto,
35+
image_registry="materialize",
3536
)
3637
target = f"{repo.rd.arch}-unknown-linux-gnu"
3738

ci/test/build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def main() -> None:
3838
bazel=bazel,
3939
bazel_remote_cache=bazel_remote_cache,
4040
bazel_lto=bazel_lto,
41+
image_registry="materialize",
4142
)
4243

4344
# Build and push any images that are not already available on Docker Hub,

ci/test/dev_tag.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def main() -> None:
3434
bazel=bazel,
3535
bazel_remote_cache=bazel_remote_cache,
3636
bazel_lto=bazel_lto,
37+
image_registry="materialize",
3738
),
3839
mzbuild.Repository(
3940
Path("."),
@@ -43,6 +44,7 @@ def main() -> None:
4344
bazel=bazel,
4445
bazel_remote_cache=bazel_remote_cache,
4546
bazel_lto=bazel_lto,
47+
image_registry="materialize",
4648
),
4749
]
4850
print("--- Tagging development Docker images")

misc/images/ubuntu-base/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ENV RUST_BACKTRACE=1
1717
ENV RUST_LIB_BACKTRACE=0
1818

1919
ARG BUILD_PROFILE=optimize
20+
2021
LABEL build.profile=$BUILD_PROFILE
2122

2223
RUN sed -i -e 's#http://archive\.ubuntu\.com#http://us-east-1.ec2.archive.ubuntu.com#' \

misc/python/materialize/ci_util/upload_debug_symbols_to_polarsignals.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def main() -> None:
7373
bazel_remote_cache=bazel_remote_cache,
7474
bazel_lto=bazel_lto,
7575
arch=Arch(args.arch),
76+
image_registry="materialize",
7677
)
7778

7879
collect_and_upload_debug_data_to_polarsignals(

0 commit comments

Comments
 (0)