File tree Expand file tree Collapse file tree 12 files changed +34
-29
lines changed Expand file tree Collapse file tree 12 files changed +34
-29
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,13 @@ function ValidatePatToken($token)
6464 }
6565}
6666
67- # Force powershell to use TLS 1.2 for all communications
68- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls12;
69- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls11;
70- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls10;
67+ try {
68+ # Force powershell to use TLS 1.2 for all communications.
69+ [System.Net.ServicePointManager ]::SecurityProtocol = [System.Net.ServicePointManager ]::SecurityProtocol -bor [System.Net.SecurityProtocolType ]::Tls12 -bor [System.Net.SecurityProtocolType ]::Tls11 -bor [System.Net.SecurityProtocolType ]::Tls10;
70+ }
71+ catch {
72+ Write-Warning $error
73+ }
7174
7275# Load all dependent files for execution
7376. $PSScriptRoot / CltTasksUtility.ps1
Original file line number Diff line number Diff line change 1313 "version" : {
1414 "Major" : 1 ,
1515 "Minor" : 0 ,
16- "Patch" : 33
16+ "Patch" : 35
1717 },
1818 "demands" : [
1919 " msbuild" ,
Original file line number Diff line number Diff line change 1313 "version" : {
1414 "Major" : 1 ,
1515 "Minor" : 0 ,
16- "Patch" : 33
16+ "Patch" : 35
1717 },
1818 "demands" : [
1919 " msbuild" ,
Original file line number Diff line number Diff line change @@ -34,10 +34,13 @@ else {
3434$global :RestTimeout = 60
3535$global :apiVersion = " api-version=1.0"
3636
37- # Force powershell to use TLS 1.2 for all communications
38- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls12;
39- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls11;
40- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls10;
37+ try {
38+ # Force powershell to use TLS 1.2 for all communications.
39+ [System.Net.ServicePointManager ]::SecurityProtocol = [System.Net.ServicePointManager ]::SecurityProtocol -bor [System.Net.SecurityProtocolType ]::Tls12 -bor [System.Net.SecurityProtocolType ]::Tls11 -bor [System.Net.SecurityProtocolType ]::Tls10;
40+ }
41+ catch {
42+ Write-Warning $error
43+ }
4144
4245function InitializeRestHeaders ()
4346{
Original file line number Diff line number Diff line change 1313 "version" : {
1414 "Major" : 1 ,
1515 "Minor" : 0 ,
16- "Patch" : 25
16+ "Patch" : 27
1717 },
1818 "demands" : [
1919 " azureps"
Original file line number Diff line number Diff line change 1313 "version" : {
1414 "Major" : 1 ,
1515 "Minor" : 0 ,
16- "Patch" : 25
16+ "Patch" : 27
1717 },
1818 "demands" : [
1919 " azureps"
Original file line number Diff line number Diff line change @@ -39,10 +39,13 @@ else {
3939 $userAgent = " CloudLoadTestReleaseTask"
4040}
4141
42- # Force powershell to use TLS 1.2 for all communications
43- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls12;
44- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls11;
45- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls10;
42+ try {
43+ # Force powershell to use TLS 1.2 for all communications.
44+ [System.Net.ServicePointManager ]::SecurityProtocol = [System.Net.ServicePointManager ]::SecurityProtocol -bor [System.Net.SecurityProtocolType ]::Tls12 -bor [System.Net.SecurityProtocolType ]::Tls11 -bor [System.Net.SecurityProtocolType ]::Tls10;
45+ }
46+ catch {
47+ Write-Warning $error
48+ }
4649
4750$global :apiVersion = " api-version=1.0"
4851$global :ScopedTestDrop = $TestDrop
Original file line number Diff line number Diff line change 1313 "version" : {
1414 "Major" : 1 ,
1515 "Minor" : 0 ,
16- "Patch" : 32
16+ "Patch" : 34
1717 },
1818 "demands" : [
1919 " msbuild" ,
Original file line number Diff line number Diff line change 1313 "version" : {
1414 "Major" : 1 ,
1515 "Minor" : 0 ,
16- "Patch" : 32
16+ "Patch" : 34
1717 },
1818 "demands" : [
1919 " msbuild" ,
Original file line number Diff line number Diff line change @@ -34,16 +34,12 @@ Write-Verbose "configuration = $configuration"
3434Write-Verbose " publishRunAttachments = $publishRunAttachments "
3535Write-Verbose " vstestLocation = $vstestLocation "
3636
37- try
38- {
39- # Force powershell to use TLS 1.2 for all communications
40- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls12
41- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls11
42- [System.Net.ServicePointManager ]::SecurityProtocol += [System.Net.SecurityProtocolType ]::Tls10
37+ try {
38+ # Force powershell to use TLS 1.2 for all communications.
39+ [System.Net.ServicePointManager ]::SecurityProtocol = [System.Net.ServicePointManager ]::SecurityProtocol -bor [System.Net.SecurityProtocolType ]::Tls12 -bor [System.Net.SecurityProtocolType ]::Tls11 -bor [System.Net.SecurityProtocolType ]::Tls10;
4340}
44- catch
45- {
46- Write-Verbose " Failed to set SecurityProtocol to use TLS 1.2 by default"
41+ catch {
42+ Write-Warning $error
4743}
4844
4945# Import the Task.Common and Task.Internal dll that has all the cmdlets we need for Build
You can’t perform that action at this time.
0 commit comments