From 5189a063f5fb44ce35c3dcc19328f734a11d228e Mon Sep 17 00:00:00 2001 From: "zhipeng.hu" Date: Thu, 10 Aug 2023 13:37:05 +0800 Subject: [PATCH] docker --- .drone.yml | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/.drone.yml b/.drone.yml index 4b127d0..400e473 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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" ]