Open bourgeoisrebel opened 5 years ago
Hi @bourgeoisrebel
Sorry for the late reply! The environment variables with dots in their names, and prefixed with TC_AZURE, are actually set by the Teamcity Azure cloud plugin. And I really can't say why they are showing up in your deployment :-)
The Docker plugin uses "TC_DK_CLD" for all its environment variable names, and they never contains dots. You could maybe review the Docker image used in your cloud profile to see if, for some reason, these environment variables are defined there.
When you create an agent image under a cloud profile using the containers (preview) windows option, the deployment fails with the error below. It appears, looking in the template by drilling in to the deployment in the portal, that the windows deployment has environment variables that aren't used in the Linux one (which works beautifully). These variables are given invalid names, using '.', where only alphabetic and underscores are allowed.
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"InvalidContainerEnvironmentVariable\",\r\n \"message\": \"The environment variable name in container 'teamcity-course-win-agent1' of container group 'teamcity-course-win-agent1' is invalid. A valid environment variable name must start with alphabetic character or '', followed by a string of alphanumeric characters or '' (e.g. 'my_name', or 'MY_NAME', or 'MyName').\"\r\n }\r\n}"}]}
Environment Variables section of failing windows one:
Working Linux one: