소스 검색

update ppctl

scofield 5 년 전
부모
커밋
481eada942
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      .drone.yml
  2. 2 1
      ppctl.py

+ 1 - 1
.drone.yml

@@ -10,7 +10,7 @@ steps:
    environment:
      JNLP_ENV: qa
      JNLP_REPO: hub.evbj.easou.com
-     JNLP_TAG: v1.0.3
+     JNLP_TAG: v1.0.4
      JNLP_CONTAINER_PORT: 8080
     #  JNLP_WAR: ums.war
      JNLP_INGRESS: nginx

+ 2 - 1
ppctl.py

@@ -36,6 +36,7 @@ NGINX_PORT = os.getenv('JNLP_CONTAINER_PORT')
 RECORD_NAME = os.getenv('JNLP_ENV') + "-" + os.getenv('DRONE_REPO_NAME')
 INGRESS_LIST = ["10.26.30.12", "10.26.29.54", "10.26.30.102", "10.26.30.13"]
 NGINX_RECORD_IP = random.sample(INGRESS_LIST, 1)[0]
+DOMAINNAME = os.getenv('JNLP_DOMAIN').strip('.')
 
 
 # 生成deploy.yaml文件
@@ -182,7 +183,7 @@ def cloudDns():
         request.set_Value(NGINX_RECORD_IP)
         request.set_Type("A")
         request.set_RR(RECORD_NAME)
-        request.set_DomainName(JNLP_DOMAIN)
+        request.set_DomainName(DOMAINNAME)
         response = client.do_action_with_exception(request)
         print(response)
     else :