title: .gitlab-ci.yml Override Variable Defined in appsetings.json
body: <p>I am trying to replace env variables used by AspnetCore by defining them in .gitlab-ci.yml file.</p>
  
  <p>appsettings.json file looks like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>  "ConnectionStrings": {
      "DatabaseConnection": "my-connection-string"
    },
  </code></pre>
  
  <p>Here are some things i tried.</p>
  
  <p>Invalid Yml:  </p>
  
  <pre><code>ConnectionStrings:
    DatabaseConnection: "my-connection-string"  
  </code></pre>
  
  <p>Valid Yml (Not working):  </p>
  
  <pre><code>"ConnectionStrings:DatabaseConnection": "my-connection-string"   
  "ConnectionStrings::DatabaseConnection": "my-connection-string" 
  </code></pre>
  
  <p>For last two i ger this error and as you can see it is all transformed into one long string instead of key value pair for env varijable:</p>
  
  <blockquote>
    <p>/bin/bash: line 87: export:
    `ConnectionStrings::DatabaseConnection=Server=mssql,1433;Database=MyDatabase;User
    Id=SA;Password=MyPassword;Trusted_Connection=False;MultipleActiveResultSets=True':
    not a valid identifier</p>
  </blockquote>
  
  <p>I am using linux runner for CI.</p>