Skip to content

Commit 06cc6e4

Browse files
authored
Merge branch 'main' into fix-nulls-first-last
2 parents 463ac96 + cab14c2 commit 06cc6e4

38 files changed

+1217
-727
lines changed

Cargo.lock

Lines changed: 92 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/scripts/docker.sh

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -euo pipefail
55

66
date="$(date +%Y%m%d)"
77
ghcraddr="ghcr.io/singularity-data"
8+
arch="$(uname -m)"
89

910
components=(
1011
"risingwave"
@@ -17,23 +18,23 @@ components=(
1718
for component in "${components[@]}"
1819
do
1920
echo "--- docker build and tag : ${component}"
20-
docker build -f docker/Dockerfile -t "${ghcraddr}/${component}:latest" --target "${component}" .
21+
docker build -f docker/Dockerfile -t "${ghcraddr}/${component}:latest-${arch}" --target "${component}" .
2122
if [ "${BUILDKITE_SOURCE}" == "schedule" ] || [ "${BUILDKITE_SOURCE}" == "ui" ]; then
2223
# If this is a schedule/ui build, tag the image with the date.
23-
TAG="${ghcraddr}/${component}:nightly-${date}"
24-
docker tag "${ghcraddr}/${component}:latest" "$TAG"
24+
TAG="${ghcraddr}/${component}:nightly-${date}-${arch}"
25+
docker tag "${ghcraddr}/${component}:latest-${arch}" "$TAG"
2526
echo "$TAG"
2627
fi
2728
if [[ -n "${BUILDKITE_TAG}" ]]; then
2829
# If there's a tag, we tag the image.
29-
TAG="${ghcraddr}/${component}:${BUILDKITE_TAG}"
30-
docker tag "${ghcraddr}/${component}:latest" "$TAG"
30+
TAG="${ghcraddr}/${component}:${BUILDKITE_TAG}-${arch}"
31+
docker tag "${ghcraddr}/${component}:latest-${arch}" "$TAG"
3132
echo "$TAG"
3233
fi
3334
if [[ "${#BUILDKITE_COMMIT}" = 40 ]]; then
3435
# If the commit is 40 characters long, it's probably a SHA.
35-
TAG="${ghcraddr}/${component}:git-${BUILDKITE_COMMIT}"
36-
docker tag "${ghcraddr}/${component}:latest" "$TAG"
36+
TAG="${ghcraddr}/${component}:git-${BUILDKITE_COMMIT}-${arch}"
37+
docker tag "${ghcraddr}/${component}:latest-${arch}" "$TAG"
3738
echo "$TAG"
3839
fi
3940
done
@@ -48,21 +49,21 @@ if [ "$PUSH_GHCR" = true ]; then
4849
echo "--- docker push to ghcr"
4950
for component in "${components[@]}"
5051
do
51-
docker push "${ghcraddr}/${component}:latest"
52+
if [[ "${#BUILDKITE_COMMIT}" = 40 ]]; then
53+
# If the commit is 40 characters long, it's probably a SHA.
54+
TAG="${ghcraddr}/${component}:git-${BUILDKITE_COMMIT}-${arch}"
55+
docker push "$TAG"
56+
fi
5257
if [ "${BUILDKITE_SOURCE}" == "schedule" ] || [ "${BUILDKITE_SOURCE}" == "ui" ]; then
5358
# If this is a schedule/ui build, tag the image with the date.
54-
TAG="${ghcraddr}/${component}:nightly-${date}"
59+
TAG="${ghcraddr}/${component}:nightly-${date}-${arch}"
5560
docker push "$TAG"
5661
fi
5762
if [[ -n "${BUILDKITE_TAG}" ]]; then
5863
# If there's a tag, we tag the image.
59-
TAG="${ghcraddr}/${component}:${BUILDKITE_TAG}"
60-
docker push "$TAG"
61-
fi
62-
if [[ "${#BUILDKITE_COMMIT}" = 40 ]]; then
63-
# If the commit is 40 characters long, it's probably a SHA.
64-
TAG="${ghcraddr}/${component}:git-${BUILDKITE_COMMIT}"
64+
TAG="${ghcraddr}/${component}:${BUILDKITE_TAG}-${arch}"
6565
docker push "$TAG"
6666
fi
67+
docker push "${ghcraddr}/${component}:latest-${arch}"
6768
done
68-
fi
69+
fi

ci/scripts/multi-arch-docker.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
3+
# Exits as soon as any line fails.
4+
set -euo pipefail
5+
6+
date="$(date +%Y%m%d)"
7+
ghcraddr="ghcr.io/singularity-data"
8+
9+
components=(
10+
"risingwave"
11+
"compute-node"
12+
"meta-node"
13+
"frontend-node"
14+
"compactor-node"
15+
)
16+
17+
echo "--- ghcr login"
18+
echo "$GHCR_TOKEN" | docker login ghcr.io -u "$GHCR_USERNAME" --password-stdin
19+
20+
for component in "${components[@]}"
21+
do
22+
echo "--- multi arch image create : ${component}"
23+
if [[ "${#BUILDKITE_COMMIT}" = 40 ]]; then
24+
# If the commit is 40 characters long, it's probably a SHA.
25+
TAG="${ghcraddr}/${component}:git-${BUILDKITE_COMMIT}"
26+
docker manifest create --insecure "$TAG" \
27+
--amend "${ghcraddr}/${component}:latest-x86_64" \
28+
--amend "${ghcraddr}/${component}:latest-aarch64"
29+
docker manifest push --insecure "$TAG"
30+
fi
31+
32+
if [ "${BUILDKITE_SOURCE}" == "schedule" ] || [ "${BUILDKITE_SOURCE}" == "ui" ]; then
33+
# If this is a schedule/ui build, tag the image with the date.
34+
TAG="${ghcraddr}/${component}:nightly-${date}"
35+
docker manifest create --insecure "$TAG" \
36+
--amend "${ghcraddr}/${component}:latest-x86_64" \
37+
--amend "${ghcraddr}/${component}:latest-aarch64"
38+
docker manifest push --insecure "$TAG"
39+
fi
40+
41+
if [[ -n "${BUILDKITE_TAG}" ]]; then
42+
# If there's a tag, we tag the image.
43+
TAG="${ghcraddr}/${component}:${BUILDKITE_TAG}"
44+
docker manifest create --insecure "$TAG" \
45+
--amend "${ghcraddr}/${component}:latest-x86_64" \
46+
--amend "${ghcraddr}/${component}:latest-aarch64"
47+
docker manifest push --insecure "$TAG"
48+
fi
49+
50+
TAG="${ghcraddr}/${component}:latest"
51+
docker manifest create --insecure "$TAG" \
52+
--amend "${ghcraddr}/${component}:latest-x86_64" \
53+
--amend "${ghcraddr}/${component}:latest-aarch64"
54+
docker manifest push --insecure "$TAG"
55+
done

ci/workflows/docker.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@ projects:
22
- label: docker-pr
33
path: docker/
44
skip:
5-
- docker-build-push-main
6-
- docker-build-push-schedule-ui
7-
- label: docker-main
8-
path: docker/
9-
skip:
10-
- docker-build-pr
11-
- docker-build-push-schedule-ui
5+
- docker-build-push*
6+
- multi-arch-image-create-push
127
- label: docker-schedule-ui
138
path: .
149
skip:
1510
- docker-build-pr
16-
- docker-build-push-main
1711

1812
auto-retry: &auto-retry
1913
automatic:
@@ -31,9 +25,10 @@ steps:
3125
PUSH_GHCR: false
3226
retry: *auto-retry
3327

34-
- label: "docker-build-push-main"
28+
- label: "docker-build-push: amd64"
3529
command: "ci/scripts/docker.sh"
36-
if: build.branch == "main" && build.source != "schedule"
30+
key: "build-amd64"
31+
if: build.source == "schedule" || build.source == "ui"
3732
env:
3833
BUILDPIPE_SCOPE: project
3934
PUSH_GHCR: true
@@ -44,8 +39,9 @@ steps:
4439
GHCR_TOKEN: ghcr-token
4540
retry: *auto-retry
4641

47-
- label: "docker-build-push-schedule-ui"
42+
- label: "docker-build-push: aarch64"
4843
command: "ci/scripts/docker.sh"
44+
key: "build-aarch64"
4945
if: build.source == "schedule" || build.source == "ui"
5046
env:
5147
BUILDPIPE_SCOPE: project
@@ -55,4 +51,21 @@ steps:
5551
env:
5652
GHCR_USERNAME: ghcr-username
5753
GHCR_TOKEN: ghcr-token
54+
retry: *auto-retry
55+
agents:
56+
queue: "linux-arm64"
57+
58+
- label: "multi-arch-image-create-push"
59+
command: "ci/scripts/multi-arch-docker.sh"
60+
if: build.source == "schedule" || build.source == "ui"
61+
depends_on:
62+
- "build-amd64"
63+
- "build-aarch64"
64+
env:
65+
BUILDPIPE_SCOPE: project
66+
plugins:
67+
- seek-oss/aws-sm#v2.3.1:
68+
env:
69+
GHCR_USERNAME: ghcr-username
70+
GHCR_TOKEN: ghcr-token
5871
retry: *auto-retry

grafana/risingwave-dashboard.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)