title: Can't access gitlab-ci environment variables in build.gradle UPD: when using kaniko
body: <p>I want to get gitlab environment variable and use it in build.gradle script. I defined the variable in gitlab-ci:</p>
  
  <pre><code> build:
    stage: build
    variables:
      TEST: "HELLO WORLD"
    script:
      - export
  </code></pre>
  
  <p>Also, I use -export command to print all variables. And I see my TEST variable in gitlab job console. But when I'm trying to get this variable in build.gradle it is null. Here is build.gradle code fragment:</p>
  
  <pre><code>    if (System.getenv('TEST') != null) {
      repositories {
          println 'CI=' + System.getenv('CI')
          println 'M- ' + System.getenv('MAVEN_REPO_USER')
          println 'T- ' + System.getenv('TEST')
          println 'CI_JOB_STAGE ' + System.getenv('CI_JOB_STAGE')
          mavenCentral()
      }
  } else {
      repositories {
          println '*CI= ' + System.getenv('CI')
          println '*MAven ' + System.getenv('MAVEN_REPO_USER')
          println '* ' + System.getenv('CI_JOB_STAGE')
          println 'T-+++ ' + System.getenv('TEST')
          mavenCentral()
          mavenLocal()
      }
  }
  </code></pre>
  
  <p>All environment variables printed as null's, but I see all of these in gitlab job console printed by -export command, before gradle trying to print them. What is wrong?</p>
  
  <p>UPDATE: In ci-gitlab I'm using kaniko : - /kaniko/executor</p>