加入自动集成部署
This commit is contained in:
31
.gitlab-ci.yml
Normal file
31
.gitlab-ci.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
stages:
|
||||||
|
- deploy #运行的类型,有
|
||||||
|
|
||||||
|
|
||||||
|
api: #随意填写,起标示作用
|
||||||
|
stage: deploy #和上述的类型对应
|
||||||
|
|
||||||
|
only:
|
||||||
|
- develop #指定触发分支
|
||||||
|
|
||||||
|
script:
|
||||||
|
- pwd
|
||||||
|
- docker stop auto-custom-clibrary-api || true && docker rm auto-custom-clibrary-api || true
|
||||||
|
- cd docker/api
|
||||||
|
- docker-compose build
|
||||||
|
- docker-compose up -d
|
||||||
|
|
||||||
|
|
||||||
|
cli: #随意填写,起标示作用
|
||||||
|
stage: deploy #和上述的类型对应
|
||||||
|
|
||||||
|
only:
|
||||||
|
- develop #指定触发分支
|
||||||
|
|
||||||
|
script:
|
||||||
|
- pwd
|
||||||
|
- docker stop auto-custom-clibrary-cli || true && docker rm auto-custom-clibrary-cli || true
|
||||||
|
- cd docker/cli
|
||||||
|
- docker-compose build
|
||||||
|
- docker-compose up -d
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
*** Variables ***
|
*** Variables ***
|
||||||
#登录类型:api | cli | ${None}(tsg mib) | 未指定,默认为ui
|
#登录类型:api | cli | ${None}(tsg mib) | 未指定,默认为ui
|
||||||
${loginType} api
|
${loginType} api
|
||||||
#执行环境是否Widonws
|
#执行环境是否Widonws
|
||||||
${systemType} Windows
|
${systemType} Linux
|
||||||
#API配置信息
|
#API配置信息
|
||||||
${host} 192.168.40.120
|
${host} 192.168.40.120
|
||||||
${port} 8080
|
${port} 8080
|
||||||
@@ -15,7 +15,7 @@ ${password} 111111
|
|||||||
${encodePassword} ${EMPTY}
|
${encodePassword} ${EMPTY}
|
||||||
${token} ${EMPTY}
|
${token} ${EMPTY}
|
||||||
#[Documentation] 测试终端IP统一配置
|
#[Documentation] 测试终端IP统一配置
|
||||||
${testClentIP} 192.168.50.2
|
${testClentIP} 192.168.41.68
|
||||||
${testSubscriberID} $test2
|
${testSubscriberID} $test2
|
||||||
#自动化标签
|
#自动化标签
|
||||||
${userTagIds} ${EMPTY}
|
${userTagIds} ${EMPTY}
|
||||||
@@ -26,7 +26,7 @@ ${addTestClentIPFlag} 1
|
|||||||
${policyVerificationSleepSeconds} 20
|
${policyVerificationSleepSeconds} 20
|
||||||
#策略验证后到验证策略日志需等待时间
|
#策略验证后到验证策略日志需等待时间
|
||||||
${policyLogVerificationSleepSeconds} 60
|
${policyLogVerificationSleepSeconds} 60
|
||||||
${path} E:/auto_git/eclipsegit/tsg_autotest/05-Other/
|
${path} /usr/src/python/autotsg/05-Other
|
||||||
${curlbatpath} ${path}/curl/
|
${curlbatpath} ${path}/curl/
|
||||||
${mailpath} ${path}/mail/
|
${mailpath} ${path}/mail/
|
||||||
${responsePageFiles} ${path}/response_pages_files/
|
${responsePageFiles} ${path}/response_pages_files/
|
||||||
@@ -59,4 +59,4 @@ ${snmpCommunity} public
|
|||||||
# SNMP服务测试变量[end]
|
# SNMP服务测试变量[end]
|
||||||
#API配置信息
|
#API配置信息
|
||||||
${oamHost} 192.168.40.210
|
${oamHost} 192.168.40.210
|
||||||
${oamPort} 50080
|
${oamPort} 50080
|
||||||
14
docker/api/docker-compose.yml
Normal file
14
docker/api/docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
version: '3.1'
|
||||||
|
services:
|
||||||
|
auto-custom-clibrary:
|
||||||
|
image: 192.168.41.68/robotframework/auto-custom-clibrary:3.0
|
||||||
|
restart: always
|
||||||
|
container_name: auto-custom-clibrary-api
|
||||||
|
environment:
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
working_dir: /usr/src/python
|
||||||
|
command: robot -i tsg_bf_api -d 0618/ autotsg
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- /home/autotsg-gao:/usr/src/python
|
||||||
|
- /home/autotsg-gao/apilogs:/usr/src/python/0609
|
||||||
16
docker/cli/docker-compose.yml
Normal file
16
docker/cli/docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
version: '3.1'
|
||||||
|
services:
|
||||||
|
auto-custom-clibrary:
|
||||||
|
image: 192.168.41.68/robotframework/auto-custom-clibrary:3.0
|
||||||
|
restart: always
|
||||||
|
container_name: auto-custom-clibrary-cli
|
||||||
|
environment:
|
||||||
|
TZ: Asia/Shanghai
|
||||||
|
working_dir: /usr/src/python
|
||||||
|
environment:
|
||||||
|
- loginType:cli
|
||||||
|
command: robot -i tsg_device -d 0618/ autotsg
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- /home/autotsg-gao:/usr/src/python
|
||||||
|
- /home/autotsg-gao/logs:/usr/src/python/0609
|
||||||
Reference in New Issue
Block a user