Reputation: 1147
Is it possible to override the global before_script
with an empty before_script
within a job?
Upvotes: 67
Views: 35628
Reputation: 16477
You should use an empty array notation.
before_script:
- global before script
job:
before_script: []
script:
- test
Upvotes: 82
Reputation: 7360
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:
- ''
Upvotes: 91