#git (2022-02)

All things git (except gitops)

2022-02-25

SomberWolf avatar
SomberWolf

Not sure if this is the right channel for this or not but…. If I am making a job for a gitlab pipeline in .gitlab-ci.yml with a script section and I extends that first job into a second job and the first job has its own script section and the second job has its own script section, will the second script section overwrite what was in the first job? If that doesnt make sense let me know…

venkata.mutyala avatar
venkata.mutyala
SomberWolf avatar
SomberWolf

will do, thanks!

bradym avatar

I’d say #release-engineering is probably better for questions like this.

And to answer your question, yes. When you extend a job in .gitlab-ci.yml, any keys that you set that exist in the parent job will be overridden.

https://docs.gitlab.com/ee/ci/yaml/#extends

Keyword reference for the `.gitlab-ci.yml` file | GitLab

Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.

1
    keyboard_arrow_up