Closed dnsmichi closed 1 year ago
The following job overrides the default before_script section, thus resulting in a missing env file to source in the default after_script section.
before_script
after_script
build-cpp: stage: build #tags: # - saas-linux-medium-amd64 image: gcc:9-bullseye # TODO: Custom build image, this step wastes resources on every run before_script: ### THIS - apt update && apt -y install cmake script: - ci/build_cpp.sh
Document how to use !reference to inherit the default before_script into jobs that define their own section.
build-cpp: stage: build #tags: # - saas-linux-medium-amd64 image: gcc:9-bullseye # TODO: Custom build image, this step wastes resources on every run before_script: # Fix for tracepusher default overrides - !reference [default, before_script] - apt update && apt -y install cmake script: - ci/build_cpp.sh
This workaround only works as long as the default definition stays in the CI/CD configuration. When removed, the linters will throw errors.
default
Verified working in https://gitlab.com/gitlab-de/use-cases/observability/devsecops-efficiency/slow-pipeline-for-analysis/-/jobs/4593473836
I think this is solved with the standalone binaries available in 0.8.0. We can re-open if it is still relevant.
Problem to solve
The following job overrides the default
before_script
section, thus resulting in a missing env file to source in the defaultafter_script
section.Proposal
Document how to use !reference to inherit the default before_script into jobs that define their own section.
This workaround only works as long as the
default
definition stays in the CI/CD configuration. When removed, the linters will throw errors.Verified working in https://gitlab.com/gitlab-de/use-cases/observability/devsecops-efficiency/slow-pipeline-for-analysis/-/jobs/4593473836