diff --git a/.gitignore b/.gitignore index 84c8b6a..d573fc6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,4 @@ test_case/test_auto_case test_scenario config/settings_local.py env/dev.yml -env/osredm.yml -env/test.yaml \ No newline at end of file +env/osredm.yml \ No newline at end of file diff --git a/dockerfile b/dockerfile index 1fcacfe..0ecbe84 100644 --- a/dockerfile +++ b/dockerfile @@ -1,14 +1,14 @@ FROM python:3.9 -# 内网代理(如可直接连接外网,这三行可注释) -ENV http_proxy=http://172.20.32.253:3128 -ENV https_proxy=http://172.20.32.253:3128 -ENV no_proxy=localhost,127.0.0.1,172.20.32.0/24 +# 使用国内镜像源(debian 镜像源) +RUN sed -i s:/deb.debian.org:/mirrors.tuna.tsinghua.edu.cn:g /etc/apt/sources.list.d/* + #设置时区 RUN echo "Asia/Shanghai" > /etc/timezone -RUN apt-get update +# 安装JDK +RUN apt-get update && apt-get install -y default-jdk # 安装git RUN apt-get install -y git @@ -27,4 +27,9 @@ RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv RUN pipenv install # 运行 -CMD ["pipenv", "run", "python", "run.py"] \ No newline at end of file +CMD ["pipenv", "run", "python", "run.py"] + +# 构建docker镜像: docker build -f dockerfile -t apitest:2.0 . +# 删除docker镜像:docker rmi -f apitest:2.0 +# 运行docker镜像:docker run --rm --name apitest apitest:2.0 +# 进入容器内部:docker exec -it apitest /bin/bash \ No newline at end of file diff --git a/env/test.yaml b/env/test.yaml new file mode 100644 index 0000000..7933d57 --- /dev/null +++ b/env/test.yaml @@ -0,0 +1,38 @@ +host: http://172.20.32.203:4000 +wiki_host: +pms_host: +glcc_host: +remote_url: +remote_username: +remote_password: +ace_key: 59c96c3572ab8cc1 +green_code: +env_super_login: innov +env_super_password: 12345678 +env_super_user_id: 1 +env_login: floraachy +env_password: 12345678 +env_nickname: floraachy +env_user_id: 5 +t_login: reporter +t_password: 12345678 +t_nickname: reporter +t_user_id: 111 +env_pms_product_id: +env_pms_product_identifier: +env_pms_project_id: +env_enterprise_identifier: +env_enterprise_id: +env_organization_id: +env_dept_id: +db_info: + db_host: + db_port: + db_user: + db_pwd: + db_database: + ssh: + ssh_host: + ssh_port: + ssh_user: + ssh_pwd: \ No newline at end of file