ARM deployment issue on sanity tests
Describe the bug
When deploying serverless environment with the "Create Environment" workflow, the user have to specify that the stack version is 8.12 or otherwise the following error appears.
The problem reside in the agent ARM setup where it works different based on the STACK_VERSION env var.
To Reproduce Deploy a serverless stack with the stack parameter on 8.11
Expected behavior The flow should ignore the stack version parameter when using serverless.
The problem is that when the "Deploy a serverless project instead of an ESS deployment" option is set, the STACK_VERSION variable is set to 8.11.0 instead of the latest one or instead of just being cleared. Otherwise, the code works correctly by fetching the latest ARM template from the integration configuration.
CC @gurevichdmitry
I've updated the default input value for the stack version and added logic to set the stack version to the latest one if the serverless option is enabled. The fix was tested on version 8.11.4