Possible to have a before_script and after_script for each job?

This issue was moved in another project.

Description

Correct me if I am wrong - currently it seems its not possible to have a before_script and after_script for each job in .gitlab-ci.yml

Usecase: We can have multiple jobs for which having a before_script and after_script is not possible.

#just one before_script for all jobs before_script:

  • commands

#just one after_script for all jobs

stages:

  • pre-build
  • build
  • test_unit
  • test_integrate
  • staging_deploy
  • production_deploy

Proposal

Within before_script - we can specify stage to know before which job this is required.

Edited by Tim Poffenbarger