Skip to content

Commit e5ae0c3

Browse files
qsliu2017kagaya85unknownzhongyuanzhao000xywu
authored
Release 0.2.0 (FudanSELab#162)
* add log of admin [order route travel] service * feat add admin order/route/travel/user auth basic user service log * feat add Config Consign/Price/Execute/Food/Payment Service log * add rest logs * add REPO var * fix 调整部分测试用例 * fix 修改了k8s部署文件镜像到kagaya85 * feat 增加NODE_IP环境变量注入 * modify header to null * food,inside,order,order-other的head修改为null * by fzq * remove headers from ts-consign-price-service、ts-consign-service、ts-contacts-service、ts-execute-service、ts-food-map-service * delete headers * delete headers * update HttpEntityconstructor in travel2,user,vcode and voucher * modify header * modify base image * remove jaeger * add agent * update header * Revert: modify header (a2723d2) * Revert: delete headers (d76fcf7) * Revert: food,inside,order,order-other的head修改为null (7c6c317) * Revert: remove headers from ts-consign-service(fc4f90c) * add sw_ctx * modify part2.yml * modify part3.yml * modify part2.yml: increase cpu and memory * add build_upload_image.py * add authorization header in cancelFromOrder * add authorization header in drawbackmoney * add authorization header in ts-cancel-service * test "data not null" in ts-cancel-service * move "order.setStatus" to the method inside. * add async call in some services using rabbitmq * bugfix(ui):fix the food bug,default food type is 0 * fix bugs in ts-rebook-service: add authorization header * fix log format * Add async call using rabbitmq. (FudanSELab#1) Modify ts-food-service , send food order info by mq to delivery service now. Add ts-delivery-service. Modify preserve and preserve-other service's send mail part into async Modify ts-notification-service, it pull emails from mq and then send it Modify K8s deploy files * using images in docker hub * remove skywalking from docker images * remove skywalking settings in dockerfile * remove developers' image repo in config files * remove logback.xml * using offical rabbitmq image Co-authored-by: Kagaya <kagaya85@outlook.com> Co-authored-by: unknown <20212010004@fudan.edu.cn> Co-authored-by: zhongyuanzhao000 <zhongyuanzhao000@gmail.com> Co-authored-by: zhongyuanzhao000 <39431731+zhongyuanzhao000@users.noreply.github.com> Co-authored-by: xywu <xiya.wu@foxmail.com> Co-authored-by: HumbertZhang <504490160@qq.com> Co-authored-by: z__cx <20110240036@fudan.edu.cn> Co-authored-by: LeBW <27091925@qq.com> Co-authored-by: AkasakaIsami <akasaka0623@163.com> Co-authored-by: WangShang <1005284123@qq.com> Co-authored-by: Humbert Zhang <humbertzk@gmail.com>
1 parent 813dd01 commit e5ae0c3

File tree

193 files changed

+3554
-2027
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+3554
-2027
lines changed

.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# define env config
2-
NAMESPACE=codewisdom
3-
TAG=0.1.0
2+
IMG_REPO=codewisdom
3+
IMG_TAG=0.2.0

build_upload_image.py

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import os
2+
3+
PREFIX = "codewisdom"
4+
VERSION = "0.2.0"
5+
6+
base_path = os.getcwd()
7+
build_paths = []
8+
9+
10+
def main():
11+
if not mvn_build():
12+
print("mvn build failed")
13+
init_docker_build_paths()
14+
# docker_login()
15+
docker_build_and_push()
16+
17+
18+
def mvn_build():
19+
mvn_status = os.system("mvn clean package -DskipTests")
20+
return mvn_status == 0
21+
22+
23+
def init_docker_build_paths():
24+
list_paths = os.listdir(os.getcwd())
25+
for p in list_paths:
26+
if os.path.isdir(p):
27+
if(p.startswith("ts-")):
28+
build_path=base_path + "/" + p
29+
build_paths.append(build_path)
30+
31+
32+
def docker_login():
33+
username = os.getenv("DOCKER_USERNAME")
34+
docker_hub_address = os.getenv("DOCKER_HUB_ADDRESS") or "registry.cn-hangzhou.aliyuncs.com"
35+
print(f"[DOCKER HUB LOGIN] login username:{username} address:{docker_hub_address}")
36+
print(f"[DOCKER HUB LOGIN] You should input your root password first and then dockerhub password")
37+
docker_login = os.system(f"sudo docker login --username={username} {docker_hub_address}")
38+
if not docker_login:
39+
print("docker login failed")
40+
41+
42+
def docker_build_and_push():
43+
for build_path in build_paths:
44+
image_name = build_path.split("/")[-1]
45+
46+
os.chdir(build_path)
47+
files = os.listdir(build_path)
48+
if "Dockerfile" in files:
49+
docker_build = os.system(f"sudo docker build . -t {PREFIX}/{image_name}:{VERSION}")
50+
if docker_build != 0:
51+
print("[FAIL]" + image_name + " build failed.")
52+
else:
53+
print("[SUCCESS]" + image_name + " build success.")
54+
55+
docker_push = os.system(f"sudo docker push {PREFIX}/{image_name}:{VERSION}")
56+
if docker_push != 0:
57+
print("[FAIL]" + image_name + " push failed.")
58+
else:
59+
print("[SUCCESS]" + image_name + " push success.")
60+
61+
62+
if __name__ == '__main__':
63+
main()
64+

0 commit comments

Comments
 (0)