Skip to content

Commit d039e4a

Browse files
committed
Merge branch 'main' into merogge/fix-task-reconnection
2 parents dc37566 + e55c822 commit d039e4a

22 files changed

+308
-285
lines changed

build/azure-pipelines/alpine/product-build-alpine.yml

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -104,55 +104,47 @@ steps:
104104

105105
- script: |
106106
set -e
107-
TARGET=$([ "$VSCODE_ARCH" == "x64" ] && echo "linux-alpine" || echo "alpine-arm64")
107+
TARGET=$([ "$VSCODE_ARCH" == "x64" ] && echo "linux-alpine" || echo "alpine-arm64") # TODO@joaomoreno
108108
yarn gulp vscode-reh-$TARGET-min-ci
109-
yarn gulp vscode-reh-web-$TARGET-min-ci
109+
(cd .. && mv vscode-reh-$TARGET vscode-server-$TARGET) # TODO@joaomoreno
110+
ARCHIVE_PATH=".build/linux/server/vscode-server-$TARGET.tar.gz"
111+
mkdir -p $(dirname $ARCHIVE_PATH)
112+
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-$TARGET
113+
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
110114
env:
111115
GITHUB_TOKEN: "$(github-distro-mixin-password)"
112-
displayName: Build
116+
displayName: Build server
113117
114118
- script: |
115119
set -e
116120
TARGET=$([ "$VSCODE_ARCH" == "x64" ] && echo "linux-alpine" || echo "alpine-arm64")
117-
REPO="$(pwd)"
118-
ROOT="$REPO/.."
119-
120-
# Publish Remote Extension Host
121-
LEGACY_SERVER_BUILD_NAME="vscode-reh-$TARGET"
122-
SERVER_BUILD_NAME="vscode-server-$TARGET"
123-
SERVER_TARBALL_FILENAME="vscode-server-$TARGET.tar.gz"
124-
SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME"
125-
126-
rm -rf $ROOT/vscode-server-*.tar.*
127-
(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME)
128-
129-
# Publish Remote Extension Host (Web)
130-
LEGACY_SERVER_BUILD_NAME="vscode-reh-web-$TARGET"
131-
SERVER_BUILD_NAME="vscode-server-$TARGET-web"
132-
SERVER_TARBALL_FILENAME="vscode-server-$TARGET-web.tar.gz"
133-
SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME"
134-
135-
rm -rf $ROOT/vscode-server-*-web.tar.*
136-
(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME)
137-
displayName: Prepare for publish
121+
yarn gulp vscode-reh-web-$TARGET-min-ci
122+
(cd .. && mv vscode-reh-web-$TARGET vscode-server-$TARGET-web) # TODO@joaomoreno
123+
ARCHIVE_PATH=".build/linux/web/vscode-server-$TARGET-web.tar.gz"
124+
mkdir -p $(dirname $ARCHIVE_PATH)
125+
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-$TARGET-web
126+
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
127+
env:
128+
GITHUB_TOKEN: "$(github-distro-mixin-password)"
129+
displayName: Build server (web)
138130
139-
- publish: $(Agent.BuildDirectory)/vscode-server-alpine-$(VSCODE_ARCH).tar.gz
131+
- publish: $(SERVER_PATH)
140132
artifact: vscode_server_alpine_$(VSCODE_ARCH)_archive-unsigned
141133
displayName: Publish server archive
142-
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'x64'))
134+
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''), ne(variables['VSCODE_ARCH'], 'x64'))
143135

144-
- publish: $(Agent.BuildDirectory)/vscode-server-alpine-$(VSCODE_ARCH)-web.tar.gz
136+
- publish: $(WEB_PATH)
145137
artifact: vscode_web_alpine_$(VSCODE_ARCH)_archive-unsigned
146138
displayName: Publish web server archive
147-
condition: and(succeeded(), ne(variables['VSCODE_ARCH'], 'x64'))
139+
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''), ne(variables['VSCODE_ARCH'], 'x64'))
148140

149141
# Legacy x64 artifact name
150-
- publish: $(Agent.BuildDirectory)/vscode-server-linux-alpine.tar.gz
142+
- publish: $(SERVER_PATH)
151143
artifact: vscode_server_linux_alpine_archive-unsigned
152144
displayName: Publish x64 server archive
153-
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
145+
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''), eq(variables['VSCODE_ARCH'], 'x64'))
154146

