1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- kind: pipeline
- type: docker
- name: kptTmrGroup
- clone:
- depth: 1
- disable: true
- steps:
- - name: clone
- image: alpine/git
- commands:
- - git clone -b develop http://kpt.kptyun.cn:3000/xuyiping/kpt-tmr-group.git
- - name: test
- image: golang:1.17
- commands:
- - cd /drone/src/kpt-tmr-group
- - go env -w GO111MODULE=on
- - go env -w GOPROXY=https://goproxy.cn,direct
- - go env -w CGO_ENABLED=0
- - go mod tidy -compat=1.17
- - go test `go list ./... | grep -v -E "mock|store|test|fake|cmd|bin|backend|google|logger|proto"` -coverprofile .cover.txt
- - go tool cover -func .cover.txt
- - rm .cover.txt
- - name: build
- image: plugins/docker
- volumes:
- - name: hosts
- path: /etc/hosts
- - name: docker-ca
- path: /etc/docker
- - name: dockersock
- path: /var/run/docker.sock
- settings:
- dockerfile: /drone/src/kpt-tmr-group/Dockerfile
- 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
- tags: [ 1.0.7,latest ]
- trigger:
- branch:
- include:
- - develop
- event:
- - merge
- volumes:
- - name: docker-ca
- host:
- path: /etc/docker
- - name: dockersock
- host:
- path: /var/run/docker.sock
|