Skip to content

Commit 53ae776

Browse files
committed
attempt splitting windows to separate pipeline
1 parent 48bb284 commit 53ae776

File tree

2 files changed

+96
-67
lines changed

2 files changed

+96
-67
lines changed

.semaphore/semaphore.yml

-67
Original file line numberDiff line numberDiff line change
@@ -67,73 +67,6 @@ blocks:
6767
jobs: *build-test-jobs-stable
6868
epilogue: *build-test-epilogue
6969

70-
- name: "Build & Test (VS Code: win32 x64)"
71-
dependencies: []
72-
skip: *build-test-skip-stable
73-
task:
74-
agent:
75-
machine:
76-
type: s1-prod-windows
77-
prologue:
78-
commands:
79-
- checkout
80-
- make ci-bin-sem-cache-restore
81-
- $Env:PATH += ";C:\Program Files\Git\bin"
82-
- $Env:PATH += ";C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64"
83-
# Ensure npm and npx are available
84-
- npm --version
85-
- npx --version
86-
- choco install gh -y
87-
- $Env:PATH += ";C:\Program Files\GitHub CLI\"
88-
- gh --version
89-
- |
90-
if (Test-Path "$HOME/.gh-token") {
91-
$Env:GH_TOKEN = Get-Content "$HOME/.gh-token" -Raw | ForEach-Object { $_.Trim() }
92-
if ([string]::IsNullOrEmpty($Env:GH_TOKEN)) {
93-
Write-Error "Token file exists but is empty"
94-
exit 1
95-
}
96-
gh config set prompt disabled
97-
$Env:GH_TOKEN | gh auth login --with-token
98-
gh auth status
99-
} else {
100-
Write-Error "Token file not found at $HOME/.gh-token"
101-
exit 1
102-
}
103-
- |
104-
if ($Env:SEMAPHORE_ORGANIZATION_URL -like "*.semaphoreci.com") {
105-
Write-Output "Skipping Vault setup for Semaphore CI"
106-
} else {
107-
$Env:VAULT_ADDR = "https://vault.cireops.gcp.internal.confluent.cloud"
108-
$token = $(vault write -field=token "auth/semaphore_self_hosted/login" role="default" jwt="$Env:SEMAPHORE_OIDC_TOKEN")
109-
vault login -no-print token=$token
110-
}
111-
- $E2E_USERNAME = $(vault kv get -field=E2E_USERNAME v1/ci/kv/vscodeextension/testing)
112-
- Set-Content -Path .env -Value "E2E_USERNAME=$E2E_USERNAME"
113-
- $E2E_PASSWORD = $(vault kv get -field=E2E_PASSWORD v1/ci/kv/vscodeextension/testing)
114-
- Add-Content -Path .env -Value "E2E_PASSWORD=$E2E_PASSWORD"
115-
jobs:
116-
- name: "Build & Test (VS Code)"
117-
commands:
118-
- npm ci --prefer-offline --include=dev
119-
- npx playwright install
120-
- npx gulp build
121-
- npx gulp test
122-
- npx gulp functional
123-
epilogue:
124-
always:
125-
commands:
126-
- Remove-Item .env -ErrorAction SilentlyContinue
127-
# Windows version of store-test-results-to-semaphore
128-
- |
129-
$TestResultFile = Join-Path -Path $PWD -ChildPath "TEST-result.xml"
130-
if (Test-Path $TestResultFile) {
131-
Write-Output "Publishing test results from $TestResultFile"
132-
test-results publish $TestResultFile --force
133-
} else {
134-
Write-Output "Test results not found at $TestResultFile"
135-
}
136-
13770
# --- End Build & Test (multi-platform/-arch) for VS Code (stable) ---
13871

13972
- name: "Build & Test (VS Code Insiders: linux x64)"

