mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
build snap packages for linux arm
This commit is contained in:
parent
896848239d
commit
edf43e529a
|
@ -1,217 +1,215 @@
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
mkdir -p .build
|
mkdir -p .build
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
echo -n $BUILD_SOURCEVERSION > .build/commit
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
echo -n $VSCODE_QUALITY > .build/quality
|
||||||
displayName: Prepare cache flag
|
displayName: Prepare cache flag
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
||||||
inputs:
|
inputs:
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
keyfile: "build/.cachesalt, .build/commit, .build/quality"
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
targetfolder: ".build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min"
|
||||||
vstsFeed: 'npm-vscode'
|
vstsFeed: "npm-vscode"
|
||||||
platformIndependent: true
|
platformIndependent: true
|
||||||
alias: 'Compilation'
|
alias: "Compilation"
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
exit 1
|
exit 1
|
||||||
displayName: Check RestoreCache
|
displayName: Check RestoreCache
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.x"
|
versionSpec: "1.x"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
- task: AzureKeyVault@1
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
displayName: "Azure Key Vault: Get Secrets"
|
||||||
inputs:
|
inputs:
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
azureSubscription: "vscode-builds-subscription"
|
||||||
KeyVaultName: vscode
|
KeyVaultName: vscode
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
cat << EOF > ~/.netrc
|
cat << EOF > ~/.netrc
|
||||||
machine github.com
|
machine github.com
|
||||||
login vscode
|
login vscode
|
||||||
password $(github-distro-mixin-password)
|
password $(github-distro-mixin-password)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
git config user.email "vscode@microsoft.com"
|
git config user.email "vscode@microsoft.com"
|
||||||
git config user.name "VSCode"
|
git config user.name "VSCode"
|
||||||
displayName: Prepare tooling
|
displayName: Prepare tooling
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
||||||
git fetch distro
|
git fetch distro
|
||||||
git merge $(node -p "require('./package.json').distro")
|
git merge $(node -p "require('./package.json').distro")
|
||||||
displayName: Merge distro
|
displayName: Merge distro
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
echo -n $VSCODE_ARCH > .build/arch
|
echo -n $VSCODE_ARCH > .build/arch
|
||||||
displayName: Prepare arch cache flag
|
displayName: Prepare arch cache flag
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
||||||
inputs:
|
inputs:
|
||||||
keyfile: '.build/arch, build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
keyfile: ".build/arch, build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock"
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
targetfolder: "**/node_modules, !**/node_modules/**/node_modules"
|
||||||
vstsFeed: 'npm-vscode'
|
vstsFeed: "npm-vscode"
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
CHILD_CONCURRENCY=1 npm_config_arch=$(NPM_ARCH) yarn --frozen-lockfile
|
CHILD_CONCURRENCY=1 npm_config_arch=$(NPM_ARCH) yarn --frozen-lockfile
|
||||||
displayName: Install dependencies
|
displayName: Install dependencies
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
||||||
inputs:
|
inputs:
|
||||||
keyfile: '.build/arch, build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
keyfile: ".build/arch, build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock"
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
targetfolder: "**/node_modules, !**/node_modules/**/node_modules"
|
||||||
vstsFeed: 'npm-vscode'
|
vstsFeed: "npm-vscode"
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn postinstall
|
yarn postinstall
|
||||||
displayName: Run postinstall scripts
|
displayName: Run postinstall scripts
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
node build/azure-pipelines/mixin
|
node build/azure-pipelines/mixin
|
||||||
displayName: Mix in quality
|
displayName: Mix in quality
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
yarn gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
yarn gulp vscode-linux-$(VSCODE_ARCH)-min-ci
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
yarn gulp vscode-reh-web-linux-$(VSCODE_ARCH)-min-ci
|
||||||
displayName: Build
|
displayName: Build
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
service xvfb start
|
service xvfb start
|
||||||
displayName: Start xvfb
|
displayName: Start xvfb
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
||||||
displayName: Run unit tests (Electron)
|
displayName: Run unit tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
DISPLAY=:10 yarn test-browser --build --browser chromium --tfs "Browser Unit Tests"
|
DISPLAY=:10 yarn test-browser --build --browser chromium --tfs "Browser Unit Tests"
|
||||||
displayName: Run unit tests (Browser)
|
displayName: Run unit tests (Browser)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
# Figure out the full absolute path of the product we just built
|
# Figure out the full absolute path of the product we just built
|
||||||
# including the remote server and configure the integration tests
|
# including the remote server and configure the integration tests
|
||||||
# to run with these builds instead of running out of sources.
|
# to run with these builds instead of running out of sources.
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
||||||
DISPLAY=:10 ./scripts/test-integration.sh --build --tfs "Integration Tests"
|
DISPLAY=:10 ./scripts/test-integration.sh --build --tfs "Integration Tests"
|
||||||
displayName: Run integration tests (Electron)
|
displayName: Run integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
|
||||||
DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
|
DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
|
||||||
displayName: Run integration tests (Browser)
|
displayName: Run integration tests (Browser)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
|
||||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
|
||||||
DISPLAY=:10 ./resources/server/test/test-remote-integration.sh
|
DISPLAY=:10 ./resources/server/test/test-remote-integration.sh
|
||||||
displayName: Run remote integration tests (Electron)
|
displayName: Run remote integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
- task: PublishPipelineArtifact@0
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'crash-dump-linux-$(VSCODE_ARCH)'
|
artifactName: "crash-dump-linux-$(VSCODE_ARCH)"
|
||||||
targetPath: .build/crashes
|
targetPath: .build/crashes
|
||||||
displayName: 'Publish Crash Reports'
|
displayName: "Publish Crash Reports"
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
condition: failed()
|
condition: failed()
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Tests Results
|
displayName: Publish Tests Results
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFiles: '*-results.xml'
|
testResultsFiles: "*-results.xml"
|
||||||
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
|
searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"
|
||||||
condition: and(succeededOrFailed(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeededOrFailed(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
|
yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
|
||||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-rpm"
|
yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-rpm"
|
||||||
displayName: Build deb, rpm packages
|
displayName: Build deb, rpm packages
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
|
yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
|
||||||
displayName: Prepare snap package
|
displayName: Prepare snap package
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
|
|
||||||
|
|
||||||
# needed for code signing
|
# needed for code signing
|
||||||
- task: UseDotNet@2
|
- task: UseDotNet@2
|
||||||
displayName: 'Install .NET Core SDK 2.x'
|
displayName: "Install .NET Core SDK 2.x"
|
||||||
inputs:
|
inputs:
|
||||||
version: 2.x
|
version: 2.x
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
inputs:
|
inputs:
|
||||||
ConnectedServiceName: 'ESRP CodeSign'
|
ConnectedServiceName: "ESRP CodeSign"
|
||||||
FolderPath: '.build/linux/rpm'
|
FolderPath: ".build/linux/rpm"
|
||||||
Pattern: '*.rpm'
|
Pattern: "*.rpm"
|
||||||
signConfigType: inlineSignParams
|
signConfigType: inlineSignParams
|
||||||
inlineOperation: |
|
inlineOperation: |
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"keyCode": "CP-450779-Pgp",
|
"keyCode": "CP-450779-Pgp",
|
||||||
"operationSetCode": "LinuxSign",
|
"operationSetCode": "LinuxSign",
|
||||||
"parameters": [ ],
|
"parameters": [ ],
|
||||||
"toolName": "sign",
|
"toolName": "sign",
|
||||||
"toolVersion": "1.0"
|
"toolVersion": "1.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
SessionTimeout: 120
|
SessionTimeout: 120
|
||||||
displayName: Codesign rpm
|
displayName: Codesign rpm
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
||||||
VSCODE_ARCH="$(VSCODE_ARCH)" \
|
VSCODE_ARCH="$(VSCODE_ARCH)" \
|
||||||
./build/azure-pipelines/linux/publish.sh
|
./build/azure-pipelines/linux/publish.sh
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
- task: PublishPipelineArtifact@0
|
||||||
displayName: 'Publish Pipeline Artifact'
|
displayName: "Publish Pipeline Artifact"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: 'snap-$(VSCODE_ARCH)'
|
artifactName: "snap-$(VSCODE_ARCH)"
|
||||||
targetPath: .build/linux/snap-tarball
|
targetPath: .build/linux/snap-tarball
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||||
displayName: 'Component Detection'
|
displayName: "Component Detection"
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
|
|
|
@ -52,11 +52,9 @@ RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
|
||||||
|
|
||||||
node build/azure-pipelines/common/createAsset.js "$PLATFORM_RPM" package "$RPM_FILENAME" "$RPM_PATH"
|
node build/azure-pipelines/common/createAsset.js "$PLATFORM_RPM" package "$RPM_FILENAME" "$RPM_PATH"
|
||||||
|
|
||||||
if [ "$VSCODE_ARCH" == "x64" ]; then
|
# Publish Snap
|
||||||
# Publish Snap
|
# Pack snap tarball artifact, in order to preserve file perms
|
||||||
# Pack snap tarball artifact, in order to preserve file perms
|
mkdir -p $REPO/.build/linux/snap-tarball
|
||||||
mkdir -p $REPO/.build/linux/snap-tarball
|
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$VSCODE_ARCH.tar.gz"
|
||||||
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$VSCODE_ARCH.tar.gz"
|
rm -rf $SNAP_TARBALL_PATH
|
||||||
rm -rf $SNAP_TARBALL_PATH
|
(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap)
|
||||||
(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap)
|
|
||||||
fi
|
|
||||||
|
|
|
@ -1,52 +1,52 @@
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.14.1"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.x"
|
versionSpec: "1.x"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
- task: AzureKeyVault@1
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
displayName: "Azure Key Vault: Get Secrets"
|
||||||
inputs:
|
inputs:
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
azureSubscription: "vscode-builds-subscription"
|
||||||
KeyVaultName: vscode
|
KeyVaultName: vscode
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@0
|
- task: DownloadPipelineArtifact@0
|
||||||
displayName: 'Download Pipeline Artifact'
|
displayName: "Download Pipeline Artifact"
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: snap-x64
|
artifactName: snap-$(VSCODE_ARCH)
|
||||||
targetPath: .build/linux/snap-tarball
|
targetPath: .build/linux/snap-tarball
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Get snapcraft version
|
# Get snapcraft version
|
||||||
snapcraft --version
|
snapcraft --version
|
||||||
|
|
||||||
# Make sure we get latest packages
|
# Make sure we get latest packages
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get upgrade -y
|
sudo apt-get upgrade -y
|
||||||
|
|
||||||
# Define variables
|
# Define variables
|
||||||
REPO="$(pwd)"
|
REPO="$(pwd)"
|
||||||
SNAP_ROOT="$REPO/.build/linux/snap/x64"
|
SNAP_ROOT="$REPO/.build/linux/snap/$(VSCODE_ARCH)"
|
||||||
|
|
||||||
# Install build dependencies
|
# Install build dependencies
|
||||||
(cd build && yarn)
|
(cd build && yarn)
|
||||||
|
|
||||||
# Unpack snap tarball artifact, in order to preserve file perms
|
# Unpack snap tarball artifact, in order to preserve file perms
|
||||||
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-x64.tar.gz"
|
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$(VSCODE_ARCH).tar.gz"
|
||||||
(cd .build/linux && tar -xzf $SNAP_TARBALL_PATH)
|
(cd .build/linux && tar -xzf $SNAP_TARBALL_PATH)
|
||||||
|
|
||||||
# Create snap package
|
# Create snap package
|
||||||
BUILD_VERSION="$(date +%s)"
|
BUILD_VERSION="$(date +%s)"
|
||||||
SNAP_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.snap"
|
SNAP_FILENAME="code-$VSCODE_QUALITY-$(VSCODE_ARCH)-$BUILD_VERSION.snap"
|
||||||
SNAP_PATH="$SNAP_ROOT/$SNAP_FILENAME"
|
SNAP_PATH="$SNAP_ROOT/$SNAP_FILENAME"
|
||||||
(cd $SNAP_ROOT/code-* && sudo --preserve-env snapcraft snap --output "$SNAP_PATH")
|
(cd $SNAP_ROOT/code-* && sudo --preserve-env snapcraft snap --output "$SNAP_PATH")
|
||||||
|
|
||||||
# Publish snap package
|
# Publish snap package
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
||||||
node build/azure-pipelines/common/createAsset.js "linux-snap-x64" package "$SNAP_FILENAME" "$SNAP_PATH"
|
node build/azure-pipelines/common/createAsset.js "linux-snap-$(VSCODE_ARCH)" package "$SNAP_FILENAME" "$SNAP_PATH"
|
||||||
|
|
|
@ -2,162 +2,182 @@ trigger: none
|
||||||
pr: none
|
pr: none
|
||||||
|
|
||||||
schedules:
|
schedules:
|
||||||
- cron: "0 5 * * Mon-Fri"
|
- cron: "0 5 * * Mon-Fri"
|
||||||
displayName: Mon-Fri at 7:00
|
displayName: Mon-Fri at 7:00
|
||||||
branches:
|
branches:
|
||||||
include:
|
include:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: vscode-x64
|
- container: vscode-x64
|
||||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
|
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
|
||||||
endpoint: VSCodeHub
|
endpoint: VSCodeHub
|
||||||
- container: vscode-arm64
|
- container: vscode-arm64
|
||||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:stretch-arm64
|
image: vscodehub.azurecr.io/vscode-linux-build-agent:stretch-arm64
|
||||||
endpoint: VSCodeHub
|
endpoint: VSCodeHub
|
||||||
- container: vscode-armhf
|
- container: vscode-armhf
|
||||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:stretch-armhf
|
image: vscodehub.azurecr.io/vscode-linux-build-agent:stretch-armhf
|
||||||
endpoint: VSCodeHub
|
endpoint: VSCodeHub
|
||||||
- container: snapcraft
|
- container: snapcraft
|
||||||
image: snapcore/snapcraft:stable
|
image: snapcore/snapcraft:stable
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- stage: Compile
|
- stage: Compile
|
||||||
jobs:
|
jobs:
|
||||||
- job: Compile
|
- job: Compile
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu-16.04'
|
vmImage: "Ubuntu-16.04"
|
||||||
container: vscode-x64
|
container: vscode-x64
|
||||||
steps:
|
steps:
|
||||||
- template: product-compile.yml
|
- template: product-compile.yml
|
||||||
|
|
||||||
- stage: Windows
|
- stage: Windows
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
|
||||||
pool:
|
|
||||||
vmImage: VS2017-Win2016
|
|
||||||
jobs:
|
|
||||||
- job: Windows
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32.yml
|
|
||||||
|
|
||||||
- job: Windows32
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true'))
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: ia32
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32.yml
|
|
||||||
|
|
||||||
- job: WindowsARM64
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_ARM64'], 'true'))
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: arm64
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32-arm64.yml
|
|
||||||
|
|
||||||
- stage: Linux
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
jobs:
|
|
||||||
- job: Linux
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
|
||||||
container: vscode-x64
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
NPM_ARCH: x64
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux.yml
|
|
||||||
|
|
||||||
- job: LinuxSnap
|
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- Linux
|
- Compile
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
container: snapcraft
|
pool:
|
||||||
variables:
|
vmImage: VS2017-Win2016
|
||||||
VSCODE_ARCH: x64
|
jobs:
|
||||||
steps:
|
- job: Windows
|
||||||
- template: linux/snap-build-linux.yml
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
||||||
|
timeoutInMinutes: 90
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
steps:
|
||||||
|
- template: win32/product-build-win32.yml
|
||||||
|
|
||||||
- job: LinuxArmhf
|
- job: Windows32
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true'))
|
||||||
container: vscode-armhf
|
timeoutInMinutes: 90
|
||||||
variables:
|
variables:
|
||||||
VSCODE_ARCH: armhf
|
VSCODE_ARCH: ia32
|
||||||
NPM_ARCH: armv7l
|
steps:
|
||||||
steps:
|
- template: win32/product-build-win32.yml
|
||||||
- template: linux/product-build-linux.yml
|
|
||||||
|
|
||||||
- job: LinuxArm64
|
- job: WindowsARM64
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_ARM64'], 'true'))
|
||||||
container: vscode-arm64
|
timeoutInMinutes: 90
|
||||||
variables:
|
variables:
|
||||||
VSCODE_ARCH: arm64
|
VSCODE_ARCH: arm64
|
||||||
NPM_ARCH: arm64
|
steps:
|
||||||
steps:
|
- template: win32/product-build-win32-arm64.yml
|
||||||
- template: linux/product-build-linux.yml
|
|
||||||
|
|
||||||
- job: LinuxAlpine
|
- stage: Linux
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'))
|
dependsOn:
|
||||||
steps:
|
- Compile
|
||||||
- template: linux/product-build-alpine.yml
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
|
pool:
|
||||||
|
vmImage: "Ubuntu-16.04"
|
||||||
|
jobs:
|
||||||
|
- job: Linux
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
||||||
|
container: vscode-x64
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
NPM_ARCH: x64
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux.yml
|
||||||
|
|
||||||
- job: LinuxWeb
|
- job: LinuxSnap
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WEB'], 'true'))
|
dependsOn:
|
||||||
variables:
|
- Linux
|
||||||
VSCODE_ARCH: x64
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
||||||
steps:
|
container: snapcraft
|
||||||
- template: web/product-build-web.yml
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
steps:
|
||||||
|
- template: linux/snap-build-linux.yml
|
||||||
|
|
||||||
- stage: macOS
|
- job: LinuxArmhf
|
||||||
dependsOn:
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
||||||
- Compile
|
container: vscode-armhf
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
variables:
|
||||||
pool:
|
VSCODE_ARCH: armhf
|
||||||
vmImage: macOS-latest
|
NPM_ARCH: armv7l
|
||||||
jobs:
|
steps:
|
||||||
- job: macOS
|
- template: linux/product-build-linux.yml
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_MACOS'], 'true'))
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
steps:
|
|
||||||
- template: darwin/product-build-darwin.yml
|
|
||||||
|
|
||||||
- stage: Mooncake
|
- job: LinuxSnapArmhf
|
||||||
dependsOn:
|
dependsOn:
|
||||||
- Windows
|
- LinuxArmhf
|
||||||
- Linux
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
||||||
- macOS
|
container: snapcraft
|
||||||
condition: and(succeededOrFailed(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
variables:
|
||||||
pool:
|
VSCODE_ARCH: armhf
|
||||||
vmImage: 'Ubuntu-16.04'
|
steps:
|
||||||
jobs:
|
- template: linux/snap-build-linux.yml
|
||||||
- job: SyncMooncake
|
|
||||||
displayName: Sync Mooncake
|
|
||||||
steps:
|
|
||||||
- template: sync-mooncake.yml
|
|
||||||
|
|
||||||
- stage: Publish
|
- job: LinuxArm64
|
||||||
dependsOn:
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
|
||||||
- Windows
|
container: vscode-arm64
|
||||||
- Linux
|
variables:
|
||||||
- macOS
|
VSCODE_ARCH: arm64
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), or(eq(variables['VSCODE_RELEASE'], 'true'), and(or(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['VSCODE_QUALITY'], 'exploration')), eq(variables['Build.Reason'], 'Schedule'))))
|
NPM_ARCH: arm64
|
||||||
pool:
|
steps:
|
||||||
vmImage: 'Ubuntu-16.04'
|
- template: linux/product-build-linux.yml
|
||||||
jobs:
|
|
||||||
- job: BuildService
|
- job: LinuxSnapArm64
|
||||||
displayName: Build Service
|
dependsOn:
|
||||||
steps:
|
- LinuxArm64
|
||||||
- template: release.yml
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
|
||||||
|
container: snapcraft
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: arm64
|
||||||
|
steps:
|
||||||
|
- template: linux/snap-build-linux.yml
|
||||||
|
|
||||||
|
- job: LinuxAlpine
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'))
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-alpine.yml
|
||||||
|
|
||||||
|
- job: LinuxWeb
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WEB'], 'true'))
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
steps:
|
||||||
|
- template: web/product-build-web.yml
|
||||||
|
|
||||||
|
- stage: macOS
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
|
pool:
|
||||||
|
vmImage: macOS-latest
|
||||||
|
jobs:
|
||||||
|
- job: macOS
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_MACOS'], 'true'))
|
||||||
|
timeoutInMinutes: 90
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
steps:
|
||||||
|
- template: darwin/product-build-darwin.yml
|
||||||
|
|
||||||
|
- stage: Mooncake
|
||||||
|
dependsOn:
|
||||||
|
- Windows
|
||||||
|
- Linux
|
||||||
|
- macOS
|
||||||
|
condition: and(succeededOrFailed(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
|
pool:
|
||||||
|
vmImage: "Ubuntu-16.04"
|
||||||
|
jobs:
|
||||||
|
- job: SyncMooncake
|
||||||
|
displayName: Sync Mooncake
|
||||||
|
steps:
|
||||||
|
- template: sync-mooncake.yml
|
||||||
|
|
||||||
|
- stage: Publish
|
||||||
|
dependsOn:
|
||||||
|
- Windows
|
||||||
|
- Linux
|
||||||
|
- macOS
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), or(eq(variables['VSCODE_RELEASE'], 'true'), and(or(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['VSCODE_QUALITY'], 'exploration')), eq(variables['Build.Reason'], 'Schedule'))))
|
||||||
|
pool:
|
||||||
|
vmImage: "Ubuntu-16.04"
|
||||||
|
jobs:
|
||||||
|
- job: BuildService
|
||||||
|
displayName: Build Service
|
||||||
|
steps:
|
||||||
|
- template: release.yml
|
||||||
|
|
|
@ -237,6 +237,7 @@ function prepareSnapPackage(arch) {
|
||||||
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
|
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
|
||||||
.pipe(replace('@@NAME@@', product.applicationName))
|
.pipe(replace('@@NAME@@', product.applicationName))
|
||||||
.pipe(replace('@@VERSION@@', commit.substr(0, 8)))
|
.pipe(replace('@@VERSION@@', commit.substr(0, 8)))
|
||||||
|
.pipe(replace('@@ARCHITECTURE@@', arch))
|
||||||
.pipe(rename('snap/snapcraft.yaml'));
|
.pipe(rename('snap/snapcraft.yaml'));
|
||||||
|
|
||||||
const electronLaunch = gulp.src('resources/linux/snap/electron-launch', { base: '.' })
|
const electronLaunch = gulp.src('resources/linux/snap/electron-launch', { base: '.' })
|
||||||
|
|
|
@ -6,6 +6,10 @@ description: |
|
||||||
simplicity of a code editor with what developers need for the core
|
simplicity of a code editor with what developers need for the core
|
||||||
edit-build-debug cycle.
|
edit-build-debug cycle.
|
||||||
|
|
||||||
|
architectures:
|
||||||
|
- build-on: amd64
|
||||||
|
run-on: @@ARCHITECTURE@@
|
||||||
|
|
||||||
grade: stable
|
grade: stable
|
||||||
confinement: classic
|
confinement: classic
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue