Skip to content

use env instead of export to support setting envs with irregular identifiers,…

Jackson Westeen requested to merge obogobo/gitlab-runner:patch-2 into master

Gitlab Runner throws an exception at runtime when trying to export envs specified in YAML that contain dots, or other non alphanum characters.

Example: /bin/bash: line 49: export: `xpack.security.enabled=false': not a valid identifier

What does this MR do?

Attempts to work around this by using env instead of export, like Docker does internally to set weird properties on the environment.

Why was this MR needed?

We'd like to run Elasticsearch in Docker for CI testing on Gitlab Runner. ElasticSearch needs a few properties set in the environment, that have dots in their key name, that cause export to bail out.

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

Anywhere else envs get exported / parsed from YAML?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Merge request reports