Switch CI/CD to Gitea Actions and Gitea registry
This commit is contained in:
@@ -4,9 +4,12 @@ set -eu
|
||||
mode="${1:-all}"
|
||||
|
||||
build_rust() {
|
||||
image="$1"
|
||||
service="$1"
|
||||
package="$2"
|
||||
bin="$3"
|
||||
prefix="${IMAGE_PREFIX:-cloudlysis}"
|
||||
tag="${IMAGE_TAG:-dev}"
|
||||
image="${prefix}/${service}:${tag}"
|
||||
docker build \
|
||||
-f docker/Dockerfile.rust \
|
||||
--build-arg PACKAGE="$package" \
|
||||
@@ -18,20 +21,23 @@ build_rust() {
|
||||
}
|
||||
|
||||
build_ui() {
|
||||
image="$1"
|
||||
service="$1"
|
||||
prefix="${IMAGE_PREFIX:-cloudlysis}"
|
||||
tag="${IMAGE_TAG:-dev}"
|
||||
image="${prefix}/${service}:${tag}"
|
||||
docker build -f docker/Dockerfile.ui -t "$image" .
|
||||
}
|
||||
|
||||
build_platform() {
|
||||
build_rust cloudlysis/gateway:dev gateway gateway
|
||||
build_rust cloudlysis/aggregate:dev aggregate aggregate
|
||||
build_rust cloudlysis/projection:dev projection projection
|
||||
build_rust cloudlysis/runner:dev runner runner
|
||||
build_rust gateway gateway gateway
|
||||
build_rust aggregate aggregate aggregate
|
||||
build_rust projection projection projection
|
||||
build_rust runner runner runner
|
||||
}
|
||||
|
||||
build_control() {
|
||||
build_rust cloudlysis/control-api:dev api api
|
||||
build_ui cloudlysis/control-ui:dev
|
||||
build_rust control-api api api
|
||||
build_ui control-ui
|
||||
}
|
||||
|
||||
case "$mode" in
|
||||
|
||||
40
docker/scripts/push_images.sh
Normal file
40
docker/scripts/push_images.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
mode="${1:-all}"
|
||||
|
||||
push_image() {
|
||||
service="$1"
|
||||
prefix="${IMAGE_PREFIX:-cloudlysis}"
|
||||
tag="${IMAGE_TAG:-dev}"
|
||||
docker push "${prefix}/${service}:${tag}"
|
||||
}
|
||||
|
||||
push_platform() {
|
||||
push_image gateway
|
||||
push_image aggregate
|
||||
push_image projection
|
||||
push_image runner
|
||||
}
|
||||
|
||||
push_control() {
|
||||
push_image control-api
|
||||
push_image control-ui
|
||||
}
|
||||
|
||||
case "$mode" in
|
||||
platform)
|
||||
push_platform
|
||||
;;
|
||||
control)
|
||||
push_control
|
||||
;;
|
||||
all)
|
||||
push_platform
|
||||
push_control
|
||||
;;
|
||||
*)
|
||||
echo "usage: sh docker/scripts/push_images.sh [platform|control|all]" 1>&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user