Docker plugin: Error parsing reference: ":latest"

Hi there,

For somehow I can’t make the Docker plugin tag the image correctly, I have the following error:

Successfully built fec1d0d7e312
Successfully tagged 9fa03dcac5f62ca3cda02006b266fddfsed9ee41:latest
+ /usr/local/bin/docker tag 9fa03dcac5f62ca3cda02006b266fddfsed9ee41 :latest
Error parsing reference: ":latest" is not a valid repository/tag: invalid reference format
time="2019-06-16T12:43:38Z" level=fatal msg="exit status 1"

While using the following configuration:

build:
        image: plugins/docker
        settings:
            debug: true
            tags:
            - latest
            repo: registry.example.com/app
            username:
                from_secret: docker_username
            password:
                from_secret: docker_password
        when:
            branch: master
            event: push
        depends_on:
            - install

I tried also with the auto_tag: true I had the same error

The posted yaml is invalid. It mixes syntax from 1.0 and 0.8. Specifically, the settings section and depends_on section only available in 1.0 but the pipeline block is from 0.8. You should make sure you are running Drone 1.x and make sure your syntax matched the documented syntax [1][2]

[1] https://docs.drone.io/user-guide/pipeline/
[2] http://plugins.drone.io/drone-plugins/drone-docker/

@bradrydzewskim thank you man, you were right, I had to rewrite the yaml file to respect the 1.0 syntax, it’s working like a charm