mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 22:12:26 +01:00
actually run ok run it for real actually work parameter syntax monaco logging env var is always string use variables use global params try idea to stop looping move variables wrap in quotes rename all the artifacts try downloading up timeout misc underscore add auth log everything we need to typo typo publish linux client archives too renamed all that needed to be renamed better error handling raname windows assets first attempt at letting new code handle releasing with macOS move to $env remove gate include updated createAsset.js onboard windows client include js add linux client add built js move over all publishing update distro use branch name? processed artifacts and fix win32 server platforms publish what artifacts were published use download and more more to powershell put it all in exec actually in directory fix path again create file to be uploaded move to all PowerShell rename to publish and clean up code update createAsset use distro 2 more commented out code and add displayNames address feedback
154 lines
5.2 KiB
YAML
154 lines
5.2 KiB
YAML
steps:
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: "14.x"
|
|
|
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
|
inputs:
|
|
versionSpec: "1.x"
|
|
|
|
- task: AzureKeyVault@1
|
|
displayName: "Azure Key Vault: Get Secrets"
|
|
inputs:
|
|
azureSubscription: "vscode-builds-subscription"
|
|
KeyVaultName: vscode
|
|
|
|
- task: DownloadPipelineArtifact@2
|
|
inputs:
|
|
artifact: Compilation
|
|
path: $(Build.ArtifactStagingDirectory)
|
|
displayName: Download compilation output
|
|
|
|
- script: |
|
|
set -e
|
|
tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
|
|
displayName: Extract compilation output
|
|
|
|
- task: Docker@1
|
|
displayName: "Pull image"
|
|
inputs:
|
|
azureSubscriptionEndpoint: "vscode-builds-subscription"
|
|
azureContainerRegistry: vscodehub.azurecr.io
|
|
command: "Run an image"
|
|
imageName: "vscode-linux-build-agent:alpine"
|
|
containerCommand: uname
|
|
|
|
- script: |
|
|
set -e
|
|
cat << EOF > ~/.netrc
|
|
machine github.com
|
|
login vscode
|
|
password $(github-distro-mixin-password)
|
|
EOF
|
|
|
|
git config user.email "vscode@microsoft.com"
|
|
git config user.name "VSCode"
|
|
displayName: Prepare tooling
|
|
|
|
- script: |
|
|
set -e
|
|
git pull --no-rebase https://github.com/$(VSCODE_MIXIN_REPO).git $(node -p "require('./package.json').distro")
|
|
displayName: Merge distro
|
|
|
|
- script: |
|
|
mkdir -p .build
|
|
node build/azure-pipelines/common/computeNodeModulesCacheKey.js "alpine" $ENABLE_TERRAPIN > .build/yarnlockhash
|
|
displayName: Prepare yarn cache flags
|
|
|
|
- task: Cache@2
|
|
inputs:
|
|
key: 'nodeModules | $(Agent.OS) | .build/yarnlockhash'
|
|
path: .build/node_modules_cache
|
|
cacheHitVar: NODE_MODULES_RESTORED
|
|
displayName: Restore node_modules cache
|
|
|
|
- script: |
|
|
set -e
|
|
tar -xzf .build/node_modules_cache/cache.tgz
|
|
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
|
|
displayName: Extract node_modules cache
|
|
|
|
- script: |
|
|
set -e
|
|
npx https://aka.ms/enablesecurefeed standAlone
|
|
timeoutInMinutes: 5
|
|
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['ENABLE_TERRAPIN'], 'true'))
|
|
displayName: Switch to Terrapin packages
|
|
|
|
- script: |
|
|
set -e
|
|
for i in {1..3}; do # try 3 times, for Terrapin
|
|
yarn --frozen-lockfile && break
|
|
if [ $i -eq 3 ]; then
|
|
echo "Yarn failed too many times" >&2
|
|
exit 1
|
|
fi
|
|
echo "Yarn failed $i, trying again..."
|
|
done
|
|
env:
|
|
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
displayName: Install dependencies
|
|
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
|
|
|
- script: |
|
|
set -e
|
|
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
|
|
mkdir -p .build/node_modules_cache
|
|
tar -czf .build/node_modules_cache/cache.tgz --files-from .build/node_modules_list.txt
|
|
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
|
displayName: Create node_modules archive
|
|
|
|
- script: |
|
|
set -e
|
|
node build/azure-pipelines/mixin
|
|
displayName: Mix in quality
|
|
|
|
- script: |
|
|
set -e
|
|
docker run -e VSCODE_QUALITY -v $(pwd):/root/vscode -v ~/.netrc:/root/.netrc vscodehub.azurecr.io/vscode-linux-build-agent:alpine /root/vscode/build/azure-pipelines/linux/alpine/install-dependencies.sh
|
|
displayName: Prebuild
|
|
|
|
- script: |
|
|
set -e
|
|
yarn gulp vscode-reh-linux-alpine-min-ci
|
|
yarn gulp vscode-reh-web-linux-alpine-min-ci
|
|
displayName: Build
|
|
|
|
- script: |
|
|
set -e
|
|
REPO="$(pwd)"
|
|
ROOT="$REPO/.."
|
|
|
|
PLATFORM_LINUX="linux-alpine"
|
|
|
|
# Publish Remote Extension Host
|
|
LEGACY_SERVER_BUILD_NAME="vscode-reh-$PLATFORM_LINUX"
|
|
SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX"
|
|
SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX.tar.gz"
|
|
SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME"
|
|
|
|
rm -rf $ROOT/vscode-server-*.tar.*
|
|
(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME)
|
|
|
|
# Publish Remote Extension Host (Web)
|
|
LEGACY_SERVER_BUILD_NAME="vscode-reh-web-$PLATFORM_LINUX"
|
|
SERVER_BUILD_NAME="vscode-server-$PLATFORM_LINUX-web"
|
|
SERVER_TARBALL_FILENAME="vscode-server-$PLATFORM_LINUX-web.tar.gz"
|
|
SERVER_TARBALL_PATH="$ROOT/$SERVER_TARBALL_FILENAME"
|
|
|
|
rm -rf $ROOT/vscode-server-*-web.tar.*
|
|
(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME)
|
|
displayName: Prepare for publish
|
|
condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
|
|
|
|
- publish: $(Agent.BuildDirectory)/vscode-server-linux-alpine.tar.gz
|
|
artifact: vscode_server_linux_alpine_archive-unsigned
|
|
displayName: Publish server archive
|
|
condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
|
|
|
|
- publish: $(Agent.BuildDirectory)/vscode-server-linux-alpine-web.tar.gz
|
|
artifact: vscode_web_linux_alpine_archive-unsigned
|
|
displayName: Publish web server archive
|
|
condition: and(succeeded(), ne(variables['VSCODE_PUBLISH'], 'false'))
|