I'm using VueJS 2.x
In my code, I want to use an environment variable like this:
callApi(process.env.VUE_APP_API_KEY)
The problem is: I want to set the value of this VUE_APP_API_KEY during the CI process in Azure DevOps but my solution doesn't work.
What I have done:
- Create a variable name API_KEY in pipeline variables. 
- Try to set the value during this task 
- task: CmdLine@2
  displayName: Build application
  inputs:
    script: yarn build
  env:
    VUE_APP_API_KEY: $(API_KEY)
Does anyone know what wrong with my solution and how to do it the right way?
Thank you
 
     
    