One of my powershell build steps is having an issue that only seems to happen when run from within TeamCity. I can run the same file from a powershell console without an error.
$loadedAssembly = [System.Reflection.Assembly]::LoadFrom("C:\\powershell\\AWSSDK.dll")
$accessKeyID="1234"
$secretKeyID="1234"
$client=[Amazon.AWSClientFactory]::CreateAmazonEC2Client($accessKeyID,$secretKeyID)
The error in TeamCity is
[04:38:22][Step 2/2] T:\TeamCity\BuildAgent2\temp\buildTmp\powershell2271598119506819752.ps1 :
[04:38:22][Step 2/2] Exception calling "CreateAmazonEC2Client" with "2" argument(s): "No
[04:38:22][Step 2/2] RegionEndpoint or ServiceURL configured"
[04:38:22][Step 2/2] + CategoryInfo : NotSpecified: (:) [Write-Error], MethodInvocatio
[04:38:22][Step 2/2] nException
[04:38:22][Step 2/2] + FullyQualifiedErrorId : System.Management.Automation.MethodInvocationExc
[04:38:22][Step 2/2] eption,powershell2271598119506819752.ps1
[04:38:22][Step 2/2]
[04:38:22][Step 2/2] Process exited with code 1
Any help appreciated
Aucun commentaire:
Enregistrer un commentaire