$env:CONFIGURATION not set in deploy.ps1 script

kristian's Avatar


18 Feb, 2019 02:35 PM


after deployment my deploy.ps1 script is executed.
This line gets the variable APPVEYOR_PROJECT_NAME
$projectName = $env:APPVEYOR_PROJECT_NAME

however this variable is empty
$configurationName = $env:CONFIGURATION

According to this, it should be the configuration used for the artifact deployed.

Am i getting this wrong?

  1. Support Staff 1 Posted by Owen McDonnell on 18 Feb, 2019 10:28 PM

    Owen McDonnell's Avatar

    Are you deploying inline (as a step in the build process) or asynchronously via a deployment environment?

  2. 2 Posted by kristian on 19 Feb, 2019 06:45 AM

    kristian's Avatar


    Im deploying manually via the appveyor agent. Could that be the issue?
    Im deoploying a build with at specific configuration, so the information
    should be available?

  3. 3 Posted by kristian on 19 Feb, 2019 07:00 AM

    kristian's Avatar

    Oh, just realized that i might have been looking at the wrong varianble reference list.
    According to this list, the Configuration parameter is not available.

    So let me rephrase my question: is is possible to get the build configuration name when running deploy.ps1 ?

  4. Support Staff 4 Posted by Owen McDonnell on 19 Feb, 2019 10:11 PM

    Owen McDonnell's Avatar

    If you were doing inline deployment you could pass variables to the deployment provider in the deploy: section of the configuration, but for asynchronous deployment this is not possible so you could use a script like this to which you could add a configuration variable.

  5. Ilya Finkelshteyn closed this discussion on 22 Apr, 2019 09:00 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac