Disable globally defined services and before_script for a specific job

Hi all,

In gitlab-ci.yml, for a particular job how to disable the globally defined services and before_script? All my other jobs are using the docker:dind service, but I need one to only execute a shell script.

I’m digging up this question, but the answer could help someone.
To do this you need to overide each globally defined value for your specific job.

For exemple :

  image: docker:stable
    - docker:dind

  image: node:8-alpine
  services: []

Also, globally defined is deprecated now, you should use default parameters, like in my exemple above.