$OctopusParameters['Octopus.Release.Number'] not available in powershell script task

Him anyone else getting this issue?

The key exists but the value is coming back as empty.

I’ve just upgraded from 3.0.1 to version 3.0.4 and it’s still happening. Other variables are fine like $OctopusParameters[‘Octopus.Release.Previous.Number’].

Hi Craig,

Thanks for reaching out. I’ve just tested this on 3.0.5.2124 and its working as expected (see attached screenshot). We haven’t changed anything regarding this variable between 3.0.4 and 3.0.5 though.

Could you please enable the debugging variables, then create a new release (so the variables take effect) and then send us the raw log? This will help us see how’s the variable being used during the deployment.

http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables

http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

Try to skip as many steps as possible when running this deployment to avoid the extra noise in the log. Just run the ones relevant to test this please :slight_smile:

Thanks,

Dalmiro