Skip to content

Commit 9d0e665

Browse files
committed
mzcompose: Also pull from GHCR in CI
1 parent 0475efe commit 9d0e665

File tree

13 files changed

+52
-18
lines changed

13 files changed

+52
-18
lines changed

bin/ci-builder

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ build() {
125125
--build-arg "RUST_CPU_TARGET=$rust_cpu_target" \
126126
--build-arg "RUST_TARGET_FEATURES=$rust_target_features" \
127127
--tag materialize/ci-builder:"$tag" \
128-
--tag ghcr.io/materialize/ci-builder:"$tag" \
128+
--tag ghcr.io/materializeinc/materialize/ci-builder:"$tag" \
129129
--tag materialize/ci-builder:"$cache_tag" \
130130
--target $docker_target \
131131
"$@" ci/builder
@@ -166,21 +166,25 @@ print(hash.decode())
166166
')
167167
cache_tag=cache-$flavor-$rust_version-$arch_go
168168

169+
image_registry="materialize"
170+
# TODO: Reenable
171+
# if is_truthy "${CI:-0}"; then
172+
# image_registry="ghcr.io/materializeinc/materialize"
173+
# fi
169174

170175
case "$cmd" in
171176
build)
172177
build "$@"
173178
;;
174179
exists)
175-
docker manifest inspect materialize/ci-builder:"$tag" &> /dev/null
180+
docker manifest inspect "$image_registry"/ci-builder:"$tag" &> /dev/null
176181
;;
177182
tag)
178183
echo "$tag"
179184
;;
180185
push)
181-
build "$@"
182-
docker push materialize/ci-builder:"$tag"
183-
docker push materialize/ci-builder:"$cache_tag"
186+
docker login ghcr.io -u materialize-bot --password "$GITHUB_GHCR_TOKEN"
187+
build --push "$@"
184188
;;
185189
run)
186190
docker_command=()
@@ -240,6 +244,7 @@ case "$cmd" in
240244
--env AZURE_SERVICE_ACCOUNT_TENANT
241245
--env GCP_SERVICE_ACCOUNT_JSON
242246
--env GITHUB_TOKEN
247+
--env GITHUB_GHCR_TOKEN
243248
--env GPG_KEY
244249
--env LAUNCHDARKLY_API_TOKEN
245250
--env LAUNCHDARKLY_SDK_KEY
@@ -384,7 +389,7 @@ case "$cmd" in
384389
args+=(--volume "$GIT_ROOT_DIR:$GIT_ROOT_DIR")
385390
fi
386391
rm -f "$cid_file"
387-
docker run "${args[@]}" "materialize/ci-builder:$tag" eatmydata "${docker_command[@]}"
392+
docker run "${args[@]}" "$image_registry/ci-builder:$tag" eatmydata "${docker_command[@]}"
388393
;;
389394
root-shell)
390395
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
@@ -30,12 +30,14 @@ def main() -> None:
3030
Arch.X86_64,
3131
coverage=False,
3232
sanitizer=Sanitizer.none,
33+
image_registry="materialize",
3334
),
3435
mzbuild.Repository(
3536
Path("."),
3637
Arch.AARCH64,
3738
coverage=False,
3839
sanitizer=Sanitizer.none,
40+
image_registry="materialize",
3941
),
4042
]
4143
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
@@ -23,6 +23,7 @@ def main() -> None:
2323
Path("."),
2424
coverage=False,
2525
sanitizer=Sanitizer.none,
26+
image_registry="materialize",
2627
)
2728
target = f"{repo.rd.arch}-unknown-linux-gnu"
2829

ci/deploy_mz/docker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ def main() -> None:
2424
Arch.X86_64,
2525
coverage=False,
2626
sanitizer=Sanitizer.none,
27+
image_registry="materialize",
2728
),
2829
mzbuild.Repository(
2930
Path("."),
3031
Arch.AARCH64,
3132
coverage=False,
3233
sanitizer=Sanitizer.none,
34+
image_registry="materialize",
3335
),
3436
]
3537

ci/deploy_mz/linux.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def main() -> None:
2424
Path("."),
2525
coverage=False,
2626
sanitizer=Sanitizer.none,
27+
image_registry="materialize",
2728
)
2829
target = f"{repo.rd.arch}-unknown-linux-gnu"
2930

ci/deploy_mz_lsp_server/linux.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def main() -> None:
2525
Path("."),
2626
coverage=False,
2727
sanitizer=Sanitizer.none,
28+
image_registry="materialize",
2829
)
2930
target = f"{repo.rd.arch}-unknown-linux-gnu"
3031

ci/mkpipeline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ def fetch_hashes() -> None:
183183
check_depends_on(pipeline, args.pipeline)
184184
add_version_to_preflight_tests(pipeline)
185185
trim_builds_prep_thread.join()
186-
trim_builds(pipeline, hash_check)
186+
# TODO: Reenable
187+
# trim_builds(pipeline, hash_check)
187188
add_cargo_test_dependency(
188189
pipeline,
189190
args.pipeline,

ci/test/build.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def main() -> None:
3232
Path("."),
3333
coverage=coverage,
3434
sanitizer=sanitizer,
35+
image_registry="materialize",
3536
)
3637

3738
# 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
@@ -27,12 +27,14 @@ def main() -> None:
2727
Arch.X86_64,
2828
coverage=False,
2929
sanitizer=sanitizer,
30+
image_registry="materialize",
3031
),
3132
mzbuild.Repository(
3233
Path("."),
3334
Arch.AARCH64,
3435
coverage=False,
3536
sanitizer=sanitizer,
37+
image_registry="materialize",
3638
),
3739
]
3840
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#' \

0 commit comments

Comments
 (0)