Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 [WIP] Windows nightly ci #32

Open
wants to merge 161 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
b8f5a93
initial commit
midays Nov 13, 2024
e8f0217
Merge remote-tracking branch 'origin/windows-nightly-ci' into windows…
midays Nov 19, 2024
18766e6
initial commit
midays Nov 19, 2024
9e13fb6
added execute tests command
midays Nov 19, 2024
7f1e8f9
fixed wrong name
midays Nov 19, 2024
3badd74
changed github token secret name to GH_RUNNER_API_TOKEN
midays Nov 19, 2024
96034ef
install vscode script
midays Nov 19, 2024
d800015
run `remove-ec2-runner` even if the run-tests failed
midays Nov 19, 2024
a700c01
fix token name
midays Nov 19, 2024
600267d
change script
midays Nov 19, 2024
0d3d3a2
change script again
midays Nov 21, 2024
1eaa307
add shell specification
midays Nov 21, 2024
8e7c2b2
try different installation way
midays Nov 21, 2024
6ecd9eb
added max retries
midays Nov 21, 2024
ef106ab
install winget and try to use it to install vscode
midays Nov 21, 2024
5ee2b32
remove winget installation, assuming vscode is already installed
midays Nov 23, 2024
f7f2720
print the env variable name to test if vscode is found and recognizab…
midays Nov 23, 2024
d8a0863
change pwsh to powershell
midays Nov 24, 2024
70af6f4
don't remove the vm [temp, will be removed manually, to test vscode i…
midays Nov 24, 2024
d913f77
Revert "don't remove the vm [temp, will be removed manually, to test …
midays Nov 24, 2024
c7c4e45
don't remove the vm [temp, will be removed manually, to test vscode i…
midays Nov 24, 2024
c45068a
stop instance after use, do initial installation
midays Nov 24, 2024
c889e5b
move installation
midays Nov 24, 2024
a0e3ade
Revert "move installation"
midays Nov 24, 2024
a549029
move installation
midays Nov 24, 2024
a2e23c1
verify env path
midays Nov 24, 2024
fe8dac1
Add VSCode to PATH
midays Nov 24, 2024
e42b759
check if installing vscode has affects
midays Nov 24, 2024
83178fc
refresh environment
midays Nov 24, 2024
4a412b6
remove installation, directly check vscode and nodeJS
midays Nov 24, 2024
37db596
check if the full path of the VSCODE works
midays Nov 25, 2024
5655726
install vscode and check full path
midays Nov 25, 2024
3f07c80
install node and check full path
midays Nov 25, 2024
bd6a6bf
check without installation
midays Nov 25, 2024
923d527
refresh env PATH var
midays Nov 25, 2024
6c91e75
Add Node.js and VSCode to PATH manually in GitHub Actions workflow
midays Nov 25, 2024
7761d20
refresh environment by importing module first
midays Nov 25, 2024
8410474
static paths for vscode, nodejs, and npm
midays Nov 25, 2024
40d2257
set ENV PATH VAR
midays Nov 25, 2024
51df935
remove unwanted code
midays Nov 25, 2024
ce65b91
add "./" before directory name`
midays Nov 25, 2024
8251663
add working directory, and copy upload code from linux-nightly-ci
midays Nov 25, 2024
f44601d
continue running workflow even if tests fail
midays Nov 25, 2024
6c75f68
close all vscode running instances
midays Nov 25, 2024
a23ebf9
change `npm install` to `npm ci`, and copy the .env.example to .env
midays Nov 25, 2024
7458a80
re-added npm install before npm ci
midays Nov 25, 2024
c1ecf2a
Add working directory before copying .env.example
midays Nov 25, 2024
3135458
update executable path to match for windows
midays Nov 25, 2024
7e9076f
Change executable path for vscode to match `Version 1.19.2` changes
midays Nov 25, 2024
b4d082c
remove `/bin` from executable directory
midays Nov 25, 2024
fb2abf2
updated the cleanup repo to work for windows
midays Nov 25, 2024
3c6254c
remove change
midays Nov 25, 2024
87cd4f2
added if: always()
midays Nov 26, 2024
6630844
Merge branch 'main' into windows-nightly-ci
midays Nov 26, 2024
5b45f7a
Change step name
midays Nov 26, 2024
8ee121f
use ami-01fa2492704e48175, and comment installation blocks
midays Nov 26, 2024
fe70831
un-comment the installation code blocks
midays Nov 26, 2024
00673cb
try to run script as non-admin user without the installation steps
midays Nov 26, 2024
f93f38e
try with static password
midays Nov 26, 2024
3899d0f
try with configure-instance block
midays Nov 26, 2024
9209982
Revert "try with configure-instance block"
midays Nov 26, 2024
6322a75
try with configure-instance block
midays Nov 26, 2024
ded55b2
make the run-tests block require configure-instance to complete
midays Nov 26, 2024
b984ad1
change needs
midays Nov 26, 2024
fdec814
Update the workflow to include a step that explicitly switches the se…
midays Nov 26, 2024
d915c0c
revert
midays Nov 26, 2024
12af0f4
Merge branch 'main' into windows-nightly-ci
midays Nov 26, 2024
8bf6d53
configure the runner to default to non-admin user when executing in t…
midays Nov 27, 2024
caf18e5
change approach
midays Nov 27, 2024
2143757
remove non-admin runner configuration for now
midays Nov 27, 2024
1629e05
re add installations
midays Nov 27, 2024
7cfe604
Change working directory to avoid permission error
midays Nov 27, 2024
a26aa59
try to update test results
midays Nov 27, 2024
bd45bbd
don't remove instance after starting the job
midays Nov 27, 2024
bb9069b
run again with new password secret
midays Nov 27, 2024
e1cc52d
no installation
midays Nov 27, 2024
48f56f3
remove setting default admin, print the current user, check if vscode…
midays Nov 27, 2024
0495c54
use existing VSCode.exe
midays Nov 27, 2024
b0d4dd0
try to switch to non-admin
midays Nov 27, 2024
0b6bb88
try to debug why user is not being switched
midays Nov 27, 2024
384b6c6
debug the runner
midays Nov 27, 2024
978de18
change service debug
midays Nov 27, 2024
2dab960
fix vscode installation path
midays Nov 27, 2024
efb2dfa
ignore non-admin user, test execution
midays Nov 28, 2024
a007ce1
replace default extension download URL with the windows default
midays Nov 28, 2024
58d7ed1
set full path for uploading screenshots and report
midays Nov 28, 2024
a33742b
remove try{} clause
midays Nov 28, 2024
1edb90a
checkout windows-vm branch
midays Nov 28, 2024
4c6ba36
cd kai-ci before switching branch
midays Nov 28, 2024
f66d5b8
continue on error
midays Nov 28, 2024
7945af2
chang title, remove comments
midays Nov 28, 2024
0c06baa
change vscode execution path to nonadmin
midays Dec 1, 2024
1967fc1
revert execution path
midays Dec 1, 2024
656bf17
try to login as non-admin
midays Dec 1, 2024
4f60928
remove user creation as user already exists, add timeout before tryin…
midays Dec 1, 2024
679dab0
different approach
midays Dec 1, 2024
bfbec5c
add more delay to give the service more time to initialize properly
midays Dec 1, 2024
9b06aff
Added a step to print all available services when the runner service …
midays Dec 1, 2024
567f83b
try looking into temp directory
midays Dec 1, 2024
2c15837
try looking into temp directory
midays Dec 1, 2024
dd32833
try looking into temp directory
midays Dec 1, 2024
0fd7da7
comment code
midays Dec 1, 2024
f7c395d
configure the runner to start as non-admin user forcefully
midays Dec 2, 2024
c678da5
execute the entire installation and configuration process under the n…
midays Dec 2, 2024
bcd8116
Run the Entire Configuration Process as a Non-Admin User.
midays Dec 2, 2024
2ddce5b
removing the use of remote PowerShell sessions (New-PSSession). Inste…
midays Dec 2, 2024
914a338
This new approach aims to be straightforward and reduce the need for …
midays Dec 2, 2024
1e239fa
simple approach
midays Dec 2, 2024
0309075
make the non-admin takeover the runner
midays Dec 2, 2024
9b92713
try to switch to non-admin user in a single session
midays Dec 2, 2024
c67ad62
diff appr
midays Dec 2, 2024
5fa1dc2
change user-data to pre-runner-script
midays Dec 2, 2024
b60ea6b
fix var name
midays Dec 2, 2024
6d71e4b
comment checking specific branch
midays Dec 7, 2024
a3ea6a1
try to start a new non-admin session inside the admin session.
midays Dec 7, 2024
5494be8
Create directory before creating the script
midays Dec 8, 2024
8726783
change user from `testuser` to `nonadmin`
midays Dec 8, 2024
c518bd1
Redirect output to a log file
midays Dec 8, 2024
2f24441
applied to redirect the script's output and commands to a log file an…
midays Dec 8, 2024
29a3212
updated the script in the canvas to ensure separate log files are use…
midays Dec 8, 2024
d2b666e
updated the script in the canvas to ensure separate log files are use…
midays Dec 8, 2024
634e460
change Redirection method for logs
midays Dec 8, 2024
2800ddc
add checks
midays Dec 8, 2024
e9156a5
switch to PSExec instead of the start-process
midays Dec 8, 2024
4b0def0
comment removal of ec2 instance
midays Dec 8, 2024
07d15ed
commands to just print the versions
midays Dec 8, 2024
64ddb62
install nodeJS, and check versions
midays Dec 8, 2024
441dc17
use start-process
midays Dec 8, 2024
95f589f
remove `-wait` flag
midays Dec 8, 2024
666af82
remove `-wait` flag
midays Dec 8, 2024
a49de46
use `Transcript` command to redirect all output streams
midays Dec 8, 2024
1b181f7
try to directly print the logs within the script
midays Dec 8, 2024
f746a15
more debugging
midays Dec 8, 2024
34c2686
more debugging
midays Dec 8, 2024
ed1cbcb
more debugging
midays Dec 8, 2024
0ec89ea
more debugging
midays Dec 8, 2024
f2d6954
more debugging
midays Dec 8, 2024
363f646
added `LoadUserProfile` flag
midays Dec 9, 2024
18f6085
debug
midays Dec 9, 2024
2eabfe3
use PSExec
midays Dec 9, 2024
7d8cc3a
use PSExec
midays Dec 9, 2024
8621735
use PSExec
midays Dec 9, 2024
7e1adef
use PSExec
midays Dec 10, 2024
de526e9
use PSExec
midays Dec 10, 2024
8158721
use PSExec
midays Dec 10, 2024
a5f2050
use PSExec
midays Dec 10, 2024
29217df
use PSExec
midays Dec 10, 2024
4313b6b
use PSExec
midays Dec 10, 2024
f28359e
use PSExec
midays Dec 10, 2024
5acb371
use PSExec
midays Dec 10, 2024
656c775
use PSExec
midays Dec 10, 2024
16c2ce6
use PSExec
midays Dec 10, 2024
3bec942
use PSExec
midays Dec 10, 2024
317b761
use PSExec
midays Dec 10, 2024
b818128
use PSExec
midays Dec 11, 2024
d0d2989
use PSExec
midays Dec 11, 2024
a3fa5d9
use start-process
midays Dec 11, 2024
0b72f8c
use start-process
midays Dec 11, 2024
191f78a
use start-process
midays Dec 11, 2024
670421a
use start-process
midays Dec 17, 2024
ea9a4c9
use PSExec
midays Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/windows-nightly-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,24 @@ jobs:
shell: powershell
run: |
$InstallerPath = "C:\vscode-installer.exe"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@midays The VM should have vscode installed on it . @msajidmansoori12 Please correct me if I am wrong .
We don't have to install vscode on it .

Invoke-WebRequest -Uri "https://update.code.visualstudio.com/latest/win32-x64-user/stable" -OutFile $InstallerPath
Start-Process -FilePath $InstallerPath -ArgumentList "/silent" -Wait
$Uri = "https://update.code.visualstudio.com/latest/win32-x64-user/stable"
$RetryCount = 0
$MaxRetries = 3
$Success = $false

while (-not $Success -and $RetryCount -lt $MaxRetries) {
try {
Invoke-WebRequest -Uri $Uri -OutFile $InstallerPath -TimeoutSec 60
$Success = $true
} catch {
$RetryCount++
Write-Output "Download failed. Retry $RetryCount of $MaxRetries..."
Start-Sleep -Seconds 10
}
}
if (-not $Success) {
throw "Failed to download VSCode installer after $MaxRetries attempts."
}

- name: Check VSCode installation
shell: powershell
Expand Down
Loading