File tree Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Original file line number Diff line number Diff line change
1
+ # get current IP
2
+ $ip = (Get-NetIPAddress - AddressFamily IPv4 | Where-Object {$_.InterfaceAlias -like ' *ethernet*' }).IPAddress
3
+
4
+ # this is how to get IP of Azure VM
5
+ # $wc = (New-Object Net.WebClient)
6
+ # $wc.Headers.Add("User-Agent", "AppVeyor")
7
+ # $vmip = $wc.DownloadString('http://canhazip.com/')
8
+
9
+ # generate password
10
+ $randomObj = New-Object System.Random
11
+ $newPassword = " "
12
+ 1 .. 12 | ForEach { $newPassword = $newPassword + [char ]$randomObj.next (33 , 126 ) }
13
+
14
+ # change password
15
+ $objUser = [ADSI ](" WinNT://$ ( $env: computername ) /appveyor" )
16
+ $objUser.SetPassword ($newPassword )
17
+
18
+ # allow RDP on firewall
19
+ Enable-NetFirewallRule - DisplayName ' Remote Desktop - User Mode (TCP-in)'
20
+
21
+ # place "lock" file
22
+ $path = " $ ( $env: USERPROFILE ) \Desktop\Delete me to continue build.txt"
23
+ Set-Content - Path $path - Value ' '
24
+
25
+ Write-Warning " To connect this build worker via RDP:"
26
+ Write-Warning " Server: $ip "
27
+ Write-Warning " Username: appveyor"
28
+ Write-Warning " Password: $newPassword "
29
+ Write-Warning " There is 'Delete me to continue build.txt' file has been created on Desktop - delete it to continue the build."
30
+
31
+ while ($true ) { if (-not (Test-Path $path )) { break ; } else { Start-Sleep - Seconds 1 } }
Original file line number Diff line number Diff line change @@ -9,12 +9,6 @@ environment:
9
9
PYTHON_VERSION : " 2.7"
10
10
PYTHON_ARCH : " 32"
11
11
{% for env, config in tox_environments|dictsort %}{% if env.startswith('2.7') or env.startswith('3.4') or env.startswith('3.3') %}
12
- - TOXENV : " {{ env }}"
13
- TOXPYTHON : " C:\\ Python{{ env[:3].replace('.', '') }}\\ python.exe"
14
- WINDOWS_SDK_VERSION : " v7.{{ '1' if env[0] == '3' else '0' }}"
15
- PYTHON_HOME : " C:\\ Python{{ env[:3].replace('.', '') }}"
16
- PYTHON_VERSION : " {{ env[:3] }}"
17
- PYTHON_ARCH : " 32"
18
12
- TOXENV : " {{ env }}"
19
13
TOXPYTHON : " C:\\ Python{{ env[:3].replace('.', '') }}-x64\\ python.exe"
20
14
WINDOWS_SDK_VERSION : " v7.{{ '1' if env[0] == '3' else '0' }}"
@@ -31,6 +25,7 @@ test_script:
31
25
- " %PYTHON_HOME%\\ Scripts\\ tox --version"
32
26
- " %PYTHON_HOME%\\ Scripts\\ virtualenv --version"
33
27
- " %PYTHON_HOME%\\ Scripts\\ pip --version"
28
+ - " powershell ci\\ enable-rdp.ps1"
34
29
- " %WITH_COMPILER% %PYTHON_HOME%\\ Scripts\\ tox"
35
30
after_test :
36
31
- " IF \" %TOXENV:~-8,8%\" == \" -nocover\" %WITH_COMPILER% %TOXPYTHON% setup.py bdist_wheel"
You can’t perform that action at this time.
0 commit comments