.semaphore/win32-x64-build-test.yml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# This file is managed by ServiceBot plugin - Semaphore. The content in this file is created using a common
2+
# template and configurations in service.yml.
3+
# Any modifications made to version, name, agent, and global_job_config will be overwritten by the generated
4+
# content in nightly runs. Code changes made to the remaining sections will not be affected.
5+
version: v1.0
6+
name: win32-x64-build-test
7+
agent:
8+
machine:
9+
type: s1-prod-windows
10+
11+
auto_cancel:
12+
running:
13+
when: "branch != 'main'"
14+
15+
execution_time_limit:
16+
hours: 1
17+
18+
queue:
19+
- when: "branch != 'main'"
20+
processing: parallel
21+
22+
blocks:
23+
- name: "Build & Test (win32 x64)"
24+
dependencies: []
25+
skip:
26+
when: "change_in(['/release.svg', '/.versions/next.txt'], {pipeline_file: 'ignore', branch_range: '$SEMAPHORE_GIT_COMMIT_RANGE', default_branch: 'main'})"
27+
task:
28+
prologue:
29+
commands:
30+
- checkout
31+
- make ci-bin-sem-cache-restore
32+
- $Env:PATH += ";C:\Program Files\Git\bin"
33+
- $Env:PATH += ";C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64"
34+
# Ensure npm and npx are available
35+
- npm --version
36+
- npx --version
37+
- choco install gh -y
38+
- $Env:PATH += ";C:\Program Files\GitHub CLI\"
39+
- gh --version
40+
- |
41+
if (Test-Path "$HOME/.gh-token") {
42+
$Env:GH_TOKEN = Get-Content "$HOME/.gh-token" -Raw | ForEach-Object { $_.Trim() }
43+
if ([string]::IsNullOrEmpty($Env:GH_TOKEN)) {
44+
Write-Error "Token file exists but is empty"
45+
exit 1
46+
}
47+
gh config set prompt disabled
48+
$Env:GH_TOKEN | gh auth login --with-token
49+
gh auth status
50+
} else {
51+
Write-Error "Token file not found at $HOME/.gh-token"
52+
exit 1
53+
}
54+
- |
55+
if ($Env:SEMAPHORE_ORGANIZATION_URL -like "*.semaphoreci.com") {
56+
Write-Output "Skipping Vault setup for Semaphore CI"
57+
} else {
58+
$Env:VAULT_ADDR = "https://vault.cireops.gcp.internal.confluent.cloud"
59+
$token = $(vault write -field=token "auth/semaphore_self_hosted/login" role="default" jwt="$Env:SEMAPHORE_OIDC_TOKEN")
60+
vault login -no-print token=$token
61+
}
62+
- $E2E_USERNAME = $(vault kv get -field=E2E_USERNAME v1/ci/kv/vscodeextension/testing)
63+
- Set-Content -Path .env -Value "E2E_USERNAME=$E2E_USERNAME"
64+
- $E2E_PASSWORD = $(vault kv get -field=E2E_PASSWORD v1/ci/kv/vscodeextension/testing)
65+
- Add-Content -Path .env -Value "E2E_PASSWORD=$E2E_PASSWORD"
66+
jobs:
67+
- name: "Build & Test (win32 x64)"
68+
commands:
69+
- npm ci --prefer-offline --include=dev
70+
- npx playwright install
71+
- npx gulp build
72+
- npx gulp test
73+
- npx gulp functional
74+
matrix:
75+
- env_var: VSCODE_VERSION
76+
values: ["stable", "insiders"]
77+
epilogue:
78+
always:
79+
commands:
80+
- Remove-Item .env -ErrorAction SilentlyContinue
81+
# Windows version of store-test-results-to-semaphore
82+
- |
83+
$TestResultFile = Join-Path -Path $PWD -ChildPath "TEST-result.xml"
84+
if (Test-Path $TestResultFile) {
85+
Write-Output "Publishing test results from $TestResultFile"
86+
test-results publish $TestResultFile --force
87+
} else {
88+
Write-Output "Test results not found at $TestResultFile"
89+
}
90+
91+
after_pipeline:
92+
task:
93+
jobs:
94+
- name: Publish Test Results to Semaphore
95+
commands:
96+
- test-results gen-pipeline-report || echo "Could not publish pipeline test result report due to probably no test results to publish"

0 commit comments

Comments
 (0)