How to override global before_script with empty before_script in job

Alexander Herold picture Alexander Herold · May 18, 2017 · Viewed 8.8k times · Source

Is it possible to override the global before_script with an empty before_script within a job?

Answer

rpadovani picture rpadovani · May 18, 2017

Yes, the local before_script overrides the global before_script. To keep the .yml sintax valid, use a command that does nothing.

before_script:
- global before script

job:
  before_script:
  - ''