Prechádzať zdrojové kódy

cattle_category: 增加所有畜牧类型

Yi 1 rok pred
rodič
commit
366a3f517d
2 zmenil súbory, kde vykonal 90 pridanie a 13 odobranie
  1. 89 12
      .drone.yml
  2. 1 1
      module/backend/pasture_service.go

+ 89 - 12
.drone.yml

@@ -1,16 +1,8 @@
 kind: pipeline
 type: docker
-name: kptTmrGroup
+name: test
 
-clone:
-  depth: 1
-  disable: true
 steps:
-  - name: clone
-    image: alpine/git
-    commands:
-      - git clone -b develop http://192.168.1.8:3000/xuyiping/kpt-tmr-group.git
-      - cp -R kpt-tmr-group/* ./
   - name: build
     image: plugins/docker:20.14.2
     volumes:
@@ -28,16 +20,101 @@ steps:
         from_secret: aliyuncs_password
       repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/kpt-tmr-group
       registry: registry.cn-hangzhou.aliyuncs.com
-      tags: [ 1.0.3,latest ]
-
+      tags: [ test ]
+  - name: ssh commands
+    image: appleboy/drone-ssh
+    settings:
+      host: 192.168.1.70
+      username: tmrwatch
+      password:
+        from_secret: ssh_password
+      port: 22
+      script:
+        - cd /data/docker-compose/kpt-tmr-group/
+        - echo "123456" | ./restart.sh
 trigger:
   branch:
     include:
-    - develop
+    - feature/*
   event:
     include:
     - push
+volumes:
+  - name: docker-ca
+    host:
+      path: /etc/docker
+  - name: docker-sock
+    host:
+      path: /var/run/docker.sock
+---
+kind: pipeline
+type: docker
+name: product
+steps:
+  - name: build
+    image: plugins/docker:20.14.2
+    volumes:
+      - name: hosts
+        path: /etc/hosts
+      - name: docker-ca
+        path: /etc/docker
+      - name: docker-sock
+        path: /var/run/docker.sock
+    settings:
+      username:
+        from_secret: aliyuncs_username
+      password:
+        from_secret: aliyuncs_password
+      repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/kpt-tmr-group
+      registry: registry.cn-hangzhou.aliyuncs.com
+      tag:
+        - latest
+        - ${DRONE_BRANCH##release/}
+trigger:
+  branch:
+    include:
+      - release/*
+  event:
+    include:
+      - push
+volumes:
+  - name: docker-ca
+    host:
+      path: /etc/docker
+  - name: docker-sock
+    host:
+      path: /var/run/docker.sock
+---
+kind: pipeline
+type: docker
+name: fix
 
+steps:
+  - name: build
+    image: plugins/docker:20.14.2
+    volumes:
+      - name: hosts
+        path: /etc/hosts
+      - name: docker-ca
+        path: /etc/docker
+      - name: docker-sock
+        path: /var/run/docker.sock
+    settings:
+      username:
+        from_secret: aliyuncs_username
+      password:
+        from_secret: aliyuncs_password
+      repo: registry.cn-hangzhou.aliyuncs.com/kpt-event/kpt-tmr-group
+      registry: registry.cn-hangzhou.aliyuncs.com
+      tag:
+        - latest
+trigger:
+  branch:
+    include:
+      - fix/*
+  event:
+    include:
+      - push
 volumes:
   - name: docker-ca
     host:

+ 1 - 1
module/backend/pasture_service.go

@@ -770,7 +770,7 @@ func (s *StoreEntry) ForageEnumList(ctx context.Context) *operationPb.ForageEnum
 	res.Data.CattleParentCategory = append(res.Data.CattleParentCategory,
 		&operationPb.CattleParentCategoryEnum{
 			Value: operationPb.CattleCategoryParent_INVALID,
-			Label: "畜牧类别",
+			Label: "所有类别",
 		},
 		&operationPb.CattleParentCategoryEnum{
 			Value: operationPb.CattleCategoryParent_LACTATION_CAW,