diff --git a/README.md b/README.md index 4b892c63..01269a79 100644 --- a/README.md +++ b/README.md @@ -276,14 +276,29 @@ gitlab-ci-local --remote-variables git@gitlab.com:firecow/example.git=gitlab-var ### Project file variables -Put a file like this in `$CWD/.gitlab-ci-local-variables.yml` +The `--variables-file` [default: $CWD/.gitlab-ci-local-variables.yml] supports the following format +#### yaml ```yaml --- AUTHORIZATION_PASSWORD: djwqiod910321 DOCKER_LOGIN_PASSWORD: dij3213n123n12in3 -# Will be type File, because value is a file path KNOWN_HOSTS: '~/.ssh/known_hosts' + +# This is only supported in the yaml format +# https://docs.gitlab.com/ee/ci/environments/index.html#limit-the-environment-scope-of-a-cicd-variable +EXAMPLE: + values: + "*": "I am only available the rest of the jobs" + staging: "I am only available in jobs with `environment: staging`" + production: "I am only available in jobs with `environment: production`" +``` + +#### .env +``` +AUTHORIZATION_PASSWORD=djwqiod910321 +DOCKER_LOGIN_PASSWORD=dij3213n123n12in3 +KNOWN_HOSTS='~/.ssh/known_hosts' ``` Variables will now appear in your jobs.