155-
- publish: $(Agent.BuildDirectory)/vscode-server-linux-alpine-web.tar.gz
147+
- publish: $(WEB_PATH)
156148
artifact: vscode_web_linux_alpine_archive-unsigned
157149
displayName: Publish x64 web server archive
158-
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
150+
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''), eq(variables['VSCODE_ARCH'], 'x64'))

build/azure-pipelines/darwin/product-build-darwin-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ steps:
8484
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
8585
./scripts/test-integration.sh --build --tfs "Integration Tests"
8686
env:
87-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)
87+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
8888
displayName: Run integration tests (Electron)
8989
timeoutInMinutes: 20
9090
9191
- script: ./scripts/test-web-integration.sh --browser webkit
9292
env:
93-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)
93+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
9494
displayName: Run integration tests (Browser, Webkit)
9595
timeoutInMinutes: 20
9696

@@ -101,7 +101,7 @@ steps:
101101
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
102102
./scripts/test-remote-integration.sh
103103
env:
104-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)
104+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
105105
displayName: Run integration tests (Remote)
106106
timeoutInMinutes: 20
107107
@@ -133,7 +133,7 @@ steps:
133133
134134
- script: yarn smoketest-no-compile --web --tracing --headless
135135
env:
136-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)
136+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web
137137
timeoutInMinutes: 20
138138
displayName: Run smoke tests (Browser, Chromium)
139139

@@ -144,7 +144,7 @@ steps:
144144
APP_NAME="`ls $APP_ROOT | head -n 1`"
145145
yarn smoketest-no-compile --tracing --remote --build "$APP_ROOT/$APP_NAME"
146146
env:
147-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)
147+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-darwin-$(VSCODE_ARCH)
148148
timeoutInMinutes: 20
149149
displayName: Run smoke tests (Remote)
150150

build/azure-pipelines/darwin/product-build-darwin.yml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,34 @@ steps:
111111
- template: ../common/install-builtin-extensions.yml
112112

113113
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
114-
- script: yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
114+
- script: |
115+
set -e
116+
yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
117+
echo "##vso[task.setvariable variable=BUILT_CLIENT]true"
115118
env:
116119
GITHUB_TOKEN: "$(github-distro-mixin-password)"
117120
displayName: Build client
118121
119-
- script: yarn gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
122+
- script: |
123+
set -e
124+
yarn gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
125+
mv ../vscode-reh-darwin-$(VSCODE_ARCH) ../vscode-server-darwin-$(VSCODE_ARCH) # TODO@joaomoreno
126+
ARCHIVE_PATH=".build/darwin/server/vscode-server-darwin-$(VSCODE_ARCH).zip"
127+
mkdir -p $(dirname $ARCHIVE_PATH)
128+
(cd .. && zip -Xry $(Build.SourcesDirectory)/$ARCHIVE_PATH vscode-server-darwin-$(VSCODE_ARCH))
129+
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
120130
env:
121131
GITHUB_TOKEN: "$(github-distro-mixin-password)"
122132
displayName: Build server
123133
124-
- script: yarn gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
134+
- script: |
135+
set -e
136+
yarn gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
137+
mv ../vscode-reh-web-darwin-$(VSCODE_ARCH) ../vscode-server-darwin-$(VSCODE_ARCH)-web # TODO@joaomoreno
138+
ARCHIVE_PATH=".build/darwin/server/vscode-server-darwin-$(VSCODE_ARCH)-web.zip"
139+
mkdir -p $(dirname $ARCHIVE_PATH)
140+
(cd .. && zip -Xry $(Build.SourcesDirectory)/$ARCHIVE_PATH vscode-server-darwin-$(VSCODE_ARCH)-web)
141+
echo "##vso[task.setvariable variable=WEB_PATH]$ARCHIVE_PATH"
125142
env:
126143
GITHUB_TOKEN: "$(github-distro-mixin-password)"
127144
displayName: Build server (web)
@@ -176,18 +193,14 @@ steps:
176193
DEBUG=electron-osx-sign* node build/darwin/sign.js $(agent.builddirectory)
177194
displayName: Set Hardened Entitlements
178195
179-
- script: cd $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) && zip -r -X -y $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip *
180-
displayName: Archive build
181-
182196
- script: |
183197
set -e
184-
185-
# package Remote Extension Host
186-
pushd .. && mv vscode-reh-darwin-$(VSCODE_ARCH) vscode-server-darwin-$(VSCODE_ARCH) && zip -Xry vscode-server-darwin-$(VSCODE_ARCH).zip vscode-server-darwin-$(VSCODE_ARCH) && popd
187-
188-
# package Remote Extension Host (Web)
189-
pushd .. && mv vscode-reh-web-darwin-$(VSCODE_ARCH) vscode-server-darwin-$(VSCODE_ARCH)-web && zip -Xry vscode-server-darwin-$(VSCODE_ARCH)-web.zip vscode-server-darwin-$(VSCODE_ARCH)-web && popd
190-
displayName: Prepare to publish servers
198+
ARCHIVE_PATH=".build/darwin/client/VSCode-darwin-$(VSCODE_ARCH).zip"
199+
mkdir -p $(dirname $ARCHIVE_PATH)
200+
(cd ../VSCode-darwin-$(VSCODE_ARCH) && zip -Xry $(Build.SourcesDirectory)/$ARCHIVE_PATH *)
201+
echo "##vso[task.setvariable variable=CLIENT_PATH]$ARCHIVE_PATH"
202+
condition: and(succeededOrFailed(), eq(variables['BUILT_CLIENT'], 'true'))
203+
displayName: Package client
191204
192205
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
193206
displayName: Generate SBOM (client)
@@ -209,25 +222,17 @@ steps:
209222
displayName: Publish SBOM (server)
210223
artifact: vscode_server_darwin_$(VSCODE_ARCH)_sbom
211224

