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.

65 lines
1.9 KiB

3 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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:1.17-alpine3.15
  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: [ "test","pre" ]
  22. #
  23. # - name: docker-build
  24. # image: plugins/docker
  25. # privileged: true
  26. # settings:
  27. # username: tjqmhu
  28. # password: tjqm4912
  29. # repo: registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone
  30. # dockerfile: Dockerfile
  31. # registry: https://registry.cn-hangzhou.aliyuncs.com
  32. # tags: ${DRONE_BUILD_NUMBER}
  33. # when:
  34. # target: [ "test","pre" ]
  35. # - name: rancher-push
  36. # privileged: true
  37. # image: registry.cn-hangzhou.aliyuncs.com/hvp/dpr:55 # 直接用busybox
  38. # settings:
  39. ## docker_img : registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:${DRONE_BUILD_NUMBER}
  40. # tar : test-drone-${DRONE_BUILD_NUMBER}.tar
  41. # commands:
  42. # - podman ps
  43. # - docker login --username=tjqmhu -p "tjqm4912" registry.cn-hangzhou.aliyuncs.com
  44. # - docker pull registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:${DRONE_BUILD_NUMBER}
  45. # - docker save registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:${DRONE_BUILD_NUMBER} >test-drone-${DRONE_BUILD_NUMBER}.tar
  46. # when:
  47. # target: [ "test","pre" ]
  48. - name: rancher-deploy
  49. privileged: true
  50. image: registry.cn-hangzhou.aliyuncs.com/hvp/dpr:66 #直接用busybox
  51. settings:
  52. docker_img: registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:113
  53. # username: docker-push
  54. # password: WeWlh6hGYCtxO4r
  55. # registry: https://repository.241210.com
  56. # username: tjqmhu
  57. # password: tjqm4912
  58. # registry: https://registry.cn-hangzhou.aliyuncs.com
  59. # when:
  60. # target: [ "test","pre" ]