[solved] .drone.yml parse error

hello drone ci is giving me a 400(the webhook request)error whenever I commit something I think it’s mainly the formate that is wrong so here it is

I should use cache secrets and when features next but I can’t even get it to run probably first

build:
  image: node:boron
  commands:
    - npm install -g node-gyp
    - npm update # Update your personal npm local repository again.
    - npm install
    - npm run setup
    - npm run test
  environment:
    - EXAM_SERVER_URL=http://S8.dummy.com:3500
    - FETCH_SERVER_FETCH_API="/someAPI?email="
    - TOKEN_SECRET=thisIsTheSecret
    - DB_HOST=localhost
    - DB_USER=root
    - DB_PASSWORD=dbPassword
    - DB_NAME=dbName

  compose:
    database:
      image:mysql:5.6
      environment:
       - MYSQL_ROOT_PASSWORD=dbPassword
       - MYSQL_DATABASE=dbName

what is the error message and what version of drone are you using?

This is because your yaml file is invalid. You can use a generic yaml validation tool to see you have written a yaml file that cannot be parsed:
http://yaml-online-parser.appspot.com/

The yaml validation tool linked above produces the following error for your yaml:

ERROR:

mapping values are not allowed here
  in "<unicode string>", line 21, column 18:
          environment:
                     ^

I believe this is your problem:

  compose:
    database:
-     image:mysql:5.6
+     image: mysql:5.6
      environment:
       - MYSQL_ROOT_PASSWORD=dbPassword
       - MYSQL_DATABASE=dbName

I’m using version 0.4
yes you are right thanks :slight_smile: