Skip to content

Commit

Permalink
chore(frontend):add push auto image in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
xudaotutou committed Jul 20, 2023
1 parent 65bbb4f commit f34582a
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 12 deletions.
10 changes: 9 additions & 1 deletion frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,19 @@ buildTargets := \
providers/costcenter \
providers/dbprovider \
providers/applaunchpad \
providers/imagehub
providers/imagehub

buildTargets-all := $(addprefix image-build-,$(buildTargets))
pushTargets-all := $(addprefix image-push-,$(buildTargets))
$(foreach target,$(buildTargets),$(eval .PHONY: image-build-$($(target))))
$(foreach target,$(buildTargets),$(eval .PHONY: image-push-$($(target))))
$(foreach target,$(buildTargets),$(eval .PHONY: dev-$($(target))))
$(foreach target,$(buildTargets),$(eval .PHONY: build-$($(target))))
.PHONY: all dev-desktop image-prebuild

all: image-prebuild $(buildTargets-all)

push-images: image-prebuild $(pushTargets-all)
fetch-deps: pnpm-lock.yaml
pnpm fetch
build-packages: fetch-deps
Expand All @@ -64,4 +67,9 @@ image-build-providers/%: image-prebuild
docker build -t $(imageOwner)sealos-$*:dev --build-arg path=providers/$* --build-arg name=$* .
image-build-%: image-prebuild
docker build -t $(imageOwner)sealos-$*:dev --build-arg path=$* --build-arg name=$* .

image-push-providers/%: image-build-providers/%
docker push $(imageOwner)sealos-$*:dev
image-push-%: image-build-%
docker push $(imageOwner)sealos-$*:dev
# Default target to run all builds.
2 changes: 1 addition & 1 deletion frontend/READMD.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sh frontend/scripts/initFormat.sh

```bash
# dev
echo '34.96.232.236 apiserver.cluster.local' | sudo tee -a /etc/hosts
echo '35.220.145.199 apiserver.cluster.local' | sudo tee -a /etc/hosts
# io
echo '35.240.227.100 apiserver.cluster.local' | sudo tee -a /etc/hosts
# cn
Expand Down
66 changes: 56 additions & 10 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f34582a

Please sign in to comment.