Skip to content

Propagate env vars to Auto DevOps job containers

Cody West requested to merge codywest-autodevops-propagate-env into master

What does this MR do?

In this MR I'm adding propagation of custom environment variables to all of the Auto DevOps docker-in-docker docker run executions. It's confusing to many of our users and customers, and frankly myself, that some of the Auto DevOps tasks aren't actually running with the same same CI context as everything else.

This is necessary in some use cases to pass configuration. For example, some users and customers require that all traffic go through an HTTP_PROXY. Of course, the software making connections needs to be looking for that variable, but I think most do.

To be clear, I borrowed this convention from SAST: SAST.gitlab-ci.yml#L38-43. Since it's already a convention in other places, it seems reasonably safe to do it here too. Though I'd certainly like that to be reviewed.

I've done some initial testing - https://gitlab.com/cody/simplenode/pipelines/92703689 - by manually specifying project templates that point to these same files. All jobs appear to continue working as expected, aside from some unrelated connectivity issues in DAST.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Thong Kuah

Merge request reports