Showing results for 
Search instead for 
Did you mean: 
Pilot Lvl 1
Message 1 of 2

feat: Having before_job definition



Sometimes, when you are running the base image, you would like to have some commands to be executed on every job, for example, installing a package or updating a specific library, etc.


Adding the same commands over and over again will produce a lengthy workflow file.

Some services provide a section called `before_script` which should host all the commands we want to execute before each job.


Adding a `before_job` top section (same level with name/on/jobs) will help make the code less cluttered and more organized.


Same thing for `services` and `container` why we should repeat them within each job if all the jobs need them?


I am not saying that all jobs will have access to the same service/container. Instead, we are going to separate the repeated code, and each job will create its own service and attach it to the job or use the container to execute the commands.


Also with the ability to define services/container within the job which will then used instead of the general one defined at the top level.



Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

1 Reply
Community Manager
Message 2 of 2

Re: feat: Having before_job definition

Thanks for the feedback! I've taken your suggestions and passed it along to the appropriate teams. Thanks again for reaching out 😀


Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!