212-
- publish: $(Agent.BuildDirectory)/VSCode-darwin-$(VSCODE_ARCH).zip
225+
- publish: $(CLIENT_PATH)
213226
artifact: unsigned_vscode_client_darwin_$(VSCODE_ARCH)_archive
227+
condition: and(succeededOrFailed(), ne(variables['CLIENT_PATH'], ''))
214228
displayName: Publish client archive
215229

216-
- publish: $(Agent.BuildDirectory)/vscode-server-darwin-$(VSCODE_ARCH).zip
230+
- publish: $(SERVER_PATH)
217231
artifact: vscode_server_darwin_$(VSCODE_ARCH)_archive-unsigned
232+
condition: and(succeededOrFailed(), ne(variables['SERVER_PATH'], ''))
218233
displayName: Publish server archive
219234

220-
- publish: $(Agent.BuildDirectory)/vscode-server-darwin-$(VSCODE_ARCH)-web.zip
235+
- publish: $(WEB_PATH)
221236
artifact: vscode_web_darwin_$(VSCODE_ARCH)_archive-unsigned
237+
condition: and(succeededOrFailed(), ne(variables['WEB_PATH'], ''))
222238
displayName: Publish web server archive
223-
224-
- task: AzureCLI@2
225-
inputs:
226-
azureSubscription: "vscode-builds-subscription"
227-
scriptType: pscore
228-
scriptLocation: inlineScript
229-
addSpnToEnvironment: true
230-
inlineScript: |
231-
Write-Host "##vso[task.setvariable variable=AZURE_TENANT_ID]$env:tenantId"
232-
Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_ID]$env:servicePrincipalId"
233-
Write-Host "##vso[task.setvariable variable=AZURE_CLIENT_SECRET;issecret=true]$env:servicePrincipalKey"

build/azure-pipelines/linux/prepare-publish.sh

Lines changed: 0 additions & 66 deletions
This file was deleted.

build/azure-pipelines/linux/product-build-linux-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ steps:
122122
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
123123
./scripts/test-integration.sh --build --tfs "Integration Tests"
124124
env:
125-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)
125+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
126126
displayName: Run integration tests (Electron)
127127
timeoutInMinutes: 20
128128
129129
- script: ./scripts/test-web-integration.sh --browser chromium
130130
env:
131-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)
131+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
132132
displayName: Run integration tests (Browser, Chromium)
133133
timeoutInMinutes: 20
134134

@@ -140,7 +140,7 @@ steps:
140140
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
141141
./scripts/test-remote-integration.sh
142142
env:
143-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)
143+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
144144
displayName: Run integration tests (Remote)
145145
timeoutInMinutes: 20
146146
@@ -180,15 +180,15 @@ steps:
180180

181181
- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
182182
env:
183-
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)
183+
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
184184
timeoutInMinutes: 20
185185
displayName: Run smoke tests (Browser, Chromium)
186186

187187
- script: |
188188
set -e
189189
yarn gulp compile-extension:vscode-test-resolver
190190
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
191-
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
191+
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \
192192
yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
193193
timeoutInMinutes: 20
194194
displayName: Run smoke tests (Remote)

0 commit comments

Comments
 (0)