drone-plugins/drone-docker

docker tag error

alicfeng opened this issue · 1 comments

this is my drone cfg file

  build-image:
    image: plugins/docker
    settings:
      username: xxx
      password: xxx
      repo: hub.tencentyun.com/demo/demo
      registry: hub.tencentyun.com
      auto_tag: true

this is log of build


Successfully built 5d04116214ed
--
121 | Successfully tagged 70d59f669462fe60775c9c220f42ab9daafa8afa:latest
122 | + /usr/local/bin/docker tag 70d59f669462fe60775c9c220f42ab9daafa8afa :latest
123 | Error parsing reference: ":latest" is not a valid repository/tag: invalid reference format
124 | time="2020-09-19T03:16:19Z" level=fatal msg="exit status 1"


I think the program's variable of repo is nil

the docker image info that

~ docker pull plugins/docker
Using default tag: latest
latest: Pulling from plugins/docker
Digest: sha256:60f36379eb3f1b27a61f7c0a275dd260387a00af1144345976475b2a35e5ee4f
Status: Image is up to date for plugins/docker:latest
docker.io/plugins/docker:latest

The yaml configuration file you posted is invalid. It combines syntax from the 0.8 yaml specification and the 1.0 specification, creating a new, invalid syntax. You should make sure you are using Drone 1.x or higher (0.8.x is end of life) and you should make sure you are using the 1.x syntax. You can see an example of the 1.x syntax in the official docker plugin documentation at http://plugins.drone.io/drone-plugins/drone-docker/