You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. ---
  2. kind: pipeline
  3. type: docker
  4. name: default
  5. volumes:
  6. - name: gopath
  7. host:
  8. path: /usr/local/path/gopath
  9. steps:
  10. # - name: golang-build
  11. # image: golang
  12. # volumes:
  13. # - name: gopath
  14. # path: /go
  15. # commands:
  16. # - export GOPROXY=https://goproxy.cn
  17. # - go mod init test-drone
  18. # - go mod tidy
  19. # - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o test-drone
  20. # when:
  21. # target: [ "" ]
  22. #
  23. # - name: docker-push
  24. # image: plugins/docker
  25. # settings:
  26. # username: tjqmhu
  27. # password: tjqm4912
  28. # repo: registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone
  29. # dockerfile: Dockerfile
  30. # registry: https://registry.cn-hangzhou.aliyuncs.com
  31. # tags: ${DRONE_BUILD_NUMBER}
  32. # when:
  33. # target: [ "" ]
  34. - name: rancher-deploy
  35. image: registry.cn-hangzhou.aliyuncs.com/hvp/dpr:2 # 直接用busybox
  36. settings:
  37. url: www.baidu.com/services
  38. pname: huvipg
  39. #
  40. # - name: deploy-prod
  41. # image: repository.241210.com/repository/base/kubectl:4
  42. # commands:
  43. # - kubectl --kubeconfig /kube/${CI_BUILD_TARGET} apply -f deployment.yaml
  44. # when:
  45. # target: [ "pre","prod" ]