Before_script repeated for each job. Should it not be execute once only?

Hello,

According to the documentation [1] we can use before_script “To avoid running the same script multiple times across your jobs”. I have 4 stages with one job each [2], however the before_script is repeated for
each of the jobs. See for example:

Did I misinterpret the documentation or am I doing something wrong?

TIA

  1. https://docs.gitlab.com/ee//user/project/pages/getting_started_part_four.html#before-script
  2. https://gitlab.com/cese/adw/blob/master/.gitlab-ci.yml
2 Likes