Skip to content

Manage driver defined job variables in custom executor

What does this MR do?

Introduces support for the job_env object to the custom executor's expected JSON configuration payload. The key-value pairs identified in this object will be made available to all subsequent stages within that CI job.

Why was this MR needed?

At the moment any configuration in a custom executor implementation that is preformed must be re-identified during each subsequent stage. Depending on the aspects of the job that are being configured (e.g. an address, image or user account) these processes can be fairly expensive. Providing a trusted mechanism by which the executor can communicate any number of defined variables back would help improve the custom executor workflow.

Are there points in the code the reviewer needs to double check?

I added a first pass at documentation for the field but it could undoubtedly be improved. I think it also might be worth while in clearly informing users that only string values are accepts, seeing that is it marshaled to a map[string]string variable?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased
Edited by Tomasz Maczukin

Merge request reports