|
|
@ -19,11 +19,12 @@ steps: |
|
|
|
- go mod init test-drone |
|
|
|
- go mod tidy |
|
|
|
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o test-drone |
|
|
|
when: |
|
|
|
target: [ "test","pre" ] |
|
|
|
# when: |
|
|
|
# target: [ "test","pre" ] |
|
|
|
|
|
|
|
- name: docker-build |
|
|
|
image: plugins/docker |
|
|
|
privileged: true |
|
|
|
settings: |
|
|
|
username: tjqmhu |
|
|
|
password: tjqm4912 |
|
|
@ -31,8 +32,10 @@ steps: |
|
|
|
dockerfile: Dockerfile |
|
|
|
registry: https://registry.cn-hangzhou.aliyuncs.com |
|
|
|
tags: ${DRONE_BUILD_NUMBER} |
|
|
|
when: |
|
|
|
target: [ "test","pre" ] |
|
|
|
# when: |
|
|
|
# target: [ "test","pre" ] |
|
|
|
commands: |
|
|
|
- docker ps |
|
|
|
|
|
|
|
|
|
|
|
# - name: rancher-push |
|
|
@ -45,17 +48,17 @@ steps: |
|
|
|
# - docker login --username=tjqmhu -p "tjqm4912" registry.cn-hangzhou.aliyuncs.com |
|
|
|
# - docker pull registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:${DRONE_BUILD_NUMBER} |
|
|
|
# - docker save registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:${DRONE_BUILD_NUMBER} >test-drone-${DRONE_BUILD_NUMBER}.tar |
|
|
|
- name: rancher-deploy |
|
|
|
privileged: true |
|
|
|
image: registry.cn-hangzhou.aliyuncs.com/hvp/dpr:53 # 直接用busybox |
|
|
|
settings: |
|
|
|
docker_img: registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:${DRONE_BUILD_NUMBER} |
|
|
|
# username: docker-push |
|
|
|
# password: WeWlh6hGYCtxO4r |
|
|
|
# registry: https://repository.241210.com |
|
|
|
username: tjqmhu |
|
|
|
password: tjqm4912 |
|
|
|
registry: https://registry.cn-hangzhou.aliyuncs.com |
|
|
|
when: |
|
|
|
target: [ "test","pre" ] |
|
|
|
# - name: rancher-deploy |
|
|
|
# privileged: true |
|
|
|
# image: registry.cn-hangzhou.aliyuncs.com/hvp/dpr:53 # 直接用busybox |
|
|
|
# settings: |
|
|
|
# docker_img: registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:${DRONE_BUILD_NUMBER} |
|
|
|
## username: docker-push |
|
|
|
## password: WeWlh6hGYCtxO4r |
|
|
|
## registry: https://repository.241210.com |
|
|
|
# username: tjqmhu |
|
|
|
# password: tjqm4912 |
|
|
|
# registry: https://registry.cn-hangzhou.aliyuncs.com |
|
|
|
# when: |
|
|
|
# target: [ "test","pre" ] |
|
|
|
|