Use CI variables in other Files

Hi @Citfoobar

Many frameworks have a special file for holding these sorts of environment variables and secrets, e.g. Laravel has .env. In this case, you would write your (usually masked) CI variable into the .env file in one of your pipeline jobs. For example:

stages:
    - prepare
    ...

prepare:
     stage: prepare
     script:
's|MAIL_HOST=.*|MAIL_HOST='$MAIL_HOST'|' .env
     artifacts:
         paths:
             - .env
         expire_in: 2 weeks