Commit 6c03dda9 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

chore: 在同步和构建过程中排除pyc文件

parent 9587759c
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -110,15 +110,15 @@ build:
	echo "[$$(($$total+2))/$${total_imgs}] Building API Gateway Image ($(TARGET_API_GATEWAY))..."; \
		if [ -d "../external/csst-dfs-client" ]; then \
				mkdir -p ./api_gateway/csst-dfs-client; \
				rsync -a --delete --exclude ".git" --exclude "__pycache__" ../external/csst-dfs-client/ ./api_gateway/csst-dfs-client/; \
				rsync -a --delete --exclude ".git" --exclude "__pycache__" --exclude "*.pyc" ../external/csst-dfs-client/ ./api_gateway/csst-dfs-client/; \
		fi; \
		if [ -d "../external/ccds" ]; then \
				mkdir -p ./api_gateway/ccds; \
				rsync -a --delete --exclude ".git" --exclude "__pycache__" ../external/ccds/ ./api_gateway/ccds/; \
				rsync -a --delete --exclude ".git" --exclude "__pycache__" --exclude "*.pyc" ../external/ccds/ ./api_gateway/ccds/; \
		fi; \
		if [ -d "../external/csst-dag" ]; then \
				mkdir -p ./api_gateway/csst-dag; \
				rsync -a --delete --exclude ".git" --exclude "__pycache__" ../external/csst-dag/ ./api_gateway/csst-dag/; \
				rsync -a --delete --exclude ".git" --exclude "__pycache__" --exclude "*.pyc" ../external/csst-dag/ ./api_gateway/csst-dag/; \
		fi; \
	docker build $(DOCKER_BUILD_FLAGS) $(API_GATEWAY_BUILD_ARGS) -t $(TARGET_API_GATEWAY) ./api_gateway; \
	echo "[$$(($$total+3))/$${total_imgs}] Building Worker Stats Agent Image ($(TARGET_WORKER_STATS_AGENT))..."; \
@@ -129,7 +129,7 @@ build:
		echo "[$$(($$total+5))/$${total_imgs}] Building JS9 Image ($(TARGET_JS9))..."; \
		if [ -d "../external/js9" ]; then \
				mkdir -p ./external/js9; \
				rsync -a --delete --exclude ".git" --exclude "__pycache__" ../external/js9/ ./external/js9/; \
				rsync -a --delete --exclude ".git" --exclude "__pycache__" --exclude "*.pyc" ../external/js9/ ./external/js9/; \
		fi; \
		docker build $(DOCKER_BUILD_FLAGS) -t $(TARGET_JS9) -f ./js9_service/Dockerfile .; \
	fi; \
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@
        rsync_opts:
          - "--exclude=.git"
          - "--exclude=__pycache__"
          - "--exclude=*.pyc"
          - "--exclude=volumes/logs/*"
          - "--exclude=volumes/pg_data/*"
          - "--exclude=volumes/es_data/*"
@@ -64,6 +65,7 @@
        recursive: yes
        rsync_opts:
          - "--exclude=__pycache__"
          - "--exclude=*.pyc"

    - name: Ensure volume directories exist
      file:
+2 −1
Original line number Diff line number Diff line
@@ -21,3 +21,4 @@
        recursive: yes
        rsync_opts:
          - "--exclude=__pycache__"
          - "--exclude=*.pyc"
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@
        rsync_opts:
          - "--exclude=.git"
          - "--exclude=__pycache__"
          - "--exclude=*.pyc"
          - "--exclude=volumes/logs/*"
          - "--exclude=volumes/pg_data/*"
          - "--exclude=volumes/es_data/*"
@@ -59,6 +60,7 @@
        recursive: yes
        rsync_opts:
          - "--exclude=__pycache__"
          - "--exclude=*.pyc"

- name: Update Master Node Services
  hosts: master