Cannot configure both commands and custom attributes [default_tag]

Hi Team,

I am new to drone CI/CD, currently i am creating docker images locally when there is any event is happened in the repository(push), but i am unable to create tags while while creating images and currently the images we are storing in our local machine only. The builds will happened everyday when there is any event. i want to create create new image with “Tag”, Every time there is any event.

Below is the my .drone.yml file.

pipeline:
build:
image: docker
commands:
- docker build -t testimage .
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: push

Please help in this.

Thanks
Sravan

pipeline:
  build:
    image: docker
    commands:
      - docker build -t testimage .
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    when:
      event: push

Are you sure this is your entire pipeline in .drone.yml?
I typically see this error when someone configures boht a commands: section and other parameters that are used for plugins.

Furthermore, I assume you followed the instructions for volumes here: http://docs.drone.io/docker-volumes/#app-drawer ?

Thanks for the response. As of now we doing testing part itself.
In the upcoming days we are going to use in production part.
I have some queries in Drone.io like, currently we are using single repository, inside that we we have different projects, for example i am using x,y.z folders and i did changes in the x folder and i want to create docker image for x itself and start docker container as a x itself.
is there anyway to this.

Please let me know.

Thanks
Sravan

Came across the same error,

I was trying to add commands for testing py.test

This error message indicates a problem with your yaml. It happens when you try to use a yaml attribute that is invalid or unrecognized or unsupported by drone. Feel free to post your actual yaml file if you would like help identifying the configuration issue.