How to override global before_script with empty before_script in work

Is it possible to override global before_scriptwith empty before_scriptin task?

+17
source share
2 answers

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

before_script:
- global before script

job:
  before_script:
  - ''
+29
source

You must use an empty array entry.

before_script:
- global before script

job:
  before_script: []
  script:
  - test
+20
source

Source: https://habr.com/ru/post/1677443/


All Articles