mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-03 18:47:36 -05:00
Compare commits
39 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb35dae1d1 | ||
|
|
cc0a144169 | ||
|
|
b973f9e0ec | ||
|
|
d62068025c | ||
|
|
b2952d2ddf | ||
|
|
a21244816d | ||
|
|
a9aeb57dc4 | ||
|
|
00537ed199 | ||
|
|
c2df3e0e0a | ||
|
|
e3afb1cffc | ||
|
|
b475311f85 | ||
|
|
45005d61e0 | ||
|
|
adfddeae27 | ||
|
|
a7429267bb | ||
|
|
ff415d6a03 | ||
|
|
b4dc35a4de | ||
|
|
29c7ccad39 | ||
|
|
1da3635d03 | ||
|
|
1f50015ed2 | ||
|
|
01892422cb | ||
|
|
afce60b06f | ||
|
|
a2b87f6158 | ||
|
|
76a2f92daf | ||
|
|
5b09d57196 | ||
|
|
95bf18f859 | ||
|
|
1fc648ff37 | ||
|
|
37ba956bad | ||
|
|
697f887539 | ||
|
|
7b42141958 | ||
|
|
158b00f9b4 | ||
|
|
43ac8dfd20 | ||
|
|
34d8d52e7a | ||
|
|
c738b26c04 | ||
|
|
6090e7173f | ||
|
|
7ebf746584 | ||
|
|
e9d04d75ac | ||
|
|
605160a1ba | ||
|
|
82b8750b63 | ||
|
|
61f7f19d12 |
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
name: Bug report
|
name: Bug report
|
||||||
about: Create a report to help us improve
|
about: Create a report to help us improve
|
||||||
title: ''
|
title: ''
|
||||||
labels: ''
|
labels: Bug
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1 +0,0 @@
|
|||||||
blank_issues_enabled: false
|
|
||||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
name: Feature request
|
name: Feature request
|
||||||
about: Suggest an idea for this project
|
about: Suggest an idea for this project
|
||||||
title: ''
|
title: ''
|
||||||
labels: ''
|
labels: Enhancement
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
73
.github/classifier.yml
vendored
73
.github/classifier.yml
vendored
@@ -1,36 +1,49 @@
|
|||||||
{
|
{
|
||||||
perform: true,
|
perform: false,
|
||||||
alwaysRequireAssignee: false,
|
alwaysRequireAssignee: false,
|
||||||
labelsRequiringAssignee: [],
|
labelsRequiringAssignee: [],
|
||||||
defaultLabel: 'Triage: Needed',
|
|
||||||
defaultAssignee: '',
|
|
||||||
autoAssignees: {
|
autoAssignees: {
|
||||||
Area - Acquisition: [],
|
accessibility: [],
|
||||||
Area - Azure: [],
|
acquisition: [],
|
||||||
Area - Backup\Restore: [],
|
agent: [],
|
||||||
Area - Charting\Insights: [],
|
azure: [],
|
||||||
Area - Connection: [ charles-gagnon ],
|
backup: [],
|
||||||
Area - DacFX: [],
|
bcdr: [],
|
||||||
Area - Dashboard: [],
|
'chart viewer': [],
|
||||||
Area - Data Explorer: [],
|
connection: [],
|
||||||
Area - Edit Data: [],
|
dacfx: [],
|
||||||
Area - Extensibility: [],
|
dashboard: [],
|
||||||
Area - External Table: [],
|
'data explorer': [],
|
||||||
Area - Fundamentals: [],
|
documentation: [],
|
||||||
Area - Language Service: [ charles-gagnon ],
|
'edit data': [],
|
||||||
Area - Localization: [],
|
export: [],
|
||||||
Area - Notebooks: [ chlafreniere ],
|
extensibility: [],
|
||||||
Area - Performance: [],
|
extensionManager: [],
|
||||||
Area - Query Editor: [ anthonydresser ],
|
globalization: [],
|
||||||
Area - Query Plan: [],
|
grid: [],
|
||||||
Area - Reliability: [],
|
import: [],
|
||||||
Area - Resource Deployment: [],
|
insights: [],
|
||||||
Area - Schema Compare: [],
|
intellisense: [],
|
||||||
Area - Shell: [],
|
localization: [],
|
||||||
Area - SQL Agent: [],
|
'managed instance': [],
|
||||||
Area - SQL Import: [],
|
notebooks: [],
|
||||||
Area - SQL Profiler: [],
|
'object explorer': [],
|
||||||
Area - SQL 2019: [],
|
performance: [],
|
||||||
Area - SSMS Integration: []
|
profiler: [],
|
||||||
|
'query editor': [],
|
||||||
|
'query execution': [],
|
||||||
|
reliability: [],
|
||||||
|
restore: [],
|
||||||
|
scripting: [],
|
||||||
|
'server group': [],
|
||||||
|
settings: [],
|
||||||
|
setup: [],
|
||||||
|
shell: [],
|
||||||
|
showplan: [],
|
||||||
|
snippet: [],
|
||||||
|
sql2019Preview: [],
|
||||||
|
sqldw: [],
|
||||||
|
supportability: [],
|
||||||
|
ux: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
.github/pull_request_template.md
vendored
9
.github/pull_request_template.md
vendored
@@ -1,9 +0,0 @@
|
|||||||
<!-- Thank you for submitting a Pull Request. Please:
|
|
||||||
* Read our Pull Request guidelines:
|
|
||||||
https://github.com/Microsoft/azuredatastudio/wiki/How-to-Contribute#pull-requests.
|
|
||||||
* Associate an issue with the Pull Request.
|
|
||||||
* Ensure that the code is up-to-date with the `master` branch.
|
|
||||||
* Include a description of the proposed changes and how to test them.
|
|
||||||
-->
|
|
||||||
|
|
||||||
This PR fixes #
|
|
||||||
6
.github/stale.yml
vendored
6
.github/stale.yml
vendored
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
perform: true,
|
|
||||||
label: 'Stale PR',
|
|
||||||
daysSinceLastUpdate: 7,
|
|
||||||
ignoredLabels: ['Do Not Merge']
|
|
||||||
}
|
|
||||||
118
.github/workflows/ci.yml
vendored
118
.github/workflows/ci.yml
vendored
@@ -1,118 +0,0 @@
|
|||||||
name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- release/*
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- release/*
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CHILD_CONCURRENCY: "1"
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
|
||||||
- run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libkrb5-dev # {{SQL CARBON EDIT}} add kerberos dep
|
|
||||||
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
|
|
||||||
sudo chmod +x /etc/init.d/xvfb
|
|
||||||
sudo update-rc.d xvfb defaults
|
|
||||||
sudo service xvfb start
|
|
||||||
name: Setup Build Environment
|
|
||||||
- uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 10
|
|
||||||
# TODO: cache node modules
|
|
||||||
- run: yarn --frozen-lockfile
|
|
||||||
name: Install Dependencies
|
|
||||||
- run: yarn electron x64
|
|
||||||
name: Download Electron
|
|
||||||
- run: yarn gulp hygiene --skip-tslint
|
|
||||||
name: Run Hygiene Checks
|
|
||||||
- run: yarn gulp tslint
|
|
||||||
name: Run TSLint Checks
|
|
||||||
- run: yarn strict-null-check # {{SQL CARBON EDIT}} add step
|
|
||||||
name: Run Strict Null Check
|
|
||||||
# - run: yarn monaco-compile-check {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Run Monaco Editor Checks
|
|
||||||
- run: yarn compile
|
|
||||||
name: Compile Sources
|
|
||||||
# - run: yarn download-builtin-extensions {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Download Built-in Extensions
|
|
||||||
- run: DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests"
|
|
||||||
name: Run Unit Tests
|
|
||||||
# - run: DISPLAY=:10 ./scripts/test-integration.sh --tfs "Integration Tests" {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Run Integration Tests
|
|
||||||
|
|
||||||
windows:
|
|
||||||
runs-on: windows-2016
|
|
||||||
env:
|
|
||||||
CHILD_CONCURRENCY: "1"
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 10
|
|
||||||
- uses: actions/setup-python@v1
|
|
||||||
with:
|
|
||||||
python-version: '2.x'
|
|
||||||
- run: yarn --frozen-lockfile
|
|
||||||
name: Install Dependencies
|
|
||||||
- run: yarn electron
|
|
||||||
name: Download Electron
|
|
||||||
- run: yarn gulp hygiene --skip-tslint
|
|
||||||
name: Run Hygiene Checks
|
|
||||||
- run: yarn gulp tslint
|
|
||||||
name: Run TSLint Checks
|
|
||||||
- run: yarn strict-null-check # {{SQL CARBON EDIT}} add step
|
|
||||||
name: Run Strict Null Check
|
|
||||||
# - run: yarn monaco-compile-check {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Run Monaco Editor Checks
|
|
||||||
- run: yarn compile
|
|
||||||
name: Compile Sources
|
|
||||||
# - run: yarn download-builtin-extensions {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Download Built-in Extensions
|
|
||||||
- run: .\scripts\test.bat --tfs "Unit Tests"
|
|
||||||
name: Run Unit Tests
|
|
||||||
# - run: .\scripts\test-integration.bat --tfs "Integration Tests" {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Run Integration Tests
|
|
||||||
|
|
||||||
darwin:
|
|
||||||
runs-on: macos-latest
|
|
||||||
env:
|
|
||||||
CHILD_CONCURRENCY: "1"
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: 10
|
|
||||||
- run: yarn --frozen-lockfile
|
|
||||||
name: Install Dependencies
|
|
||||||
- run: yarn electron x64
|
|
||||||
name: Download Electron
|
|
||||||
- run: yarn gulp hygiene --skip-tslint
|
|
||||||
name: Run Hygiene Checks
|
|
||||||
- run: yarn gulp tslint
|
|
||||||
name: Run TSLint Checks
|
|
||||||
- run: yarn strict-null-check # {{SQL CARBON EDIT}} add step
|
|
||||||
name: Run Strict Null Check
|
|
||||||
# - run: yarn monaco-compile-check {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Run Monaco Editor Checks
|
|
||||||
- run: yarn compile
|
|
||||||
name: Compile Sources
|
|
||||||
# - run: yarn download-builtin-extensions {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Download Built-in Extensions
|
|
||||||
- run: ./scripts/test.sh --tfs "Unit Tests"
|
|
||||||
name: Run Unit Tests
|
|
||||||
# - run: ./scripts/test-integration.sh --tfs "Integration Tests" {{SQL CARBON EDIT}} remove step
|
|
||||||
# name: Run Integration Tests
|
|
||||||
13
.github/workflows/tslint.yml
vendored
13
.github/workflows/tslint.yml
vendored
@@ -1,13 +0,0 @@
|
|||||||
name: TSLint Enforcement
|
|
||||||
on: [pull_request]
|
|
||||||
jobs:
|
|
||||||
job:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 5
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: TSLint
|
|
||||||
uses: aaomidi/gh-action-tslint@master
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
tslint_config: 'tslint-sql.json'
|
|
||||||
12
.gitignore
vendored
12
.gitignore
vendored
@@ -1,5 +1,4 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.cache
|
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
node_modules/
|
node_modules/
|
||||||
@@ -15,19 +14,8 @@ out-editor-min/
|
|||||||
out-monaco-editor-core/
|
out-monaco-editor-core/
|
||||||
out-vscode/
|
out-vscode/
|
||||||
out-vscode-min/
|
out-vscode-min/
|
||||||
out-vscode-reh/
|
|
||||||
out-vscode-reh-min/
|
|
||||||
out-vscode-reh-pkg/
|
|
||||||
out-vscode-reh-web/
|
|
||||||
out-vscode-reh-web-min/
|
|
||||||
out-vscode-reh-web-pkg/
|
|
||||||
out-vscode-web/
|
|
||||||
out-vscode-web-min/
|
|
||||||
src/vs/server
|
|
||||||
resources/server
|
|
||||||
build/node_modules
|
build/node_modules
|
||||||
coverage/
|
coverage/
|
||||||
test_data/
|
test_data/
|
||||||
test-results/
|
test-results/
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
*.vsix
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
/**
|
|
||||||
* @name No floating promises
|
|
||||||
* @kind problem
|
|
||||||
* @problem.severity error
|
|
||||||
* @id js/experimental/floating-promise
|
|
||||||
*/
|
|
||||||
import javascript
|
|
||||||
|
|
||||||
private predicate isEscapingPromise(PromiseDefinition promise) {
|
|
||||||
exists (DataFlow::Node escape | promise.flowsTo(escape) |
|
|
||||||
escape = any(DataFlow::InvokeNode invk).getAnArgument()
|
|
||||||
or
|
|
||||||
escape = any(DataFlow::FunctionNode fun).getAReturn()
|
|
||||||
or
|
|
||||||
escape = any(ThrowStmt t).getExpr().flow()
|
|
||||||
or
|
|
||||||
escape = any(GlobalVariable v).getAnAssignedExpr().flow()
|
|
||||||
or
|
|
||||||
escape = any(DataFlow::PropWrite write).getRhs()
|
|
||||||
or
|
|
||||||
exists(WithStmt with, Assignment assign |
|
|
||||||
with.mayAffect(assign.getLhs()) and
|
|
||||||
assign.getRhs().flow() = escape
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
from PromiseDefinition promise
|
|
||||||
where
|
|
||||||
not exists(promise.getAMethodCall(any(string m | m = "then" or m = "catch" or m = "finally"))) and
|
|
||||||
not exists (AwaitExpr e | promise.flowsTo(e.getOperand().flow())) and
|
|
||||||
not isEscapingPromise(promise)
|
|
||||||
select promise, "This promise appears to be a floating promise"
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"useTabs": true,
|
|
||||||
"printWidth": 120,
|
|
||||||
"semi": true,
|
|
||||||
"singleQuote": true
|
|
||||||
}
|
|
||||||
70
.vscode/cglicenses.schema.json
vendored
70
.vscode/cglicenses.schema.json
vendored
@@ -1,61 +1,23 @@
|
|||||||
{
|
{
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"oneOf": [
|
"type": "object",
|
||||||
{
|
"required": [
|
||||||
"type": "object",
|
"name",
|
||||||
"required": [
|
"licenseDetail"
|
||||||
"name",
|
],
|
||||||
"prependLicenseText"
|
"properties": {
|
||||||
],
|
"name": {
|
||||||
"properties": {
|
"type": "string",
|
||||||
"name": {
|
"description": "The name of the dependency"
|
||||||
"type": "string",
|
|
||||||
"description": "The name of the dependency"
|
|
||||||
},
|
|
||||||
"fullLicenseText": {
|
|
||||||
"type": "array",
|
|
||||||
"description": "The complete license text of the dependency",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"prependLicenseText": {
|
|
||||||
"type": "array",
|
|
||||||
"description": "A piece of text to prepend to the auto-detected license text of the dependency",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
"licenseDetail": {
|
||||||
"type": "object",
|
"type": "array",
|
||||||
"required": [
|
"description": "The complete license text of the dependency",
|
||||||
"name",
|
"items": {
|
||||||
"fullLicenseText"
|
"type": "string"
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"name": {
|
|
||||||
"type": "string",
|
|
||||||
"description": "The name of the dependency"
|
|
||||||
},
|
|
||||||
"fullLicenseText": {
|
|
||||||
"type": "array",
|
|
||||||
"description": "The complete license text of the dependency",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"prependLicenseText": {
|
|
||||||
"type": "array",
|
|
||||||
"description": "A piece of text to prepend to the auto-detected license text of the dependency",
|
|
||||||
"items": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
1
.vscode/extensions.json
vendored
1
.vscode/extensions.json
vendored
@@ -4,7 +4,6 @@
|
|||||||
"recommendations": [
|
"recommendations": [
|
||||||
"ms-vscode.vscode-typescript-tslint-plugin",
|
"ms-vscode.vscode-typescript-tslint-plugin",
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"EditorConfig.EditorConfig",
|
|
||||||
"msjsdiag.debugger-for-chrome"
|
"msjsdiag.debugger-for-chrome"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
83
.vscode/launch.json
vendored
83
.vscode/launch.json
vendored
@@ -16,7 +16,6 @@
|
|||||||
"request": "attach",
|
"request": "attach",
|
||||||
"name": "Attach to Extension Host",
|
"name": "Attach to Extension Host",
|
||||||
"port": 5870,
|
"port": 5870,
|
||||||
"timeout": 30000,
|
|
||||||
"restart": true,
|
"restart": true,
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceFolder}/out/**/*.js"
|
"${workspaceFolder}/out/**/*.js"
|
||||||
@@ -67,7 +66,8 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Launch azuredatastudio",
|
"name": "Launch azuredatastudio",
|
||||||
"windows": {
|
"windows": {
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat"
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat",
|
||||||
|
"timeout": 20000
|
||||||
},
|
},
|
||||||
"osx": {
|
"osx": {
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
||||||
@@ -75,8 +75,6 @@
|
|||||||
"linux": {
|
"linux": {
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
|
||||||
},
|
},
|
||||||
"port": 9222,
|
|
||||||
"timeout": 20000,
|
|
||||||
"env": {
|
"env": {
|
||||||
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null
|
"VSCODE_EXTHOST_WILL_SEND_SOCKET": null
|
||||||
},
|
},
|
||||||
@@ -93,9 +91,6 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "Launch ADS (Main Process)",
|
"name": "Launch ADS (Main Process)",
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh",
|
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh",
|
||||||
"windows": {
|
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat",
|
|
||||||
},
|
|
||||||
"runtimeArgs": [
|
"runtimeArgs": [
|
||||||
"--no-cached-data"
|
"--no-cached-data"
|
||||||
],
|
],
|
||||||
@@ -127,33 +122,6 @@
|
|||||||
"webRoot": "${workspaceFolder}",
|
"webRoot": "${workspaceFolder}",
|
||||||
"timeout": 45000
|
"timeout": 45000
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "chrome",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Launch ADS (Web) (TBD)",
|
|
||||||
"runtimeExecutable": "yarn",
|
|
||||||
"runtimeArgs": [
|
|
||||||
"web"
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "chrome",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Launch ADS (Web, Chrome) (TBD)",
|
|
||||||
"url": "http://localhost:8080",
|
|
||||||
"preLaunchTask": "Run web"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Git Unit Tests",
|
|
||||||
"program": "${workspaceFolder}/extensions/git/node_modules/mocha/bin/_mocha",
|
|
||||||
"stopOnEntry": false,
|
|
||||||
"cwd": "${workspaceFolder}/extensions/git",
|
|
||||||
"outFiles": [
|
|
||||||
"${workspaceFolder}/extensions/git/out/**/*.js"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Launch Built-in Extension",
|
"name": "Launch Built-in Extension",
|
||||||
"type": "extensionHost",
|
"type": "extensionHost",
|
||||||
@@ -192,10 +160,7 @@
|
|||||||
"cwd": "${workspaceFolder}",
|
"cwd": "${workspaceFolder}",
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceFolder}/out/**/*.js"
|
"${workspaceFolder}/out/**/*.js"
|
||||||
],
|
]
|
||||||
"env": {
|
|
||||||
"MOCHA_COLORS": "true"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "chrome",
|
"type": "chrome",
|
||||||
@@ -213,22 +178,6 @@
|
|||||||
"webRoot": "${workspaceFolder}",
|
"webRoot": "${workspaceFolder}",
|
||||||
"timeout": 45000
|
"timeout": 45000
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "chrome",
|
|
||||||
"request": "launch",
|
|
||||||
"name": "Run Extension Integration Tests",
|
|
||||||
"windows": {
|
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.bat"
|
|
||||||
},
|
|
||||||
"osx": {
|
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.sh"
|
|
||||||
},
|
|
||||||
"linux": {
|
|
||||||
"runtimeExecutable": "${workspaceFolder}/scripts/sql-test-integration.sh"
|
|
||||||
},
|
|
||||||
"webRoot": "${workspaceFolder}",
|
|
||||||
"timeout": 45000
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
"compounds": [
|
"compounds": [
|
||||||
{
|
{
|
||||||
@@ -245,13 +194,6 @@
|
|||||||
"Run Extension Unit Tests"
|
"Run Extension Unit Tests"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Debug Extension Integration Tests",
|
|
||||||
"configurations": [
|
|
||||||
"Attach to Extension Host",
|
|
||||||
"Run Extension Integration Tests"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Debug azuredatastudio Main and Renderer",
|
"name": "Debug azuredatastudio Main and Renderer",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
@@ -260,33 +202,18 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Debug azuredatastudio Main, Renderer & Extension Host",
|
"name": "Search and Renderer processes",
|
||||||
"configurations": [
|
|
||||||
"Launch azuredatastudio",
|
|
||||||
"Attach to Main Process",
|
|
||||||
"Attach to Extension Host"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Debug Renderer and search processes",
|
|
||||||
"configurations": [
|
"configurations": [
|
||||||
"Launch azuredatastudio",
|
"Launch azuredatastudio",
|
||||||
"Attach to Search Process"
|
"Attach to Search Process"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Debug Renderer and Extension Host processes",
|
"name": "Renderer and Extension Host processes",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
"Launch azuredatastudio",
|
"Launch azuredatastudio",
|
||||||
"Attach to Extension Host"
|
"Attach to Extension Host"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Attach Renderer and Extension Host",
|
|
||||||
"configurations": [
|
|
||||||
"Attach to azuredatastudio",
|
|
||||||
"Attach to Extension Host"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"editor.insertSpaces": false,
|
"editor.insertSpaces": false,
|
||||||
|
"files.eol": "\n",
|
||||||
"files.trimTrailingWhitespace": true,
|
"files.trimTrailingWhitespace": true,
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
".git": true,
|
".git": true,
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
],
|
],
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
"npm.exclude": "**/extensions/**",
|
"npm.exclude": "**/extensions/**",
|
||||||
"npm.packageManager": "yarn",
|
"git.ignoreLimitWarning": true,
|
||||||
"emmet.excludeLanguages": [],
|
"emmet.excludeLanguages": [],
|
||||||
"typescript.preferences.importModuleSpecifier": "non-relative",
|
"typescript.preferences.importModuleSpecifier": "non-relative",
|
||||||
"typescript.preferences.quoteStyle": "single",
|
"typescript.preferences.quoteStyle": "single",
|
||||||
@@ -57,10 +58,5 @@
|
|||||||
"url": "./.vscode/cglicenses.schema.json"
|
"url": "./.vscode/cglicenses.schema.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"git.ignoreLimitWarning": true,
|
"git.ignoreLimitWarning": true
|
||||||
"remote.extensionKind": {
|
}
|
||||||
"msjsdiag.debugger-for-chrome": "workspace"
|
|
||||||
},
|
|
||||||
"gulp.autoDetect": "off",
|
|
||||||
"files.insertFinalNewline": true
|
|
||||||
}
|
|
||||||
60
.vscode/tasks.json
vendored
60
.vscode/tasks.json
vendored
@@ -5,10 +5,7 @@
|
|||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "watch",
|
"script": "watch",
|
||||||
"label": "Build VS Code",
|
"label": "Build VS Code",
|
||||||
"group": {
|
"group": "build",
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"isBackground": true,
|
"isBackground": true,
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"reveal": "never"
|
"reveal": "never"
|
||||||
@@ -31,34 +28,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "npm",
|
|
||||||
"script": "strict-function-types-watch",
|
|
||||||
"label": "TS - Strict Function Types",
|
|
||||||
"isBackground": true,
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "never"
|
|
||||||
},
|
|
||||||
"problemMatcher": {
|
|
||||||
"base": "$tsc-watch",
|
|
||||||
"owner": "typescript-function-types",
|
|
||||||
"applyTo": "allDocuments"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "npm",
|
|
||||||
"script": "strict-null-check-watch",
|
|
||||||
"label": "TS - Strict Null Checks",
|
|
||||||
"isBackground": true,
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "never"
|
|
||||||
},
|
|
||||||
"problemMatcher": {
|
|
||||||
"base": "$tsc-watch",
|
|
||||||
"owner": "typescript-strict-null-checks",
|
|
||||||
"applyTo": "allDocuments"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "gulp",
|
"type": "gulp",
|
||||||
"task": "tslint",
|
"task": "tslint",
|
||||||
@@ -90,33 +59,14 @@
|
|||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "npm",
|
"type": "gulp",
|
||||||
"script": "electron",
|
"task": "electron",
|
||||||
"label": "Download electron"
|
"label": "Download electron"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "gulp",
|
"type": "gulp",
|
||||||
"task": "hygiene",
|
"task": "hygiene",
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
},
|
}
|
||||||
{
|
|
||||||
"type": "shell",
|
|
||||||
"command": "yarn web -- --no-launch",
|
|
||||||
"label": "Run web",
|
|
||||||
"isBackground": true,
|
|
||||||
// This section to make error go away when launching the debug config
|
|
||||||
"problemMatcher": {
|
|
||||||
"pattern": {
|
|
||||||
"regexp": ""
|
|
||||||
},
|
|
||||||
"background": {
|
|
||||||
"beginsPattern": ".*node .*",
|
|
||||||
"endsPattern": "Web UI available at .*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "never"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
2
.yarnrc
2
.yarnrc
@@ -1,3 +1,3 @@
|
|||||||
disturl "https://atom.io/download/electron"
|
disturl "https://atom.io/download/electron"
|
||||||
target "6.1.5"
|
target "3.1.6"
|
||||||
runtime "electron"
|
runtime "electron"
|
||||||
|
|||||||
134
CHANGELOG.md
134
CHANGELOG.md
@@ -1,137 +1,5 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
## Version 1.13.1
|
|
||||||
* Release date: November 15, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
* Resolved [#8210 Copy/Paste results are out of order](https://github.com/microsoft/azuredatastudio/issues/8210).
|
|
||||||
|
|
||||||
## Version 1.13.0
|
|
||||||
* Release date: November 4, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
* General Availability release for Schema Compare and DACPAC extensions
|
|
||||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/43?closed=1).
|
|
||||||
|
|
||||||
## Contributions and "thank you"
|
|
||||||
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
|
||||||
* aspnerd for `Use selected DB for import wizard schema list` [#7878](https://github.com/microsoft/azuredatastudio/pull/7878)
|
|
||||||
|
|
||||||
## Version 1.12.2
|
|
||||||
* Release date: October 11, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
* Hotfix release (1.12.2): `Disable automatically starting the EH in inspect mode` https://github.com/microsoft/azuredatastudio/commit/c9bef82ace6c67190d0e83820011a2bbd1f793c1
|
|
||||||
|
|
||||||
## Version 1.12.1
|
|
||||||
* Release date: October 7, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
* Hotfix release: `Notebooks: Ensure quotes and backslashes are escaped properly in text editor model` https://github.com/microsoft/azuredatastudio/pull/7540
|
|
||||||
|
|
||||||
## Version 1.12.0
|
|
||||||
* Release date: October 2, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
|
|
||||||
## What's new in this version
|
|
||||||
* Announcing the Query History panel
|
|
||||||
* Improved Query Results Grid copy selection support
|
|
||||||
* TempDB page added to Server Reports extension
|
|
||||||
* PowerShell extension update
|
|
||||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/42?closed=1).
|
|
||||||
|
|
||||||
## Version 1.11.0
|
|
||||||
* Release date: September 10, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
|
|
||||||
## What's new in this version
|
|
||||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/41?closed=1).
|
|
||||||
|
|
||||||
## Version 1.10.0
|
|
||||||
* Release date: August 14, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
|
|
||||||
## What's new in this version
|
|
||||||
* [SandDance](https://github.com/microsoft/SandDance) integration — A new way to interact with data. Download the extension [here](https://docs.microsoft.com/sql/azure-data-studio/sanddance-extension)
|
|
||||||
* Notebook improvements
|
|
||||||
* Better loading performance
|
|
||||||
* Ability to right click SQL results grid to save your results as CSV, JSON, etc.
|
|
||||||
* Buttons to add code or text cells in-line
|
|
||||||
* [Other fixes and improvements](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+label%3A%22Area%3A+Notebooks%22+milestone%3A%22August+2019+Release%22+is%3Aclosed)
|
|
||||||
* SQL Server Dacpac extension can support Azure Active Directory authentication
|
|
||||||
* Updated SQL Server 2019 extension
|
|
||||||
* Visual Studio Code May Release Merge 1.37 - this includes changes from [1.36](https://code.visualstudio.com/updates/v1_37) and [1.37](https://code.visualstudio.com/updates/v1_37)
|
|
||||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/39?closed=1).
|
|
||||||
|
|
||||||
## Version 1.9.0
|
|
||||||
* Release date: July 11, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
|
|
||||||
## What's new in this version
|
|
||||||
* Release of [SentryOne Plan Explorer Extension](https://www.sentryone.com/products/sentryone-plan-explorer-extension-azure-data-studio)
|
|
||||||
* **Schema Compare**
|
|
||||||
* Schema Compare File Support (.SCMP)
|
|
||||||
* Cancel support
|
|
||||||
* [Other fixes and improvements](https://github.com/Microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22July+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Schema+Compare%22)
|
|
||||||
* **Notebooks**
|
|
||||||
* Plotly Support
|
|
||||||
* Open Notebook from Browser
|
|
||||||
* Python Package Management
|
|
||||||
* Performance & Markdown Enhancements
|
|
||||||
* Improved Keyboard Shortcuts
|
|
||||||
* [Other fixes and improvements](https://github.com/Microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22July+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Notebooks%22)
|
|
||||||
* **SQL Server Profiler**
|
|
||||||
* Filtering by Database Name
|
|
||||||
* Copy & Paste Support
|
|
||||||
* Save/Load Filter
|
|
||||||
* SQL Server 2019 Support
|
|
||||||
* New Language Packs Available
|
|
||||||
* Visual Studio Code May Release Merge 1.35 - the latest improvements can be found [here](https://code.visualstudio.com/updates/v1_35)
|
|
||||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/35?closed=1).
|
|
||||||
|
|
||||||
## Version 1.8.0
|
|
||||||
* Release date: June 6, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
|
|
||||||
## What's new in this version
|
|
||||||
* Initial release of the Database Admin Tool Extensions for Windows *Preview* extension
|
|
||||||
* Initial release of the Central Management Servers extension
|
|
||||||
* **Schema Compare**
|
|
||||||
* Added Exclude/Include Options
|
|
||||||
* Generate Script opens script after being generated
|
|
||||||
* Removed double scroll bars
|
|
||||||
* Formatting and layout improvements
|
|
||||||
* Complete changes can be found [here](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22June+2019+Release%22+label%3A%22Area%3A+Schema+Compare%22+is%3Aclosed)
|
|
||||||
* Messages panel moved into results panel - when users ran SQL queries, results and messages were in stacked panels. Now they are in separate tabs in a single panel similar to SSMS.
|
|
||||||
* **Notebook**
|
|
||||||
* Users can now choose to use their own Python 3 or Anaconda installs in notebooks
|
|
||||||
* Multiple Stability + fit/finish fixes
|
|
||||||
* View the full list of improvements and fixes [here](https://github.com/microsoft/azuredatastudio/issues?q=is%3Aissue+milestone%3A%22June+2019+Release%22+is%3Aclosed+label%3A%22Area%3A+Notebooks%22)
|
|
||||||
* Visual Studio Code May Release Merge 1.34 - the latest improvements can be found [here](https://code.visualstudio.com/updates/v1_34)
|
|
||||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/32?closed=1).
|
|
||||||
|
|
||||||
## Version 1.7.0
|
|
||||||
* Release date: May 8, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
|
|
||||||
## What's new in this version
|
|
||||||
* Announcing Schema Compare *Preview* extension
|
|
||||||
* Tasks Panel UX improvement
|
|
||||||
* Announcing new Welcome page
|
|
||||||
* Resolved [bugs and issues](https://github.com/microsoft/azuredatastudio/milestone/31?closed=1).
|
|
||||||
|
|
||||||
## Contributions and "thank you"
|
|
||||||
We would like to thank all our users who raised issues.
|
|
||||||
|
|
||||||
## Version 1.6.0
|
|
||||||
* Release date: April 18, 2019
|
|
||||||
* Release status: General Availability
|
|
||||||
|
|
||||||
## What's new in this version
|
|
||||||
* Align with latest VS Code editor platform (currently 1.33.1)
|
|
||||||
* Resolved [bugs and issues](https://github.com/Microsoft/azuredatastudio/milestone/26?closed=1).
|
|
||||||
|
|
||||||
## Contributions and "thank you"
|
|
||||||
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
|
||||||
|
|
||||||
* yamatoya for `fix the format (#4899)`
|
|
||||||
|
|
||||||
## Version 1.5.1
|
## Version 1.5.1
|
||||||
* Release date: March 18, 2019
|
* Release date: March 18, 2019
|
||||||
* Release status: General Availability
|
* Release status: General Availability
|
||||||
@@ -240,7 +108,7 @@ We would like to thank all our users who raised issues, and in particular the fo
|
|||||||
|
|
||||||
## What's new in this version
|
## What's new in this version
|
||||||
* Announcing the SQL Server 2019 Preview extension.
|
* Announcing the SQL Server 2019 Preview extension.
|
||||||
* Support for SQL Server 2019 preview features including Big Data Cluster support.
|
* Support for SQL Server 2019 preview features including big data cluster support.
|
||||||
* Azure Data Studio Notebooks
|
* Azure Data Studio Notebooks
|
||||||
* The Azure Resource Explorer viewlets you browse data-related endpoints for your Azure accounts and create connections to them in Object Explorer. In this release Azure SQL Databases and servers are supported.
|
* The Azure Resource Explorer viewlets you browse data-related endpoints for your Azure accounts and create connections to them in Object Explorer. In this release Azure SQL Databases and servers are supported.
|
||||||
* SQL Server Polybase Create External Table Wizard
|
* SQL Server Polybase Create External Table Wizard
|
||||||
|
|||||||
1
CODE_OF_CONDUCT.md
Normal file
1
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||||
31
README.md
31
README.md
@@ -1,26 +1,25 @@
|
|||||||
# Azure Data Studio
|
# Azure Data Studio
|
||||||
|
|
||||||
[](https://gitter.im/Microsoft/sqlopsstudio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/Microsoft/sqlopsstudio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[](https://dev.azure.com/azuredatastudio/azuredatastudio/_build/latest?definitionId=4&branchName=master)
|
[](https://dev.azure.com/ms/azuredatastudio/_build/latest?definitionId=4)
|
||||||
[](https://twitter.com/azuredatastudio)
|
|
||||||
|
|
||||||
Azure Data Studio is a data management tool that enables you to work with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.
|
Azure Data Studio is a data management tool that enables you to work with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.
|
||||||
|
|
||||||
## **Download the latest Azure Data Studio release**
|
**Download the latest Azure Data Studio release**
|
||||||
|
|
||||||
Platform | Link
|
Platform | Link
|
||||||
-- | --
|
-- | --
|
||||||
Windows User Installer | https://go.microsoft.com/fwlink/?linkid=2109256
|
Windows User Installer | https://go.microsoft.com/fwlink/?linkid=2083322
|
||||||
Windows System Installer | https://go.microsoft.com/fwlink/?linkid=2109085
|
Windows System Installer | https://go.microsoft.com/fwlink/?linkid=2083323
|
||||||
Windows ZIP | https://go.microsoft.com/fwlink/?linkid=2109255
|
Windows ZIP | https://go.microsoft.com/fwlink/?linkid=2083324
|
||||||
macOS ZIP | https://go.microsoft.com/fwlink/?linkid=2109180
|
macOS ZIP | https://go.microsoft.com/fwlink/?linkid=2083325
|
||||||
Linux TAR.GZ | https://go.microsoft.com/fwlink/?linkid=2109179
|
Linux TAR.GZ | https://go.microsoft.com/fwlink/?linkid=2083424
|
||||||
Linux RPM | https://go.microsoft.com/fwlink/?linkid=2109178
|
Linux RPM | https://go.microsoft.com/fwlink/?linkid=2083326
|
||||||
Linux DEB | https://go.microsoft.com/fwlink/?linkid=2109254
|
Linux DEB | https://go.microsoft.com/fwlink/?linkid=2083327
|
||||||
|
|
||||||
Go to our [download page](https://aka.ms/azuredatastudio) for more specific instructions.
|
Go to our [download page](https://aka.ms/azuredatastudio) for more specific instructions.
|
||||||
|
|
||||||
## Try out the latest insiders build from `master`:
|
Try out the latest insiders build from `master`:
|
||||||
- [Windows User Installer - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64-user/insider)
|
- [Windows User Installer - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64-user/insider)
|
||||||
- [Windows System Installer - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64/insider)
|
- [Windows System Installer - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64/insider)
|
||||||
- [Windows ZIP - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64-archive/insider)
|
- [Windows ZIP - **Insiders build**](https://azuredatastudio-update.azurewebsites.net/latest/win32-x64-archive/insider)
|
||||||
@@ -29,7 +28,7 @@ Go to our [download page](https://aka.ms/azuredatastudio) for more specific inst
|
|||||||
|
|
||||||
See the [change log](https://github.com/Microsoft/azuredatastudio/blob/master/CHANGELOG.md) for additional details of what's in this release.
|
See the [change log](https://github.com/Microsoft/azuredatastudio/blob/master/CHANGELOG.md) for additional details of what's in this release.
|
||||||
|
|
||||||
## **Feature Highlights**
|
**Feature Highlights**
|
||||||
|
|
||||||
- Cross-Platform DB management for Windows, macOS and Linux with simple XCopy deployment
|
- Cross-Platform DB management for Windows, macOS and Linux with simple XCopy deployment
|
||||||
- SQL Server Connection Management with Connection Dialog, Server Groups, Azure Integration and Registered Servers
|
- SQL Server Connection Management with Connection Dialog, Server Groups, Azure Integration and Registered Servers
|
||||||
@@ -69,14 +68,6 @@ The [Microsoft Enterprise and Developer Privacy Statement](https://privacy.micro
|
|||||||
## Contributions and "Thank You"
|
## Contributions and "Thank You"
|
||||||
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
We would like to thank all our users who raised issues, and in particular the following users who helped contribute fixes:
|
||||||
|
|
||||||
* eulercamposbarros for `Prevent connections from moving on click (#7528)`
|
|
||||||
* AlexFsmn for `Fixed issue where task icons got hidden if text was too long`
|
|
||||||
* jamesrod817 for `Tempdb (#7022)`
|
|
||||||
* dzsquared for `fix(snippets): ads parenthesis to sqlcreateindex snippet #7020`
|
|
||||||
* devmattrick for `Update row count as updates are received #6642`
|
|
||||||
* mottykohn for `In Message panel onclick scroll to line #6417`
|
|
||||||
* Stevoni for `Corrected Keyboard Shortcut Execution Issue #5480`
|
|
||||||
* yamatoya for `fix the format #4899`
|
|
||||||
* GeoffYoung for `Fix sqlDropColumn description #4422`
|
* GeoffYoung for `Fix sqlDropColumn description #4422`
|
||||||
* AlexFsmn for `Added context menu for DBs in explorer view to backup & restore db. #2277`
|
* AlexFsmn for `Added context menu for DBs in explorer view to backup & restore db. #2277`
|
||||||
* sadedil for `Missing feature request: Save as XML #3729`
|
* sadedil for `Missing feature request: Save as XML #3729`
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
|||||||
jquery-ui: https://github.com/jquery/jquery-ui
|
jquery-ui: https://github.com/jquery/jquery-ui
|
||||||
jquery.event.drag: https://github.com/devongovett/jquery.event.drag
|
jquery.event.drag: https://github.com/devongovett/jquery.event.drag
|
||||||
jschardet: https://github.com/aadsm/jschardet
|
jschardet: https://github.com/aadsm/jschardet
|
||||||
jupyter-powershell: https://github.com/vors/jupyter-powershell
|
|
||||||
JupyterLab: https://github.com/jupyterlab/jupyterlab
|
JupyterLab: https://github.com/jupyterlab/jupyterlab
|
||||||
make-error: https://github.com/JsCommunity/make-error
|
make-error: https://github.com/JsCommunity/make-error
|
||||||
minimist: https://github.com/substack/minimist
|
minimist: https://github.com/substack/minimist
|
||||||
@@ -47,6 +46,7 @@ expressly granted herein, whether by implication, estoppel or otherwise.
|
|||||||
node-fetch: https://github.com/bitinn/node-fetch
|
node-fetch: https://github.com/bitinn/node-fetch
|
||||||
node-pty: https://github.com/Tyriar/node-pty
|
node-pty: https://github.com/Tyriar/node-pty
|
||||||
nsfw: https://github.com/Axosoft/nsfw
|
nsfw: https://github.com/Axosoft/nsfw
|
||||||
|
pretty-data: https://github.com/vkiryukhin/pretty-data
|
||||||
primeng: https://github.com/primefaces/primeng
|
primeng: https://github.com/primefaces/primeng
|
||||||
process-nextick-args: https://github.com/calvinmetcalf/process-nextick-args
|
process-nextick-args: https://github.com/calvinmetcalf/process-nextick-args
|
||||||
pty.js: https://github.com/chjj/pty.js
|
pty.js: https://github.com/chjj/pty.js
|
||||||
@@ -1176,35 +1176,7 @@ That's all there is to it!
|
|||||||
=========================================
|
=========================================
|
||||||
END OF jschardet NOTICES AND INFORMATION
|
END OF jschardet NOTICES AND INFORMATION
|
||||||
|
|
||||||
%% jupyter-powershell NOTICES AND INFORMATION BEGIN HERE
|
|
||||||
=========================================
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2016 Sergei Vorobev
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
=========================================
|
|
||||||
END OF jupyter-powershell NOTICES AND INFORMATION
|
|
||||||
|
|
||||||
%% JupyterLab NOTICES AND INFORMATION BEGIN HERE
|
%% JupyterLab NOTICES AND INFORMATION BEGIN HERE
|
||||||
=========================================
|
|
||||||
Copyright (c) 2015 Project Jupyter Contributors
|
Copyright (c) 2015 Project Jupyter Contributors
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
@@ -1448,6 +1420,16 @@ SOFTWARE.
|
|||||||
=========================================
|
=========================================
|
||||||
END OF nsfw NOTICES AND INFORMATION
|
END OF nsfw NOTICES AND INFORMATION
|
||||||
|
|
||||||
|
%% pretty-data NOTICES AND INFORMATION BEGIN HERE
|
||||||
|
=========================================
|
||||||
|
License: Dual licensed under the MIT and GPL licenses:
|
||||||
|
|
||||||
|
http://www.opensource.org/licenses/mit-license.php
|
||||||
|
|
||||||
|
http://www.gnu.org/licenses/gpl.html
|
||||||
|
=========================================
|
||||||
|
END OF pretty-data NOTICES AND INFORMATION
|
||||||
|
|
||||||
%% primeng NOTICES AND INFORMATION BEGIN HERE
|
%% primeng NOTICES AND INFORMATION BEGIN HERE
|
||||||
=========================================
|
=========================================
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|||||||
49
azure-pipelines-linux-mac.yml
Normal file
49
azure-pipelines-linux-mac.yml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '8.x'
|
||||||
|
displayName: 'Install Node.js'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
git submodule update --init --recursive
|
||||||
|
nvm install 10.15.1
|
||||||
|
nvm use 10.15.1
|
||||||
|
npm i -g yarn
|
||||||
|
displayName: 'preinstall'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
export CXX="g++-4.9" CC="gcc-4.9" DISPLAY=:10
|
||||||
|
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
|
||||||
|
sudo chmod +x /etc/init.d/xvfb
|
||||||
|
sudo update-rc.d xvfb defaults
|
||||||
|
sudo service xvfb start
|
||||||
|
# sh -e /etc/init.d/xvfb start
|
||||||
|
# sleep 3
|
||||||
|
displayName: 'Linux preinstall'
|
||||||
|
condition: eq(variables['Agent.OS'], 'Linux')
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn
|
||||||
|
displayName: 'Install'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
node_modules/.bin/gulp electron
|
||||||
|
node_modules/.bin/gulp compile --max_old_space_size=4096
|
||||||
|
displayName: 'Scripts'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
DISPLAY=:10 ./scripts/test.sh --reporter mocha-junit-reporter
|
||||||
|
displayName: 'Tests'
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: '**/test-results.xml'
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn tslint
|
||||||
|
displayName: 'Run TSLint'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn strict-null-check
|
||||||
|
displayName: 'Run Strict Null Check'
|
||||||
34
azure-pipelines-windows.yml
Normal file
34
azure-pipelines-windows.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
steps:
|
||||||
|
- task: NodeTool@0
|
||||||
|
inputs:
|
||||||
|
versionSpec: '10.15.1'
|
||||||
|
displayName: 'Install Node.js'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn
|
||||||
|
displayName: 'Yarn Install'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
.\node_modules\.bin\gulp electron
|
||||||
|
displayName: 'Electron'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
npm run compile
|
||||||
|
displayName: 'Compile'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
.\scripts\test.bat --reporter mocha-junit-reporter
|
||||||
|
displayName: 'Test'
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: 'test-results.xml'
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn tslint
|
||||||
|
displayName: 'Run TSLint'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
yarn strict-null-check
|
||||||
|
displayName: 'Run Strict Null Check'
|
||||||
@@ -1,22 +1,29 @@
|
|||||||
trigger:
|
trigger:
|
||||||
- master
|
- master
|
||||||
- release/*
|
- releases/*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Windows
|
|
||||||
pool:
|
|
||||||
vmImage: VS2017-Win2016
|
|
||||||
steps:
|
|
||||||
- template: build/azure-pipelines/win32/continuous-build-win32.yml
|
|
||||||
|
|
||||||
- job: Linux
|
# All tasks on Windows
|
||||||
|
- job: build_all_windows
|
||||||
|
displayName: Build all tasks (Windows)
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu-16.04'
|
vmImage: vs2017-win2016
|
||||||
steps:
|
steps:
|
||||||
- template: build/azure-pipelines/linux/continuous-build-linux.yml
|
- template: azure-pipelines-windows.yml
|
||||||
|
|
||||||
- job: macOS
|
# All tasks on Linux
|
||||||
|
- job: build_all_linux
|
||||||
|
displayName: Build all tasks (Linux)
|
||||||
pool:
|
pool:
|
||||||
vmImage: macOS 10.13
|
vmImage: 'Ubuntu 16.04'
|
||||||
steps:
|
steps:
|
||||||
- template: build/azure-pipelines/darwin/continuous-build-darwin.yml
|
- template: azure-pipelines-linux-mac.yml
|
||||||
|
|
||||||
|
# All tasks on macOS
|
||||||
|
- job: build_all_darwin
|
||||||
|
displayName: Build all tasks (macOS)
|
||||||
|
pool:
|
||||||
|
vmImage: macos-10.13
|
||||||
|
steps:
|
||||||
|
- template: azure-pipelines-linux-mac.yml
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
2019-12-01T02:20:58.491Z
|
|
||||||
@@ -1,134 +0,0 @@
|
|||||||
# cleanup rules for native node modules, .gitignore style
|
|
||||||
|
|
||||||
nan/**
|
|
||||||
*/node_modules/nan/**
|
|
||||||
|
|
||||||
fsevents/binding.gyp
|
|
||||||
fsevents/fsevents.cc
|
|
||||||
fsevents/build/**
|
|
||||||
fsevents/src/**
|
|
||||||
fsevents/test/**
|
|
||||||
!fsevents/**/*.node
|
|
||||||
|
|
||||||
vscode-sqlite3/binding.gyp
|
|
||||||
vscode-sqlite3/benchmark/**
|
|
||||||
vscode-sqlite3/cloudformation/**
|
|
||||||
vscode-sqlite3/deps/**
|
|
||||||
vscode-sqlite3/test/**
|
|
||||||
vscode-sqlite3/build/**
|
|
||||||
vscode-sqlite3/src/**
|
|
||||||
!vscode-sqlite3/build/Release/*.node
|
|
||||||
|
|
||||||
oniguruma/binding.gyp
|
|
||||||
oniguruma/build/**
|
|
||||||
oniguruma/src/**
|
|
||||||
oniguruma/deps/**
|
|
||||||
!oniguruma/build/Release/*.node
|
|
||||||
!oniguruma/src/*.js
|
|
||||||
|
|
||||||
windows-mutex/binding.gyp
|
|
||||||
windows-mutex/build/**
|
|
||||||
windows-mutex/src/**
|
|
||||||
!windows-mutex/**/*.node
|
|
||||||
|
|
||||||
native-keymap/binding.gyp
|
|
||||||
native-keymap/build/**
|
|
||||||
native-keymap/src/**
|
|
||||||
native-keymap/deps/**
|
|
||||||
!native-keymap/build/Release/*.node
|
|
||||||
|
|
||||||
native-is-elevated/binding.gyp
|
|
||||||
native-is-elevated/build/**
|
|
||||||
native-is-elevated/src/**
|
|
||||||
native-is-elevated/deps/**
|
|
||||||
!native-is-elevated/build/Release/*.node
|
|
||||||
|
|
||||||
native-watchdog/binding.gyp
|
|
||||||
native-watchdog/build/**
|
|
||||||
native-watchdog/src/**
|
|
||||||
!native-watchdog/build/Release/*.node
|
|
||||||
|
|
||||||
spdlog/binding.gyp
|
|
||||||
spdlog/build/**
|
|
||||||
spdlog/deps/**
|
|
||||||
spdlog/src/**
|
|
||||||
spdlog/test/**
|
|
||||||
!spdlog/build/Release/*.node
|
|
||||||
|
|
||||||
jschardet/dist/**
|
|
||||||
|
|
||||||
windows-foreground-love/binding.gyp
|
|
||||||
windows-foreground-love/build/**
|
|
||||||
windows-foreground-love/src/**
|
|
||||||
!windows-foreground-love/**/*.node
|
|
||||||
|
|
||||||
windows-process-tree/binding.gyp
|
|
||||||
windows-process-tree/build/**
|
|
||||||
windows-process-tree/src/**
|
|
||||||
!windows-process-tree/**/*.node
|
|
||||||
|
|
||||||
keytar/binding.gyp
|
|
||||||
keytar/build/**
|
|
||||||
keytar/src/**
|
|
||||||
keytar/script/**
|
|
||||||
keytar/node_modules/**
|
|
||||||
!keytar/**/*.node
|
|
||||||
|
|
||||||
node-pty/binding.gyp
|
|
||||||
node-pty/build/**
|
|
||||||
node-pty/src/**
|
|
||||||
node-pty/tools/**
|
|
||||||
node-pty/deps/**
|
|
||||||
!node-pty/build/Release/*.exe
|
|
||||||
!node-pty/build/Release/*.dll
|
|
||||||
!node-pty/build/Release/*.node
|
|
||||||
|
|
||||||
emmet/node_modules/**
|
|
||||||
|
|
||||||
pty.js/build/**
|
|
||||||
!pty.js/build/Release/**
|
|
||||||
|
|
||||||
# START SQL Modules
|
|
||||||
|
|
||||||
@angular/**/src/**
|
|
||||||
@angular/**/testing/**
|
|
||||||
|
|
||||||
angular2-grid/components/**
|
|
||||||
angular2-grid/directives/**
|
|
||||||
angular2-grid/interfaces/**
|
|
||||||
angular2-grid/modules/**
|
|
||||||
|
|
||||||
angular2-slickgrid/.vscode/**
|
|
||||||
angular2-slickgrid/components/**
|
|
||||||
angular2-slickgrid/examples/**
|
|
||||||
|
|
||||||
jquery-ui/external/**
|
|
||||||
jquery-ui/demos/**
|
|
||||||
|
|
||||||
slickgrid/node_modules/**
|
|
||||||
slickgrid/examples/**
|
|
||||||
|
|
||||||
# END SQL Modules
|
|
||||||
|
|
||||||
nsfw/binding.gyp
|
|
||||||
nsfw/build/**
|
|
||||||
nsfw/src/**
|
|
||||||
nsfw/openpa/**
|
|
||||||
nsfw/includes/**
|
|
||||||
!nsfw/build/Release/*.node
|
|
||||||
!nsfw/**/*.a
|
|
||||||
|
|
||||||
vsda/build/**
|
|
||||||
vsda/ci/**
|
|
||||||
vsda/src/**
|
|
||||||
vsda/.gitignore
|
|
||||||
vsda/binding.gyp
|
|
||||||
vsda/README.md
|
|
||||||
vsda/targets
|
|
||||||
!vsda/build/Release/vsda.node
|
|
||||||
|
|
||||||
vscode-windows-ca-certs/**/*
|
|
||||||
!vscode-windows-ca-certs/package.json
|
|
||||||
!vscode-windows-ca-certs/**/*.node
|
|
||||||
|
|
||||||
node-addon-api/**/*
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as vfs from 'vinyl-fs';
|
|
||||||
|
|
||||||
const files = [
|
|
||||||
'.build/extensions/**/*.vsix', // external extensions
|
|
||||||
'.build/win32-x64/**/*.{exe,zip}', // windows binaries
|
|
||||||
'.build/linux/sha256hashes.txt', // linux hashes
|
|
||||||
'.build/linux/deb/amd64/deb/*', // linux debs
|
|
||||||
'.build/linux/rpm/x86_64/*', // linux rpms
|
|
||||||
'.build/linux/server/*', // linux server
|
|
||||||
'.build/linux/archive/*', // linux archive
|
|
||||||
'.build/docker/**', // docker images
|
|
||||||
'.build/darwin/**', // darwin binaries
|
|
||||||
'.build/version.json' // version information
|
|
||||||
];
|
|
||||||
|
|
||||||
async function main() {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const stream = vfs.src(files, { base: '.build', allowEmpty: true })
|
|
||||||
.pipe(vfs.dest(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY!));
|
|
||||||
|
|
||||||
stream.on('end', () => resolve());
|
|
||||||
stream.on('error', e => reject(e));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
main().catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
@@ -1,132 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as fs from 'fs';
|
|
||||||
import { Readable } from 'stream';
|
|
||||||
import * as crypto from 'crypto';
|
|
||||||
import * as azure from 'azure-storage';
|
|
||||||
import * as mime from 'mime';
|
|
||||||
import { CosmosClient } from '@azure/cosmos';
|
|
||||||
|
|
||||||
interface Asset {
|
|
||||||
platform: string;
|
|
||||||
type: string;
|
|
||||||
url: string;
|
|
||||||
mooncakeUrl?: string;
|
|
||||||
hash: string;
|
|
||||||
sha256hash: string;
|
|
||||||
size: number;
|
|
||||||
supportsFastUpdate?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.argv.length !== 6) {
|
|
||||||
console.error('Usage: node createAsset.js PLATFORM TYPE NAME FILE');
|
|
||||||
process.exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function hashStream(hashName: string, stream: Readable): Promise<string> {
|
|
||||||
return new Promise<string>((c, e) => {
|
|
||||||
const shasum = crypto.createHash(hashName);
|
|
||||||
|
|
||||||
stream
|
|
||||||
.on('data', shasum.update.bind(shasum))
|
|
||||||
.on('error', e)
|
|
||||||
.on('close', () => c(shasum.digest('hex')));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doesAssetExist(blobService: azure.BlobService, quality: string, blobName: string): Promise<boolean | undefined> {
|
|
||||||
const existsResult = await new Promise<azure.BlobService.BlobResult>((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r)));
|
|
||||||
return existsResult.exists;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, file: string): Promise<void> {
|
|
||||||
const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
|
|
||||||
contentSettings: {
|
|
||||||
contentType: mime.lookup(file),
|
|
||||||
cacheControl: 'max-age=31536000, public'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, file, blobOptions, err => err ? e(err) : c()));
|
|
||||||
}
|
|
||||||
|
|
||||||
function getEnv(name: string): string {
|
|
||||||
const result = process.env[name];
|
|
||||||
|
|
||||||
if (typeof result === 'undefined') {
|
|
||||||
throw new Error('Missing env: ' + name);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
|
||||||
const [, , platform, type, name, file] = process.argv;
|
|
||||||
const quality = getEnv('VSCODE_QUALITY');
|
|
||||||
const commit = getEnv('BUILD_SOURCEVERSION');
|
|
||||||
|
|
||||||
console.log('Creating asset...');
|
|
||||||
|
|
||||||
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
|
|
||||||
const size = stat.size;
|
|
||||||
|
|
||||||
console.log('Size:', size);
|
|
||||||
|
|
||||||
const stream = fs.createReadStream(file);
|
|
||||||
const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]);
|
|
||||||
|
|
||||||
console.log('SHA1:', sha1hash);
|
|
||||||
console.log('SHA256:', sha256hash);
|
|
||||||
|
|
||||||
const blobName = commit + '/' + name;
|
|
||||||
const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!;
|
|
||||||
|
|
||||||
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
|
|
||||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
|
||||||
|
|
||||||
const blobExists = await doesAssetExist(blobService, quality, blobName);
|
|
||||||
|
|
||||||
if (blobExists) {
|
|
||||||
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('Uploading blobs to Azure storage...');
|
|
||||||
|
|
||||||
await uploadBlob(blobService, quality, blobName, file);
|
|
||||||
|
|
||||||
console.log('Blobs successfully uploaded.');
|
|
||||||
|
|
||||||
const asset: Asset = {
|
|
||||||
platform,
|
|
||||||
type,
|
|
||||||
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
|
|
||||||
hash: sha1hash,
|
|
||||||
sha256hash,
|
|
||||||
size
|
|
||||||
};
|
|
||||||
|
|
||||||
// Remove this if we ever need to rollback fast updates for windows
|
|
||||||
if (/win32/.test(platform)) {
|
|
||||||
asset.supportsFastUpdate = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('Asset:', JSON.stringify(asset, null, ' '));
|
|
||||||
|
|
||||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
|
||||||
const scripts = client.database('builds').container(quality).scripts;
|
|
||||||
await scripts.storedProcedure('createAsset').execute('', [commit, asset, true]);
|
|
||||||
}
|
|
||||||
|
|
||||||
main().then(() => {
|
|
||||||
console.log('Asset successfully created');
|
|
||||||
process.exit(0);
|
|
||||||
}, err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import { CosmosClient } from '@azure/cosmos';
|
|
||||||
|
|
||||||
if (process.argv.length !== 3) {
|
|
||||||
console.error('Usage: node createBuild.js VERSION');
|
|
||||||
process.exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getEnv(name: string): string {
|
|
||||||
const result = process.env[name];
|
|
||||||
|
|
||||||
if (typeof result === 'undefined') {
|
|
||||||
throw new Error('Missing env: ' + name);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
|
||||||
const [, , _version] = process.argv;
|
|
||||||
const quality = getEnv('VSCODE_QUALITY');
|
|
||||||
const commit = getEnv('BUILD_SOURCEVERSION');
|
|
||||||
const queuedBy = getEnv('BUILD_QUEUEDBY');
|
|
||||||
const sourceBranch = getEnv('BUILD_SOURCEBRANCH');
|
|
||||||
const version = _version + (quality === 'stable' ? '' : `-${quality}`);
|
|
||||||
|
|
||||||
console.log('Creating build...');
|
|
||||||
console.log('Quality:', quality);
|
|
||||||
console.log('Version:', version);
|
|
||||||
console.log('Commit:', commit);
|
|
||||||
|
|
||||||
const build = {
|
|
||||||
id: commit,
|
|
||||||
timestamp: (new Date()).getTime(),
|
|
||||||
version,
|
|
||||||
isReleased: false,
|
|
||||||
sourceBranch,
|
|
||||||
queuedBy,
|
|
||||||
assets: [],
|
|
||||||
updates: {}
|
|
||||||
};
|
|
||||||
|
|
||||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
|
||||||
const scripts = client.database('builds').container(quality).scripts;
|
|
||||||
await scripts.storedProcedure('createBuild').execute('', [{ ...build, _partitionKey: '' }]);
|
|
||||||
}
|
|
||||||
|
|
||||||
main().then(() => {
|
|
||||||
console.log('Build successfully created');
|
|
||||||
process.exit(0);
|
|
||||||
}, err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cd $BUILD_STAGINGDIRECTORY
|
|
||||||
mkdir extraction
|
|
||||||
cd extraction
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-extension-telemetry.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-chrome-debug-core.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-node-debug2.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-node-debug.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-html-languageservice.git
|
|
||||||
git clone --depth 1 https://github.com/Microsoft/vscode-json-languageservice.git
|
|
||||||
$BUILD_SOURCESDIRECTORY/build/node_modules/.bin/vscode-telemetry-extractor --sourceDir $BUILD_SOURCESDIRECTORY --excludedDir $BUILD_SOURCESDIRECTORY/extensions --outputDir . --applyEndpoints
|
|
||||||
$BUILD_SOURCESDIRECTORY/build/node_modules/.bin/vscode-telemetry-extractor --config $BUILD_SOURCESDIRECTORY/build/azure-pipelines/common/telemetry-config.json -o .
|
|
||||||
mkdir -p $BUILD_SOURCESDIRECTORY/.build/telemetry
|
|
||||||
mv declarations-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-core.json
|
|
||||||
mv config-resolved.json $BUILD_SOURCESDIRECTORY/.build/telemetry/telemetry-extensions.json
|
|
||||||
cd ..
|
|
||||||
rm -rf extraction
|
|
||||||
18
build/azure-pipelines/common/installDistro.ts
Normal file
18
build/azure-pipelines/common/installDistro.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import * as cp from 'child_process';
|
||||||
|
|
||||||
|
function yarnInstall(packageName: string): void {
|
||||||
|
cp.execSync(`yarn add --no-lockfile ${packageName}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const product = require('../../../product.json');
|
||||||
|
const dependencies = product.dependencies || {} as { [name: string]: string; };
|
||||||
|
|
||||||
|
Object.keys(dependencies).forEach(name => {
|
||||||
|
const url = dependencies[name];
|
||||||
|
yarnInstall(url);
|
||||||
|
});
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
REPO="$(pwd)"
|
|
||||||
|
|
||||||
# Publish webview contents
|
|
||||||
PACKAGEJSON="$REPO/package.json"
|
|
||||||
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
|
|
||||||
|
|
||||||
node build/azure-pipelines/common/publish-webview.js "$REPO/src/vs/workbench/contrib/webview/browser/pre/"
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
import * as azure from 'azure-storage';
|
|
||||||
import * as mime from 'mime';
|
|
||||||
import * as minimist from 'minimist';
|
|
||||||
import { basename, join } from 'path';
|
|
||||||
|
|
||||||
const fileNames = [
|
|
||||||
'fake.html',
|
|
||||||
'host.js',
|
|
||||||
'index.html',
|
|
||||||
'main.js',
|
|
||||||
'service-worker.js'
|
|
||||||
];
|
|
||||||
|
|
||||||
async function assertContainer(blobService: azure.BlobService, container: string): Promise<void> {
|
|
||||||
await new Promise((c, e) => blobService.createContainerIfNotExists(container, { publicAccessLevel: 'blob' }, err => err ? e(err) : c()));
|
|
||||||
}
|
|
||||||
|
|
||||||
async function doesBlobExist(blobService: azure.BlobService, container: string, blobName: string): Promise<boolean | undefined> {
|
|
||||||
const existsResult = await new Promise<azure.BlobService.BlobResult>((c, e) => blobService.doesBlobExist(container, blobName, (err, r) => err ? e(err) : c(r)));
|
|
||||||
return existsResult.exists;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function uploadBlob(blobService: azure.BlobService, container: string, blobName: string, file: string): Promise<void> {
|
|
||||||
const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
|
|
||||||
contentSettings: {
|
|
||||||
contentType: mime.lookup(file),
|
|
||||||
cacheControl: 'max-age=31536000, public'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(container, blobName, file, blobOptions, err => err ? e(err) : c()));
|
|
||||||
}
|
|
||||||
|
|
||||||
async function publish(commit: string, files: readonly string[]): Promise<void> {
|
|
||||||
|
|
||||||
console.log('Publishing...');
|
|
||||||
console.log('Commit:', commit);
|
|
||||||
const storageAccount = process.env['AZURE_WEBVIEW_STORAGE_ACCOUNT']!;
|
|
||||||
|
|
||||||
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_WEBVIEW_STORAGE_ACCESS_KEY']!)
|
|
||||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
|
||||||
|
|
||||||
await assertContainer(blobService, commit);
|
|
||||||
|
|
||||||
for (const file of files) {
|
|
||||||
const blobName = basename(file);
|
|
||||||
const blobExists = await doesBlobExist(blobService, commit, blobName);
|
|
||||||
if (blobExists) {
|
|
||||||
console.log(`Blob ${commit}, ${blobName} already exists, not publishing again.`);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
console.log('Uploading blob to Azure storage...');
|
|
||||||
await uploadBlob(blobService, commit, blobName, file);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('Blobs successfully uploaded.');
|
|
||||||
}
|
|
||||||
|
|
||||||
function main(): void {
|
|
||||||
const commit = process.env['BUILD_SOURCEVERSION'];
|
|
||||||
|
|
||||||
if (!commit) {
|
|
||||||
console.warn('Skipping publish due to missing BUILD_SOURCEVERSION');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const opts = minimist(process.argv.slice(2));
|
|
||||||
const [directory] = opts._;
|
|
||||||
|
|
||||||
const files = fileNames.map(fileName => join(directory, fileName));
|
|
||||||
|
|
||||||
publish(commit, files).catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.argv.length < 3) {
|
|
||||||
console.error('Usage: node publish.js <directory>');
|
|
||||||
process.exit(-1);
|
|
||||||
}
|
|
||||||
main();
|
|
||||||
@@ -65,7 +65,8 @@ interface Asset {
|
|||||||
platform: string;
|
platform: string;
|
||||||
type: string;
|
type: string;
|
||||||
url: string;
|
url: string;
|
||||||
mooncakeUrl?: string;
|
// {{SQL CARBON EDIT}}
|
||||||
|
mooncakeUrl: string | undefined;
|
||||||
hash: string;
|
hash: string;
|
||||||
sha256hash: string;
|
sha256hash: string;
|
||||||
size: number;
|
size: number;
|
||||||
@@ -152,6 +153,13 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
|
|
||||||
const queuedBy = process.env['BUILD_QUEUEDBY']!;
|
const queuedBy = process.env['BUILD_QUEUEDBY']!;
|
||||||
const sourceBranch = process.env['BUILD_SOURCEBRANCH']!;
|
const sourceBranch = process.env['BUILD_SOURCEBRANCH']!;
|
||||||
|
const isReleased = (
|
||||||
|
// Insiders: nightly build from master
|
||||||
|
(quality === 'insider' && /^master$|^refs\/heads\/master$/.test(sourceBranch) && /Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy)) ||
|
||||||
|
|
||||||
|
// Exploration: any build from electron-4.0.x branch
|
||||||
|
(quality === 'exploration' && /^electron-4.0.x$|^refs\/heads\/electron-4.0.x$/.test(sourceBranch))
|
||||||
|
);
|
||||||
|
|
||||||
console.log('Publishing...');
|
console.log('Publishing...');
|
||||||
console.log('Quality:', quality);
|
console.log('Quality:', quality);
|
||||||
@@ -161,6 +169,7 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
console.log('Version:', version);
|
console.log('Version:', version);
|
||||||
console.log('Commit:', commit);
|
console.log('Commit:', commit);
|
||||||
console.log('Is Update:', isUpdate);
|
console.log('Is Update:', isUpdate);
|
||||||
|
console.log('Is Released:', isReleased);
|
||||||
console.log('File:', file);
|
console.log('File:', file);
|
||||||
|
|
||||||
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
|
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
|
||||||
@@ -180,18 +189,56 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
|
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
|
||||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
await assertContainer(blobService, quality);
|
await assertContainer(blobService, quality);
|
||||||
|
|
||||||
const blobExists = await doesAssetExist(blobService, quality, blobName);
|
const blobExists = await doesAssetExist(blobService, quality, blobName);
|
||||||
|
|
||||||
if (blobExists) {
|
const promises = [];
|
||||||
|
|
||||||
|
if (!blobExists) {
|
||||||
|
promises.push(uploadBlob(blobService, quality, blobName, file));
|
||||||
|
}
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
if (process.env['MOONCAKE_STORAGE_ACCESS_KEY']) {
|
||||||
|
const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY']!, `${storageAccount}.blob.core.chinacloudapi.cn`)
|
||||||
|
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
||||||
|
|
||||||
|
// mooncake is fussy and far away, this is needed!
|
||||||
|
mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
|
||||||
|
|
||||||
|
await Promise.all([
|
||||||
|
assertContainer(blobService, quality),
|
||||||
|
assertContainer(mooncakeBlobService, quality)
|
||||||
|
]);
|
||||||
|
|
||||||
|
const [blobExists, moooncakeBlobExists] = await Promise.all([
|
||||||
|
doesAssetExist(blobService, quality, blobName),
|
||||||
|
doesAssetExist(mooncakeBlobService, quality, blobName)
|
||||||
|
]);
|
||||||
|
|
||||||
|
const promises: Array<Promise<void>> = [];
|
||||||
|
|
||||||
|
if (!blobExists) {
|
||||||
|
promises.push(uploadBlob(blobService, quality, blobName, file));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!moooncakeBlobExists) {
|
||||||
|
promises.push(uploadBlob(mooncakeBlobService, quality, blobName, file));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log('Skipping Mooncake publishing.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (promises.length === 0) {
|
||||||
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
|
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Uploading blobs to Azure storage...');
|
console.log('Uploading blobs to Azure storage...');
|
||||||
|
|
||||||
await uploadBlob(blobService, quality, blobName, file);
|
await Promise.all(promises);
|
||||||
|
|
||||||
console.log('Blobs successfully uploaded.');
|
console.log('Blobs successfully uploaded.');
|
||||||
|
|
||||||
@@ -203,6 +250,8 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
platform: platform,
|
platform: platform,
|
||||||
type: type,
|
type: type,
|
||||||
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
|
url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`,
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
mooncakeUrl: process.env['MOONCAKE_CDN_URL'] ? `${process.env['MOONCAKE_CDN_URL']}/${quality}/${blobName}` : undefined,
|
||||||
hash: sha1hash,
|
hash: sha1hash,
|
||||||
sha256hash,
|
sha256hash,
|
||||||
size
|
size
|
||||||
@@ -215,15 +264,11 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
|
|
||||||
console.log('Asset:', JSON.stringify(asset, null, ' '));
|
console.log('Asset:', JSON.stringify(asset, null, ' '));
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
// Insiders: nightly build from master
|
|
||||||
const isReleased = (quality === 'insider' && /^master$|^refs\/heads\/master$/.test(sourceBranch) && /Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy));
|
|
||||||
|
|
||||||
const release = {
|
const release = {
|
||||||
id: commit,
|
id: commit,
|
||||||
timestamp: (new Date()).getTime(),
|
timestamp: (new Date()).getTime(),
|
||||||
version,
|
version,
|
||||||
isReleased: isReleased,
|
isReleased: config.frozen ? false : isReleased,
|
||||||
sourceBranch,
|
sourceBranch,
|
||||||
queuedBy,
|
queuedBy,
|
||||||
assets: [] as Array<Asset>,
|
assets: [] as Array<Asset>,
|
||||||
@@ -242,6 +287,11 @@ async function publish(commit: string, quality: string, platform: string, type:
|
|||||||
}
|
}
|
||||||
|
|
||||||
function main(): void {
|
function main(): void {
|
||||||
|
if (process.env['VSCODE_BUILD_SKIP_PUBLISH']) {
|
||||||
|
console.warn('Skipping publish due to VSCODE_BUILD_SKIP_PUBLISH');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const commit = process.env['BUILD_SOURCEVERSION'];
|
const commit = process.env['BUILD_SOURCEVERSION'];
|
||||||
|
|
||||||
if (!commit) {
|
if (!commit) {
|
||||||
|
|||||||
@@ -1,109 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import { DocumentClient } from 'documentdb';
|
|
||||||
|
|
||||||
interface Config {
|
|
||||||
id: string;
|
|
||||||
frozen: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
function createDefaultConfig(quality: string): Config {
|
|
||||||
return {
|
|
||||||
id: quality,
|
|
||||||
frozen: false
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function getConfig(quality: string): Promise<Config> {
|
|
||||||
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
|
||||||
const collection = 'dbs/builds/colls/config';
|
|
||||||
const query = {
|
|
||||||
query: `SELECT TOP 1 * FROM c WHERE c.id = @quality`,
|
|
||||||
parameters: [
|
|
||||||
{ name: '@quality', value: quality }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
return new Promise<Config>((c, e) => {
|
|
||||||
client.queryDocuments(collection, query).toArray((err, results) => {
|
|
||||||
if (err && err.code !== 409) { return e(err); }
|
|
||||||
|
|
||||||
c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0] as any as Config);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function doRelease(commit: string, quality: string): Promise<void> {
|
|
||||||
const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT']!, { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
|
||||||
const collection = 'dbs/builds/colls/' + quality;
|
|
||||||
const query = {
|
|
||||||
query: 'SELECT TOP 1 * FROM c WHERE c.id = @id',
|
|
||||||
parameters: [{ name: '@id', value: commit }]
|
|
||||||
};
|
|
||||||
|
|
||||||
let updateTries = 0;
|
|
||||||
|
|
||||||
function update(): Promise<void> {
|
|
||||||
updateTries++;
|
|
||||||
|
|
||||||
return new Promise<void>((c, e) => {
|
|
||||||
client.queryDocuments(collection, query).toArray((err, results) => {
|
|
||||||
if (err) { return e(err); }
|
|
||||||
if (results.length !== 1) { return e(new Error('No documents')); }
|
|
||||||
|
|
||||||
const release = results[0];
|
|
||||||
release.isReleased = true;
|
|
||||||
|
|
||||||
client.replaceDocument(release._self, release, err => {
|
|
||||||
if (err && err.code === 409 && updateTries < 5) { return c(update()); }
|
|
||||||
if (err) { return e(err); }
|
|
||||||
|
|
||||||
console.log('Build successfully updated.');
|
|
||||||
c();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return update();
|
|
||||||
}
|
|
||||||
|
|
||||||
async function release(commit: string, quality: string): Promise<void> {
|
|
||||||
const config = await getConfig(quality);
|
|
||||||
|
|
||||||
console.log('Quality config:', config);
|
|
||||||
|
|
||||||
if (config.frozen) {
|
|
||||||
console.log(`Skipping release because quality ${quality} is frozen.`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await doRelease(commit, quality);
|
|
||||||
}
|
|
||||||
|
|
||||||
function env(name: string): string {
|
|
||||||
const result = process.env[name];
|
|
||||||
|
|
||||||
if (!result) {
|
|
||||||
throw new Error(`Skipping release due to missing env: ${name}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
|
||||||
const commit = env('BUILD_SOURCEVERSION');
|
|
||||||
const quality = env('VSCODE_QUALITY');
|
|
||||||
|
|
||||||
await release(commit, quality);
|
|
||||||
}
|
|
||||||
|
|
||||||
main().catch(err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import { CosmosClient } from '@azure/cosmos';
|
|
||||||
|
|
||||||
function getEnv(name: string): string {
|
|
||||||
const result = process.env[name];
|
|
||||||
|
|
||||||
if (typeof result === 'undefined') {
|
|
||||||
throw new Error('Missing env: ' + name);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Config {
|
|
||||||
id: string;
|
|
||||||
frozen: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
function createDefaultConfig(quality: string): Config {
|
|
||||||
return {
|
|
||||||
id: quality,
|
|
||||||
frozen: false
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getConfig(client: CosmosClient, quality: string): Promise<Config> {
|
|
||||||
const query = `SELECT TOP 1 * FROM c WHERE c.id = "${quality}"`;
|
|
||||||
|
|
||||||
const res = await client.database('builds').container('config').items.query(query).fetchAll();
|
|
||||||
|
|
||||||
if (res.resources.length === 0) {
|
|
||||||
return createDefaultConfig(quality);
|
|
||||||
}
|
|
||||||
|
|
||||||
return res.resources[0] as Config;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
|
||||||
const commit = getEnv('BUILD_SOURCEVERSION');
|
|
||||||
const quality = getEnv('VSCODE_QUALITY');
|
|
||||||
|
|
||||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
|
||||||
const config = await getConfig(client, quality);
|
|
||||||
|
|
||||||
console.log('Quality config:', config);
|
|
||||||
|
|
||||||
if (config.frozen) {
|
|
||||||
console.log(`Skipping release because quality ${quality} is frozen.`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`Releasing build ${commit}...`);
|
|
||||||
|
|
||||||
const scripts = client.database('builds').container(quality).scripts;
|
|
||||||
await scripts.storedProcedure('releaseBuild').execute('', [commit]);
|
|
||||||
}
|
|
||||||
|
|
||||||
main().then(() => {
|
|
||||||
console.log('Build successfully released');
|
|
||||||
process.exit(0);
|
|
||||||
}, err => {
|
|
||||||
console.error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
@@ -36,6 +36,7 @@ export interface IVersionAccessor extends IApplicationAccessor {
|
|||||||
enum Platform {
|
enum Platform {
|
||||||
WIN_32 = 'win32-ia32',
|
WIN_32 = 'win32-ia32',
|
||||||
WIN_64 = 'win32-x64',
|
WIN_64 = 'win32-x64',
|
||||||
|
LINUX_32 = 'linux-ia32',
|
||||||
LINUX_64 = 'linux-x64',
|
LINUX_64 = 'linux-x64',
|
||||||
MAC_OS = 'darwin-x64'
|
MAC_OS = 'darwin-x64'
|
||||||
}
|
}
|
||||||
@@ -146,10 +147,6 @@ async function ensureVersionAndSymbols(options: IOptions) {
|
|||||||
// Check version does not exist
|
// Check version does not exist
|
||||||
console.log(`HockeyApp: checking for existing version ${options.versions.code} (${options.platform})`);
|
console.log(`HockeyApp: checking for existing version ${options.versions.code} (${options.platform})`);
|
||||||
const versions = await getVersions({ accessToken: options.access.hockeyAppToken, appId: options.access.hockeyAppId });
|
const versions = await getVersions({ accessToken: options.access.hockeyAppToken, appId: options.access.hockeyAppId });
|
||||||
if (!Array.isArray(versions.app_versions)) {
|
|
||||||
throw new Error(`Unexpected response: ${JSON.stringify(versions)}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (versions.app_versions.some(v => v.version === options.versions.code)) {
|
if (versions.app_versions.some(v => v.version === options.versions.code)) {
|
||||||
console.log(`HockeyApp: Returning without uploading symbols because version ${options.versions.code} (${options.platform}) was already found`);
|
console.log(`HockeyApp: Returning without uploading symbols because version ${options.versions.code} (${options.platform}) was already found`);
|
||||||
return;
|
return;
|
||||||
@@ -188,17 +185,13 @@ const hockeyAppToken = process.argv[3];
|
|||||||
const is64 = process.argv[4] === 'x64';
|
const is64 = process.argv[4] === 'x64';
|
||||||
const hockeyAppId = process.argv[5];
|
const hockeyAppId = process.argv[5];
|
||||||
|
|
||||||
if (process.argv.length !== 6) {
|
|
||||||
throw new Error(`HockeyApp: Unexpected number of arguments. Got ${process.argv}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
let platform: Platform;
|
let platform: Platform;
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
platform = Platform.MAC_OS;
|
platform = Platform.MAC_OS;
|
||||||
} else if (process.platform === 'win32') {
|
} else if (process.platform === 'win32') {
|
||||||
platform = is64 ? Platform.WIN_64 : Platform.WIN_32;
|
platform = is64 ? Platform.WIN_64 : Platform.WIN_32;
|
||||||
} else {
|
} else {
|
||||||
platform = Platform.LINUX_64;
|
platform = is64 ? Platform.LINUX_64 : Platform.LINUX_32;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create version and upload symbols in HockeyApp
|
// Create version and upload symbols in HockeyApp
|
||||||
@@ -219,9 +212,7 @@ if (repository && codeVersion && electronVersion && (product.quality === 'stable
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
console.log('HockeyApp: done');
|
console.log('HockeyApp: done');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.error(`HockeyApp: error ${error} (AppID: ${hockeyAppId})`);
|
console.error(`HockeyApp: error (${error})`);
|
||||||
|
|
||||||
return process.exit(1);
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log(`HockeyApp: skipping due to unexpected context (repository: ${repository}, codeVersion: ${codeVersion}, electronVersion: ${electronVersion}, quality: ${product.quality})`);
|
console.log(`HockeyApp: skipping due to unexpected context (repository: ${repository}, codeVersion: ${codeVersion}, electronVersion: ${electronVersion}, quality: ${product.quality})`);
|
||||||
|
|||||||
@@ -1,130 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as url from 'url';
|
|
||||||
import * as azure from 'azure-storage';
|
|
||||||
import * as mime from 'mime';
|
|
||||||
import { CosmosClient } from '@azure/cosmos';
|
|
||||||
|
|
||||||
function log(...args: any[]) {
|
|
||||||
console.log(...[`[${new Date().toISOString()}]`, ...args]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function error(...args: any[]) {
|
|
||||||
console.error(...[`[${new Date().toISOString()}]`, ...args]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.argv.length < 3) {
|
|
||||||
error('Usage: node sync-mooncake.js <quality>');
|
|
||||||
process.exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Build {
|
|
||||||
assets: Asset[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Asset {
|
|
||||||
platform: string;
|
|
||||||
type: string;
|
|
||||||
url: string;
|
|
||||||
mooncakeUrl: string;
|
|
||||||
hash: string;
|
|
||||||
sha256hash: string;
|
|
||||||
size: number;
|
|
||||||
supportsFastUpdate?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function sync(commit: string, quality: string): Promise<void> {
|
|
||||||
log(`Synchronizing Mooncake assets for ${quality}, ${commit}...`);
|
|
||||||
|
|
||||||
const client = new CosmosClient({ endpoint: process.env['AZURE_DOCUMENTDB_ENDPOINT']!, key: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
|
||||||
const container = client.database('builds').container(quality);
|
|
||||||
|
|
||||||
const query = `SELECT TOP 1 * FROM c WHERE c.id = "${commit}"`;
|
|
||||||
const res = await container.items.query<Build>(query, {}).fetchAll();
|
|
||||||
|
|
||||||
if (res.resources.length !== 1) {
|
|
||||||
throw new Error(`No builds found for ${commit}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const build = res.resources[0];
|
|
||||||
|
|
||||||
log(`Found build for ${commit}, with ${build.assets.length} assets`);
|
|
||||||
|
|
||||||
const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!;
|
|
||||||
|
|
||||||
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
|
|
||||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
|
||||||
|
|
||||||
const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY']!, `${storageAccount}.blob.core.chinacloudapi.cn`)
|
|
||||||
.withFilter(new azure.ExponentialRetryPolicyFilter(20));
|
|
||||||
|
|
||||||
// mooncake is fussy and far away, this is needed!
|
|
||||||
blobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
|
|
||||||
mooncakeBlobService.defaultClientRequestTimeoutInMs = 10 * 60 * 1000;
|
|
||||||
|
|
||||||
for (const asset of build.assets) {
|
|
||||||
try {
|
|
||||||
const blobPath = url.parse(asset.url).path;
|
|
||||||
|
|
||||||
if (!blobPath) {
|
|
||||||
throw new Error(`Failed to parse URL: ${asset.url}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const blobName = blobPath.replace(/^\/\w+\//, '');
|
|
||||||
|
|
||||||
log(`Found ${blobName}`);
|
|
||||||
|
|
||||||
if (asset.mooncakeUrl) {
|
|
||||||
log(` Already in Mooncake ✔️`);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const readStream = blobService.createReadStream(quality, blobName, undefined!);
|
|
||||||
const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
|
|
||||||
contentSettings: {
|
|
||||||
contentType: mime.lookup(blobPath),
|
|
||||||
cacheControl: 'max-age=31536000, public'
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const writeStream = mooncakeBlobService.createWriteStreamToBlockBlob(quality, blobName, blobOptions, undefined);
|
|
||||||
|
|
||||||
log(` Uploading to Mooncake...`);
|
|
||||||
await new Promise((c, e) => readStream.pipe(writeStream).on('finish', c).on('error', e));
|
|
||||||
|
|
||||||
log(` Updating build in DB...`);
|
|
||||||
const mooncakeUrl = `${process.env['MOONCAKE_CDN_URL']}${blobPath}`;
|
|
||||||
await container.scripts.storedProcedure('setAssetMooncakeUrl')
|
|
||||||
.execute('', [commit, asset.platform, asset.type, mooncakeUrl]);
|
|
||||||
|
|
||||||
log(` Done ✔️`);
|
|
||||||
} catch (err) {
|
|
||||||
error(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
log(`All done ✔️`);
|
|
||||||
}
|
|
||||||
|
|
||||||
function main(): void {
|
|
||||||
const commit = process.env['BUILD_SOURCEVERSION'];
|
|
||||||
|
|
||||||
if (!commit) {
|
|
||||||
error('Skipping publish due to missing BUILD_SOURCEVERSION');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const quality = process.argv[2];
|
|
||||||
|
|
||||||
sync(commit, quality).catch(err => {
|
|
||||||
error(err);
|
|
||||||
process.exit(1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"eventPrefix": "typescript-language-features/",
|
|
||||||
"sourceDirs": [
|
|
||||||
"../../s/extensions/typescript-language-features"
|
|
||||||
],
|
|
||||||
"excludedDirs": [],
|
|
||||||
"applyEndpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"eventPrefix": "git/",
|
|
||||||
"sourceDirs": [
|
|
||||||
"../../s/extensions/git"
|
|
||||||
],
|
|
||||||
"excludedDirs": [],
|
|
||||||
"applyEndpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"eventPrefix": "extension-telemetry/",
|
|
||||||
"sourceDirs": [
|
|
||||||
"vscode-extension-telemetry"
|
|
||||||
],
|
|
||||||
"excludedDirs": [],
|
|
||||||
"applyEndpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"eventPrefix": "vscode-markdown/",
|
|
||||||
"sourceDirs": [
|
|
||||||
"../../s/extensions/markdown-language-features"
|
|
||||||
],
|
|
||||||
"excludedDirs": [],
|
|
||||||
"applyEndpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"eventPrefix": "html-language-features/",
|
|
||||||
"sourceDirs": [
|
|
||||||
"../../s/extensions/html-language-features",
|
|
||||||
"vscode-html-languageservice"
|
|
||||||
],
|
|
||||||
"excludedDirs": [],
|
|
||||||
"applyEndpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"eventPrefix": "json-language-features/",
|
|
||||||
"sourceDirs": [
|
|
||||||
"../../s/extensions/json-language-features",
|
|
||||||
"vscode-json-languageservice"
|
|
||||||
],
|
|
||||||
"excludedDirs": [],
|
|
||||||
"applyEndpoints": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"eventPrefix": "ms-vscode.node2/",
|
|
||||||
"sourceDirs": [
|
|
||||||
"vscode-chrome-debug-core",
|
|
||||||
"vscode-node-debug2"
|
|
||||||
],
|
|
||||||
"excludedDirs": [],
|
|
||||||
"applyEndpoints": true,
|
|
||||||
"patchDebugEvents": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"eventPrefix": "ms-vscode.node/",
|
|
||||||
"sourceDirs": [
|
|
||||||
"vscode-chrome-debug-core",
|
|
||||||
"vscode-node-debug"
|
|
||||||
],
|
|
||||||
"excludedDirs": [],
|
|
||||||
"applyEndpoints": true,
|
|
||||||
"patchDebugEvents": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,55 +1,47 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.1"
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.x"
|
versionSpec: "1.10.1"
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
||||||
inputs:
|
# inputs:
|
||||||
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
||||||
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
|
# vstsFeed: '$(ArtifactFeed)'
|
||||||
|
# condition: eq(variables['System.PullRequest.PullRequestId'], '')
|
||||||
- script: |
|
- script: |
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
yarn
|
||||||
displayName: Install Dependencies
|
displayName: Install Dependencies
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
# condition: or(ne(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
||||||
inputs:
|
# inputs:
|
||||||
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
||||||
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
|
# vstsFeed: '$(ArtifactFeed)'
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
# condition: and(succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
|
||||||
- script: |
|
- script: |
|
||||||
yarn electron x64
|
yarn gulp electron-x64
|
||||||
displayName: Download Electron
|
displayName: Download Electron
|
||||||
- script: |
|
- script: |
|
||||||
yarn gulp hygiene --skip-tslint
|
yarn gulp hygiene
|
||||||
displayName: Run Hygiene Checks
|
displayName: Run Hygiene Checks
|
||||||
- script: |
|
- script: |
|
||||||
yarn gulp tslint
|
yarn monaco-compile-check
|
||||||
displayName: Run TSLint Checks
|
displayName: Run Monaco Editor Checks
|
||||||
- script: | # {{SQL CARBON EDIT}} add step
|
|
||||||
yarn strict-null-check
|
|
||||||
displayName: Run Strict Null Check.
|
|
||||||
- script: | # {{SQL CARBON EDIT}} add step
|
|
||||||
yarn tslint
|
|
||||||
displayName: Run TSLint (gci)
|
|
||||||
# - script: | {{SQL CARBON EDIT}} remove step
|
|
||||||
# yarn monaco-compile-check
|
|
||||||
# displayName: Run Monaco Editor Checks
|
|
||||||
- script: |
|
- script: |
|
||||||
yarn compile
|
yarn compile
|
||||||
displayName: Compile Sources
|
displayName: Compile Sources
|
||||||
# - script: | {{SQL CARBON EDIT}} remove step
|
- script: |
|
||||||
# yarn download-builtin-extensions
|
yarn download-builtin-extensions
|
||||||
# displayName: Download Built-in Extensions
|
displayName: Download Built-in Extensions
|
||||||
- script: |
|
- script: |
|
||||||
./scripts/test.sh --tfs "Unit Tests"
|
./scripts/test.sh --tfs "Unit Tests"
|
||||||
displayName: Run Unit Tests
|
displayName: Run Unit Tests
|
||||||
# - script: | {{SQL CARBON EDIT}} remove step
|
- script: |
|
||||||
# ./scripts/test-integration.sh --tfs "Integration Tests"
|
./scripts/test-integration.sh --tfs "Integration Tests"
|
||||||
# displayName: Run Integration Tests
|
displayName: Run Integration Tests
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Tests Results
|
displayName: Publish Tests Results
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
REPO="$(pwd)"
|
|
||||||
|
|
||||||
# ensure drop directories exist
|
|
||||||
mkdir -p $REPO/.build/darwin/{archive,server}
|
|
||||||
|
|
||||||
# remove pkg from archive
|
|
||||||
zip -d $REPO/.build/darwin/archive/azuredatastudio-darwin.zip "*.pkg"
|
|
||||||
|
|
||||||
# package Remote Extension Host
|
|
||||||
pushd .. && mv azuredatastudio-reh-darwin azuredatastudio-server-darwin && zip -Xry $REPO/.build/darwin/server/azuredatastudio-server-darwin.zip azuredatastudio-server-darwin && popd
|
|
||||||
|
|
||||||
node build/azure-pipelines/common/copyArtifacts.js
|
|
||||||
@@ -1,96 +1,39 @@
|
|||||||
steps:
|
steps:
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.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.10.1"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
|
||||||
KeyVaultName: vscode
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cat << EOF > ~/.netrc
|
cat << EOF > ~/.netrc
|
||||||
|
machine monacotools.visualstudio.com
|
||||||
|
password $(VSO_PAT)
|
||||||
machine github.com
|
machine github.com
|
||||||
login vscode
|
login vscode
|
||||||
password $(github-distro-mixin-password)
|
password $(VSCODE_MIXIN_PASSWORD)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
git config user.email "vscode@microsoft.com"
|
yarn
|
||||||
git config user.name "VSCode"
|
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" yarn gulp -- mixin
|
||||||
displayName: Prepare tooling
|
yarn gulp -- hygiene
|
||||||
|
yarn monaco-compile-check
|
||||||
|
node build/azure-pipelines/common/installDistro.js
|
||||||
|
node build/lib/builtInExtensions.js
|
||||||
|
displayName: Prepare build
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" \
|
||||||
git fetch distro
|
AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \
|
||||||
git merge $(node -p "require('./package.json').distro")
|
yarn gulp -- vscode-darwin-min
|
||||||
displayName: Merge distro
|
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" \
|
||||||
|
AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
yarn gulp -- upload-vscode-sourcemaps
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
||||||
displayName: Install dependencies
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn postinstall
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
yarn gulp vscode-darwin-min-ci
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
yarn gulp vscode-reh-darwin-min-ci
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
yarn gulp vscode-reh-web-darwin-min-ci
|
|
||||||
displayName: Build
|
displayName: Build
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
@@ -99,41 +42,6 @@ steps:
|
|||||||
# APP_NAME="`ls $(agent.builddirectory)/VSCode-darwin | head -n 1`"
|
# APP_NAME="`ls $(agent.builddirectory)/VSCode-darwin | head -n 1`"
|
||||||
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-darwin/$APP_NAME"
|
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-darwin/$APP_NAME"
|
||||||
displayName: Run unit tests
|
displayName: Run unit tests
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
# Figure out the full absolute path of the product we just built
|
|
||||||
# including the remote server and configure the integration tests
|
|
||||||
# to run with these builds instead of running out of sources.
|
|
||||||
set -e
|
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
|
||||||
APP_NAME="`ls $APP_ROOT | head -n 1`"
|
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
|
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \
|
|
||||||
./scripts/test-integration.sh --build --tfs "Integration Tests"
|
|
||||||
displayName: Run integration tests
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
# Web Smoke Tests disabled due to https://github.com/microsoft/vscode/issues/80308
|
|
||||||
# - script: |
|
|
||||||
# set -e
|
|
||||||
# cd test/smoke
|
|
||||||
# yarn compile
|
|
||||||
# cd -
|
|
||||||
# yarn smoketest --web --headless
|
|
||||||
# continueOnError: true
|
|
||||||
# displayName: Run web smoke tests
|
|
||||||
# condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
cd test/smoke
|
|
||||||
yarn compile
|
|
||||||
cd -
|
|
||||||
yarn smoketest --web --headless
|
|
||||||
continueOnError: true
|
|
||||||
displayName: Run smoke tests
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
@@ -161,12 +69,31 @@ steps:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
# remove pkg from archive
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
|
zip -d ../VSCode-darwin.zip "*.pkg"
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
|
||||||
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
|
# publish the build
|
||||||
./build/azure-pipelines/darwin/publish.sh
|
PACKAGEJSON=`ls ../VSCode-darwin/*.app/Contents/Resources/app/package.json`
|
||||||
|
VERSION=`node -p "require(\"$PACKAGEJSON\").version"`
|
||||||
|
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
||||||
|
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
||||||
|
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
||||||
|
node build/azure-pipelines/common/publish.js \
|
||||||
|
"$(VSCODE_QUALITY)" \
|
||||||
|
darwin \
|
||||||
|
archive \
|
||||||
|
"VSCode-darwin-$(VSCODE_QUALITY).zip" \
|
||||||
|
$VERSION \
|
||||||
|
true \
|
||||||
|
../VSCode-darwin.zip
|
||||||
|
|
||||||
|
# publish hockeyapp symbols
|
||||||
|
node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" "$(VSCODE_HOCKEYAPP_ID_MACOS)"
|
||||||
|
|
||||||
|
# upload configuration
|
||||||
|
AZURE_STORAGE_ACCESS_KEY="$(AZURE_STORAGE_ACCESS_KEY)" \
|
||||||
|
yarn gulp -- upload-vscode-configuration
|
||||||
displayName: Publish
|
displayName: Publish
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# remove pkg from archive
|
|
||||||
zip -d ../VSCode-darwin.zip "*.pkg"
|
|
||||||
|
|
||||||
# publish the build
|
|
||||||
node build/azure-pipelines/common/createAsset.js \
|
|
||||||
darwin \
|
|
||||||
archive \
|
|
||||||
"VSCode-darwin-$VSCODE_QUALITY.zip" \
|
|
||||||
../VSCode-darwin.zip
|
|
||||||
|
|
||||||
# package Remote Extension Host
|
|
||||||
pushd .. && mv vscode-reh-darwin vscode-server-darwin && zip -Xry vscode-server-darwin.zip vscode-server-darwin && popd
|
|
||||||
|
|
||||||
# publish Remote Extension Host
|
|
||||||
node build/azure-pipelines/common/createAsset.js \
|
|
||||||
server-darwin \
|
|
||||||
archive-unsigned \
|
|
||||||
"vscode-server-darwin.zip" \
|
|
||||||
../vscode-server-darwin.zip
|
|
||||||
|
|
||||||
# publish hockeyapp symbols
|
|
||||||
node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" x64 "$VSCODE_HOCKEYAPP_ID_MACOS"
|
|
||||||
|
|
||||||
# upload configuration
|
|
||||||
yarn gulp upload-vscode-configuration
|
|
||||||
@@ -1,171 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: '10.15.3'
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
|
||||||
inputs:
|
|
||||||
versionSpec: '1.x'
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
|
||||||
KeyVaultName: ado-secrets
|
|
||||||
SecretsFilter: 'github-distro-mixin-password'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cat << EOF > ~/.netrc
|
|
||||||
machine github.com
|
|
||||||
login azuredatastudio
|
|
||||||
password $(github-distro-mixin-password)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
git config user.email "andresse@microsoft.com"
|
|
||||||
git config user.name "AzureDataStudio"
|
|
||||||
displayName: Prepare tooling
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
||||||
displayName: Install dependencies
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: $(github-distro-mixin-password)
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn postinstall
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp install-sqltoolsservice
|
|
||||||
displayName: Install sqltoolsservice
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp package-rebuild-extensions
|
|
||||||
yarn gulp vscode-darwin-min-ci
|
|
||||||
yarn gulp vscode-reh-darwin-min-ci
|
|
||||||
yarn gulp vscode-reh-web-darwin-min-ci
|
|
||||||
displayName: Build
|
|
||||||
env:
|
|
||||||
VSCODE_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
./scripts/test.sh --build --coverage --reporter mocha-junit-reporter
|
|
||||||
displayName: Run unit tests
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
mkdir -p .build/darwin/archive
|
|
||||||
pushd ../azuredatastudio-darwin && zip -r -X -y $(Build.SourcesDirectory)/.build/darwin/archive/azuredatastudio-darwin.zip * && popd
|
|
||||||
displayName: 'Archive'
|
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
|
||||||
displayName: 'ESRP CodeSigning'
|
|
||||||
inputs:
|
|
||||||
ConnectedServiceName: 'Code Signing'
|
|
||||||
FolderPath: '$(Build.SourcesDirectory)/.build/darwin/archive'
|
|
||||||
Pattern: 'azuredatastudio-darwin.zip'
|
|
||||||
signConfigType: inlineSignParams
|
|
||||||
inlineOperation: |
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"keyCode": "CP-401337-Apple",
|
|
||||||
"operationSetCode": "MacAppDeveloperSign",
|
|
||||||
"parameters": [],
|
|
||||||
"toolName": "sign",
|
|
||||||
"toolVersion": "1.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
SessionTimeout: 20
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
./build/azure-pipelines/darwin/createDrop.sh
|
|
||||||
displayName: Create Drop
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish Artifact: drop'
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: 'Publish Test Results test-results.xml'
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: 'test-results.xml'
|
|
||||||
searchFolder: '$(Build.SourcesDirectory)'
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: 'Publish Integration and Smoke Test Results'
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: 'dawin-integration-tests-results.xml'
|
|
||||||
searchFolder: '$(Build.ArtifactStagingDirectory)\test-results'
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- task: PublishCodeCoverageResults@1
|
|
||||||
displayName: 'Publish code coverage from $(Build.SourcesDirectory)/.build/coverage/cobertura-coverage.xml'
|
|
||||||
inputs:
|
|
||||||
codeCoverageTool: Cobertura
|
|
||||||
summaryFileLocation: '$(Build.SourcesDirectory)/.build/coverage/cobertura-coverage.xml'
|
|
||||||
reportDirectory: '$(Build.SourcesDirectory)/.build/coverage'
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
||||||
displayName: 'Component Detection'
|
|
||||||
inputs:
|
|
||||||
failOnAlert: true
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
Param(
|
|
||||||
[string]$sourcesDir,
|
|
||||||
[string]$artifactsDir,
|
|
||||||
[string]$storageKey,
|
|
||||||
[string]$documentDbKey
|
|
||||||
)
|
|
||||||
|
|
||||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey
|
|
||||||
$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey
|
|
||||||
|
|
||||||
$VersionJson = Get-Content -Raw -Path "$artifactsDir\version.json" | ConvertFrom-Json
|
|
||||||
$Version = $VersionJson.version
|
|
||||||
$Quality = $VersionJson.quality
|
|
||||||
$CommitId = $VersionJson.commit
|
|
||||||
|
|
||||||
$ZipName = "azuredatastudio-darwin.zip"
|
|
||||||
$Zip = "$artifactsDir\darwin\archive\$ZipName"
|
|
||||||
|
|
||||||
node $sourcesDir\build\azure-pipelines\common\publish.js $Quality darwin archive $ZipName $Version true $Zip $CommitId
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branches:
|
|
||||||
include: ['master', 'release/*']
|
|
||||||
pr:
|
|
||||||
branches:
|
|
||||||
include: ['master', 'release/*']
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.13.0"
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'azuredatastudio-adointegration'
|
|
||||||
KeyVaultName: ado-secrets
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cat << EOF > ~/.netrc
|
|
||||||
machine github.com
|
|
||||||
login azuredatastudio
|
|
||||||
password $(github-distro-mixin-password)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
git config user.email "andresse@microsoft.com"
|
|
||||||
git config user.name "AzureDataStudio"
|
|
||||||
|
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
|
|
||||||
# Push master branch into oss/master
|
|
||||||
git push distro origin/master:refs/heads/oss/master
|
|
||||||
|
|
||||||
# Push every release branch into oss/release
|
|
||||||
git for-each-ref --format="%(refname:short)" refs/remotes/origin/release/* | sed 's/^origin\/\(.*\)$/\0:refs\/heads\/oss\/\1/' | xargs git push distro
|
|
||||||
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
|
|
||||||
displayName: Sync & Merge Distro
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#Download base image ubuntu 16.04
|
|
||||||
FROM ubuntu:16.04
|
|
||||||
|
|
||||||
# Update Software repository
|
|
||||||
RUN apt-get update
|
|
||||||
|
|
||||||
RUN apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus libgtk-3-0
|
|
||||||
|
|
||||||
ADD ./ /opt/ads-server
|
|
||||||
|
|
||||||
RUN chmod +x /opt/ads-server/server.sh && chmod +x /opt/ads-server/node
|
|
||||||
|
|
||||||
CMD ["/opt/ads-server/server.sh"]
|
|
||||||
|
|
||||||
EXPOSE 8000:8000
|
|
||||||
EXPOSE 8001:8001
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
|
|
||||||
trigger: none
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.13.0"
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
|
||||||
KeyVaultName: vscode
|
|
||||||
|
|
||||||
- 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"
|
|
||||||
|
|
||||||
git checkout origin/electron-6.0.x
|
|
||||||
git merge origin/master
|
|
||||||
|
|
||||||
# Push master branch into exploration branch
|
|
||||||
git push origin HEAD:electron-6.0.x
|
|
||||||
|
|
||||||
displayName: Sync & Merge Exploration
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
trigger:
|
|
||||||
branches:
|
|
||||||
include: ['master']
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: ExplorationMerge
|
|
||||||
pool:
|
|
||||||
vmImage: Ubuntu-16.04
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "10.15.1"
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cat << EOF > ~/.netrc
|
|
||||||
machine mssqltools.visualstudio.com
|
|
||||||
login azuredatastudio
|
|
||||||
password $(DEVOPS_PASSWORD)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
git config user.email "andresse@microsoft.com"
|
|
||||||
git config user.name "AzureDataStudio"
|
|
||||||
|
|
||||||
git remote add explore "$ADS_EXPLORE_REPO"
|
|
||||||
git fetch explore
|
|
||||||
|
|
||||||
git checkout -b merge-branch explore/master
|
|
||||||
|
|
||||||
git merge origin/master
|
|
||||||
|
|
||||||
git push explore HEAD:master
|
|
||||||
|
|
||||||
displayName: Sync & Merge Explore
|
|
||||||
env:
|
|
||||||
ADS_EXPLORE_REPO: $(ADS_EXPLORE_REPO)
|
|
||||||
DEVOPS_PASSWORD: $(DEVOPS_PASSWORD)
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#Download base image ubuntu 16.04
|
|
||||||
FROM ubuntu:16.04
|
|
||||||
|
|
||||||
# Update Software repository
|
|
||||||
RUN apt-get update --fix-missing
|
|
||||||
|
|
||||||
RUN apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 \
|
|
||||||
libkrb5-dev git apt-transport-https ca-certificates curl gnupg-agent software-properties-common \
|
|
||||||
libnss3 libasound2 make gcc libx11-dev fakeroot rpm libgconf-2-4 libunwind8 g++-4.8
|
|
||||||
|
|
||||||
#docker
|
|
||||||
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
|
|
||||||
RUN apt-key fingerprint 0EBFCD88
|
|
||||||
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get -y install docker-ce docker-ce-cli containerd.io
|
|
||||||
|
|
||||||
# This image needs to be built on a linux host; some weird stuff happens and the xvfb service won't start
|
|
||||||
# if built on a windows host.
|
|
||||||
ADD ./xvfb.init /etc/init.d/xvfb
|
|
||||||
RUN chmod +x /etc/init.d/xvfb
|
|
||||||
RUN update-rc.d xvfb defaults
|
|
||||||
@@ -2,62 +2,51 @@ steps:
|
|||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libkrb5-dev #{{SQL CARBON EDIT}} add kerberos dep
|
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0
|
||||||
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
|
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
|
||||||
sudo chmod +x /etc/init.d/xvfb
|
sudo chmod +x /etc/init.d/xvfb
|
||||||
sudo update-rc.d xvfb defaults
|
sudo update-rc.d xvfb defaults
|
||||||
sudo service xvfb start
|
sudo service xvfb start
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.1"
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.x"
|
versionSpec: "1.10.1"
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
||||||
inputs:
|
# inputs:
|
||||||
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
||||||
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
|
# vstsFeed: '$(ArtifactFeed)'
|
||||||
|
# condition: eq(variables['System.PullRequest.PullRequestId'], '')
|
||||||
- script: |
|
- script: |
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
yarn
|
||||||
displayName: Install Dependencies
|
displayName: Install Dependencies
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
# condition: or(ne(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
||||||
inputs:
|
# inputs:
|
||||||
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
||||||
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
|
# vstsFeed: '$(ArtifactFeed)'
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
# condition: and(succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
|
||||||
- script: |
|
- script: |
|
||||||
yarn electron x64
|
yarn gulp electron-x64
|
||||||
displayName: Download Electron
|
displayName: Download Electron
|
||||||
- script: |
|
- script: |
|
||||||
yarn gulp hygiene --skip-tslint
|
yarn gulp hygiene
|
||||||
displayName: Run Hygiene Checks
|
displayName: Run Hygiene Checks
|
||||||
- script: |
|
- script: |
|
||||||
yarn gulp tslint
|
yarn monaco-compile-check
|
||||||
displayName: Run TSLint Checks
|
displayName: Run Monaco Editor Checks
|
||||||
- script: | # {{SQL CARBON EDIT}} add gci checks
|
|
||||||
yarn tslint
|
|
||||||
displayName: Run TSLint (gci)
|
|
||||||
- script: | # {{SQL CARBON EDIT}} add strict null check
|
|
||||||
yarn strict-null-check
|
|
||||||
displayName: Run Strict Null Check
|
|
||||||
# - script: | {{SQL CARBON EDIT}} remove monaco editor checks
|
|
||||||
# yarn monaco-compile-check
|
|
||||||
# displayName: Run Monaco Editor Checks
|
|
||||||
- script: |
|
- script: |
|
||||||
yarn compile
|
yarn compile
|
||||||
displayName: Compile Sources
|
displayName: Compile Sources
|
||||||
# - script: | {{SQL CARBON EDIT}} remove step
|
- script: |
|
||||||
# yarn download-builtin-extensions
|
yarn download-builtin-extensions
|
||||||
# displayName: Download Built-in Extensions
|
displayName: Download Built-in Extensions
|
||||||
- script: |
|
- script: |
|
||||||
DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests"
|
DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests"
|
||||||
displayName: Run Unit Tests
|
displayName: Run Unit Tests
|
||||||
# - script: | {{SQL CARBON EDIT}} remove step
|
|
||||||
# DISPLAY=:10 ./scripts/test-integration.sh --tfs "Integration Tests"
|
|
||||||
# displayName: Run Integration Tests
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Tests Results
|
displayName: Publish Tests Results
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
REPO="$(pwd)"
|
|
||||||
ROOT="$REPO/.."
|
|
||||||
|
|
||||||
# Publish tarball
|
|
||||||
mkdir -p $REPO/.build/linux/{archive,server}
|
|
||||||
PLATFORM_LINUX="linux-x64"
|
|
||||||
BUILDNAME="azuredatastudio-$PLATFORM_LINUX"
|
|
||||||
BUILD="$ROOT/$BUILDNAME"
|
|
||||||
TARBALL_FILENAME="azuredatastudio-$PLATFORM_LINUX.tar.gz"
|
|
||||||
TARBALL_PATH="$REPO/.build/linux/archive/$TARBALL_FILENAME"
|
|
||||||
|
|
||||||
# create version
|
|
||||||
PACKAGEJSON="$BUILD/resources/app/package.json"
|
|
||||||
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
|
|
||||||
COMMIT_ID=$(git rev-parse HEAD)
|
|
||||||
echo -e "{ \"version\": \"$VERSION\", \"quality\": \"$VSCODE_QUALITY\", \"commit\": \"$COMMIT_ID\" }" > "$REPO/.build/version.json"
|
|
||||||
|
|
||||||
rm -rf $ROOT/code-*.tar.*
|
|
||||||
(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME)
|
|
||||||
|
|
||||||
# Publish Remote Extension Host
|
|
||||||
LEGACY_SERVER_BUILD_NAME="azuredatastudio-reh-$PLATFORM_LINUX"
|
|
||||||
SERVER_BUILD_NAME="azuredatastudio-server-$PLATFORM_LINUX"
|
|
||||||
SERVER_TARBALL_FILENAME="azuredatastudio-server-$PLATFORM_LINUX.tar.gz"
|
|
||||||
SERVER_TARBALL_PATH="$REPO/.build/linux/server/$SERVER_TARBALL_FILENAME"
|
|
||||||
|
|
||||||
rm -rf $ROOT/azuredatastudio-server-*.tar.*
|
|
||||||
(cd $ROOT && mv $LEGACY_SERVER_BUILD_NAME $SERVER_BUILD_NAME && tar --owner=0 --group=0 -czf $SERVER_TARBALL_PATH $SERVER_BUILD_NAME)
|
|
||||||
|
|
||||||
# create docker
|
|
||||||
mkdir -p $REPO/.build/docker
|
|
||||||
docker build -t azuredatastudio-server -f $REPO/build/azure-pipelines/docker/Dockerfile $ROOT/$SERVER_BUILD_NAME
|
|
||||||
docker save azuredatastudio-server | gzip > $REPO/.build/docker/azuredatastudio-server-docker.tar.gz
|
|
||||||
|
|
||||||
node build/azure-pipelines/common/copyArtifacts.js
|
|
||||||
40
build/azure-pipelines/linux/frozen-check.js
Normal file
40
build/azure-pipelines/linux/frozen-check.js
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
'use strict';
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const documentdb_1 = require("documentdb");
|
||||||
|
function createDefaultConfig(quality) {
|
||||||
|
return {
|
||||||
|
id: quality,
|
||||||
|
frozen: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function getConfig(quality) {
|
||||||
|
const client = new documentdb_1.DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] });
|
||||||
|
const collection = 'dbs/builds/colls/config';
|
||||||
|
const query = {
|
||||||
|
query: `SELECT TOP 1 * FROM c WHERE c.id = @quality`,
|
||||||
|
parameters: [
|
||||||
|
{ name: '@quality', value: quality }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
return new Promise((c, e) => {
|
||||||
|
client.queryDocuments(collection, query).toArray((err, results) => {
|
||||||
|
if (err && err.code !== 409) {
|
||||||
|
return e(err);
|
||||||
|
}
|
||||||
|
c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
getConfig(process.argv[2])
|
||||||
|
.then(config => {
|
||||||
|
console.log(config.frozen);
|
||||||
|
process.exit(0);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
echo 'noop'
|
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.13.0"
|
|
||||||
|
|
||||||
- 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: Docker@1
|
|
||||||
displayName: 'Pull image'
|
|
||||||
inputs:
|
|
||||||
azureSubscriptionEndpoint: 'vscode-builds-subscription'
|
|
||||||
azureContainerRegistry: vscodehub.azurecr.io
|
|
||||||
command: 'Run an image'
|
|
||||||
imageName: 'vscode-linux-build-agent:$(VSCODE_ARCH)'
|
|
||||||
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 remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
||||||
displayName: Install dependencies
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn postinstall
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 ./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/prebuild.sh
|
|
||||||
displayName: Prebuild
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/build.sh
|
|
||||||
displayName: Build
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
|
|
||||||
./build/azure-pipelines/linux/multiarch/$(VSCODE_ARCH)/publish.sh
|
|
||||||
displayName: Publish
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
||||||
displayName: 'Component Detection'
|
|
||||||
continueOnError: true
|
|
||||||
@@ -1,164 +1,118 @@
|
|||||||
steps:
|
steps:
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.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.10.1"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
|
||||||
KeyVaultName: vscode
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
|
export npm_config_arch="$(VSCODE_ARCH)"
|
||||||
|
if [[ "$(VSCODE_ARCH)" == "ia32" ]]; then
|
||||||
|
export PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig"
|
||||||
|
fi
|
||||||
|
|
||||||
cat << EOF > ~/.netrc
|
cat << EOF > ~/.netrc
|
||||||
|
machine monacotools.visualstudio.com
|
||||||
|
password $(VSO_PAT)
|
||||||
machine github.com
|
machine github.com
|
||||||
login vscode
|
login vscode
|
||||||
password $(github-distro-mixin-password)
|
password $(VSCODE_MIXIN_PASSWORD)
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
git config user.email "vscode@microsoft.com"
|
CHILD_CONCURRENCY=1 yarn
|
||||||
git config user.name "VSCode"
|
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- mixin
|
||||||
displayName: Prepare tooling
|
npm run gulp -- hygiene
|
||||||
|
npm run monaco-compile-check
|
||||||
|
node build/azure-pipelines/common/installDistro.js
|
||||||
|
node build/lib/builtInExtensions.js
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)" npm run gulp -- vscode-linux-$(VSCODE_ARCH)-min
|
||||||
git fetch distro
|
name: build
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
npm run gulp -- "electron-$(VSCODE_ARCH)"
|
||||||
displayName: Install dependencies
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
# xvfb seems to be crashing often, let's make sure it's always up
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn postinstall
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
yarn gulp vscode-linux-x64-min-ci
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
yarn gulp vscode-reh-linux-x64-min-ci
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
yarn gulp vscode-reh-web-linux-x64-min-ci
|
|
||||||
displayName: Build
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
service xvfb start
|
service xvfb start
|
||||||
displayName: Start xvfb
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
DISPLAY=:10 ./scripts/test.sh --build --tfs "Unit Tests"
|
||||||
displayName: Run unit tests
|
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
name: test
|
||||||
|
|
||||||
- script: |
|
|
||||||
# Figure out the full absolute path of the product we just built
|
|
||||||
# including the remote server and configure the integration tests
|
|
||||||
# to run with these builds instead of running out of sources.
|
|
||||||
set -e
|
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-x64
|
|
||||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-x64" \
|
|
||||||
DISPLAY=:10 ./scripts/test-integration.sh --build --tfs "Integration Tests"
|
|
||||||
# yarn smoketest -- --build "$(agent.builddirectory)/VSCode-linux-x64"
|
|
||||||
displayName: Run integration tests
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn gulp "vscode-linux-x64-build-deb"
|
REPO="$(pwd)"
|
||||||
yarn gulp "vscode-linux-x64-build-rpm"
|
ROOT="$REPO/.."
|
||||||
yarn gulp "vscode-linux-x64-prepare-snap"
|
ARCH="$(VSCODE_ARCH)"
|
||||||
displayName: Build packages
|
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
# Publish tarball
|
||||||
inputs:
|
PLATFORM_LINUX="linux-$(VSCODE_ARCH)"
|
||||||
ConnectedServiceName: 'ESRP CodeSign'
|
[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
|
||||||
FolderPath: '.build/linux/rpm/x86_64'
|
[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
|
||||||
Pattern: '*.rpm'
|
BUILDNAME="VSCode-$PLATFORM_LINUX"
|
||||||
signConfigType: inlineSignParams
|
BUILD="$ROOT/$BUILDNAME"
|
||||||
inlineOperation: |
|
BUILD_VERSION="$(date +%s)"
|
||||||
[
|
[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz"
|
||||||
{
|
TARBALL_PATH="$ROOT/$TARBALL_FILENAME"
|
||||||
"keyCode": "CP-450779-Pgp",
|
PACKAGEJSON="$BUILD/resources/app/package.json"
|
||||||
"operationSetCode": "LinuxSign",
|
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
|
||||||
"parameters": [ ],
|
|
||||||
"toolName": "sign",
|
|
||||||
"toolVersion": "1.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
SessionTimeout: 120
|
|
||||||
displayName: Codesign rpm
|
|
||||||
|
|
||||||
- script: |
|
rm -rf $ROOT/code-*.tar.*
|
||||||
set -e
|
(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME)
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
VSCODE_HOCKEYAPP_TOKEN="$(vscode-hockeyapp-token)" \
|
|
||||||
./build/azure-pipelines/linux/publish.sh
|
|
||||||
displayName: Publish
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
||||||
displayName: 'Publish Pipeline Artifact'
|
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
||||||
inputs:
|
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
||||||
artifactName: snap-x64
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$VERSION" true "$TARBALL_PATH"
|
||||||
targetPath: .build/linux/snap-tarball
|
|
||||||
|
# Publish hockeyapp symbols
|
||||||
|
node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" "$(VSCODE_HOCKEYAPP_ID_LINUX64)"
|
||||||
|
|
||||||
|
# Publish DEB
|
||||||
|
npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-deb"
|
||||||
|
PLATFORM_DEB="linux-deb-$ARCH"
|
||||||
|
[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64"
|
||||||
|
DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)"
|
||||||
|
DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME"
|
||||||
|
|
||||||
|
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
||||||
|
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
||||||
|
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
||||||
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_DEB" package "$DEB_FILENAME" "$VERSION" true "$DEB_PATH"
|
||||||
|
|
||||||
|
# Publish RPM
|
||||||
|
npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-build-rpm"
|
||||||
|
PLATFORM_RPM="linux-rpm-$ARCH"
|
||||||
|
[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64"
|
||||||
|
RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)"
|
||||||
|
RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
|
||||||
|
|
||||||
|
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
||||||
|
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
||||||
|
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
||||||
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "$PLATFORM_RPM" package "$RPM_FILENAME" "$VERSION" true "$RPM_PATH"
|
||||||
|
|
||||||
|
# Publish Snap
|
||||||
|
npm run gulp -- "vscode-linux-$(VSCODE_ARCH)-prepare-snap"
|
||||||
|
|
||||||
|
# Pack snap tarball artifact, in order to preserve file perms
|
||||||
|
mkdir -p $REPO/.build/linux/snap-tarball
|
||||||
|
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-$(VSCODE_ARCH).tar.gz"
|
||||||
|
rm -rf $SNAP_TARBALL_PATH
|
||||||
|
(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap)
|
||||||
|
|
||||||
- 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
|
||||||
|
|
||||||
|
- task: PublishPipelineArtifact@0
|
||||||
|
displayName: 'Publish Pipeline Artifact'
|
||||||
|
inputs:
|
||||||
|
artifactName: snap-$(VSCODE_ARCH)
|
||||||
|
targetPath: .build/linux/snap-tarball
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
REPO="$(pwd)"
|
|
||||||
ROOT="$REPO/.."
|
|
||||||
|
|
||||||
# Publish tarball
|
|
||||||
PLATFORM_LINUX="linux-x64"
|
|
||||||
BUILDNAME="VSCode-$PLATFORM_LINUX"
|
|
||||||
BUILD="$ROOT/$BUILDNAME"
|
|
||||||
BUILD_VERSION="$(date +%s)"
|
|
||||||
[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz"
|
|
||||||
TARBALL_PATH="$ROOT/$TARBALL_FILENAME"
|
|
||||||
|
|
||||||
rm -rf $ROOT/code-*.tar.*
|
|
||||||
(cd $ROOT && tar -czf $TARBALL_PATH $BUILDNAME)
|
|
||||||
|
|
||||||
node build/azure-pipelines/common/createAsset.js "$PLATFORM_LINUX" archive-unsigned "$TARBALL_FILENAME" "$TARBALL_PATH"
|
|
||||||
|
|
||||||
# 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)
|
|
||||||
|
|
||||||
node build/azure-pipelines/common/createAsset.js "server-$PLATFORM_LINUX" archive-unsigned "$SERVER_TARBALL_FILENAME" "$SERVER_TARBALL_PATH"
|
|
||||||
|
|
||||||
# Publish hockeyapp symbols
|
|
||||||
node build/azure-pipelines/common/symbols.js "$VSCODE_MIXIN_PASSWORD" "$VSCODE_HOCKEYAPP_TOKEN" "x64" "$VSCODE_HOCKEYAPP_ID_LINUX64"
|
|
||||||
|
|
||||||
# Publish DEB
|
|
||||||
PLATFORM_DEB="linux-deb-x64"
|
|
||||||
DEB_ARCH="amd64"
|
|
||||||
DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)"
|
|
||||||
DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME"
|
|
||||||
|
|
||||||
node build/azure-pipelines/common/createAsset.js "$PLATFORM_DEB" package "$DEB_FILENAME" "$DEB_PATH"
|
|
||||||
|
|
||||||
# Publish RPM
|
|
||||||
PLATFORM_RPM="linux-rpm-x64"
|
|
||||||
RPM_ARCH="x86_64"
|
|
||||||
RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)"
|
|
||||||
RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME"
|
|
||||||
|
|
||||||
node build/azure-pipelines/common/createAsset.js "$PLATFORM_RPM" package "$RPM_FILENAME" "$RPM_PATH"
|
|
||||||
|
|
||||||
# Publish Snap
|
|
||||||
# Pack snap tarball artifact, in order to preserve file perms
|
|
||||||
mkdir -p $REPO/.build/linux/snap-tarball
|
|
||||||
SNAP_TARBALL_PATH="$REPO/.build/linux/snap-tarball/snap-x64.tar.gz"
|
|
||||||
rm -rf $SNAP_TARBALL_PATH
|
|
||||||
(cd .build/linux && tar -czf $SNAP_TARBALL_PATH snap)
|
|
||||||
@@ -1,22 +1,16 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.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.10.1"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
|
||||||
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: |
|
||||||
@@ -31,22 +25,26 @@ steps:
|
|||||||
|
|
||||||
# Define variables
|
# Define variables
|
||||||
REPO="$(pwd)"
|
REPO="$(pwd)"
|
||||||
SNAP_ROOT="$REPO/.build/linux/snap/x64"
|
ARCH="$(VSCODE_ARCH)"
|
||||||
|
SNAP_ROOT="$REPO/.build/linux/snap/$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-$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-$BUILD_VERSION.snap"
|
||||||
|
PACKAGEJSON="$(ls $SNAP_ROOT/code*/usr/share/code*/resources/app/package.json)"
|
||||||
|
VERSION=$(node -p "require(\"$PACKAGEJSON\").version")
|
||||||
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 snapcraft snap --output "$SNAP_PATH")
|
||||||
|
|
||||||
# Publish snap package
|
# Publish snap package
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
AZURE_DOCUMENTDB_MASTERKEY="$(AZURE_DOCUMENTDB_MASTERKEY)" \
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
AZURE_STORAGE_ACCESS_KEY_2="$(AZURE_STORAGE_ACCESS_KEY_2)" \
|
||||||
node build/azure-pipelines/common/createAsset.js "linux-snap-x64" package "$SNAP_FILENAME" "$SNAP_PATH"
|
MOONCAKE_STORAGE_ACCESS_KEY="$(MOONCAKE_STORAGE_ACCESS_KEY)" \
|
||||||
|
node build/azure-pipelines/common/publish.js "$VSCODE_QUALITY" "linux-snap-$ARCH" package "$SNAP_FILENAME" "$VERSION" true "$SNAP_PATH"
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: '10.15.1'
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
|
||||||
inputs:
|
|
||||||
versionSpec: "1.x"
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
|
||||||
KeyVaultName: ado-secrets
|
|
||||||
SecretsFilter: 'github-distro-mixin-password'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
cat << EOF > ~/.netrc
|
|
||||||
machine github.com
|
|
||||||
login azuredatastudio
|
|
||||||
password $(github-distro-mixin-password)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
git config user.email "andresse@microsoft.com"
|
|
||||||
git config user.name "AzureDataStudio"
|
|
||||||
displayName: Prepare tooling
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
||||||
displayName: Install dependencies
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: $(github-distro-mixin-password)
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn postinstall
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp install-sqltoolsservice
|
|
||||||
yarn gulp install-ssmsmin
|
|
||||||
displayName: Install extension binaries
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp vscode-linux-x64-min-ci
|
|
||||||
yarn gulp vscode-reh-linux-x64-min-ci
|
|
||||||
yarn gulp vscode-reh-web-linux-x64-min-ci
|
|
||||||
displayName: Build
|
|
||||||
env:
|
|
||||||
VSCODE_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
service xvfb start
|
|
||||||
displayName: Start xvfb
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp package-rebuild-extensions
|
|
||||||
yarn gulp compile-extensions
|
|
||||||
yarn gulp package-external-extensions
|
|
||||||
displayName: Package External extensions
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
|
||||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
|
||||||
DISPLAY=:10 ./scripts/test-extensions-unit.sh
|
|
||||||
displayName: 'Run Stable Extension Unit Tests'
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
APP_ROOT=$(agent.builddirectory)/azuredatastudio-linux-x64
|
|
||||||
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
|
|
||||||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
|
|
||||||
DISPLAY=:10 ./scripts/test-extensions-unit-unstable.sh
|
|
||||||
displayName: 'Run Unstable Extension Unit Tests'
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_UNSTABLE_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp vscode-linux-x64-build-deb
|
|
||||||
displayName: Build Deb
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp vscode-linux-x64-build-rpm
|
|
||||||
displayName: Build Rpm
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
./build/azure-pipelines/linux/createDrop.sh
|
|
||||||
displayName: Create Drop
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish Artifact: drop'
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: 'Publish Test Results test-results.xml'
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: 'test-results.xml'
|
|
||||||
searchFolder: '$(Build.SourcesDirectory)'
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- task: PublishCodeCoverageResults@1
|
|
||||||
displayName: 'Publish code coverage from $(Build.SourcesDirectory)/.build/coverage/cobertura-coverage.xml'
|
|
||||||
inputs:
|
|
||||||
codeCoverageTool: Cobertura
|
|
||||||
summaryFileLocation: '$(Build.SourcesDirectory)/.build/coverage/cobertura-coverage.xml'
|
|
||||||
reportDirectory: '$(Build.SourcesDirectory)/.build/coverage'
|
|
||||||
continueOnError: true
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
||||||
displayName: 'Component Detection'
|
|
||||||
inputs:
|
|
||||||
failOnAlert: true
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
Param(
|
|
||||||
[string]$sourcesDir,
|
|
||||||
[string]$artifactsDir,
|
|
||||||
[string]$storageKey,
|
|
||||||
[string]$documentDbKey
|
|
||||||
)
|
|
||||||
|
|
||||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey
|
|
||||||
$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey
|
|
||||||
|
|
||||||
$VersionJson = Get-Content -Raw -Path "$artifactsDir\version.json" | ConvertFrom-Json
|
|
||||||
$Version = $VersionJson.version
|
|
||||||
$Quality = $VersionJson.quality
|
|
||||||
$CommitId = $VersionJson.commit
|
|
||||||
$Arch = "x64"
|
|
||||||
|
|
||||||
# Publish tarball
|
|
||||||
$PlatformLinux = "linux-$Arch"
|
|
||||||
$TarballFilename = "azuredatastudio-linux-$Arch.tar.gz"
|
|
||||||
$TarballPath = "$artifactsDir\linux\archive\$TarballFilename"
|
|
||||||
|
|
||||||
node $sourcesDir\build\azure-pipelines\common\publish.js $Quality $PlatformLinux archive-unsigned $TarballFilename $Version true $TarballPath $CommitId
|
|
||||||
|
|
||||||
# Publish DEB
|
|
||||||
$PlatformDeb = "linux-deb-$Arch"
|
|
||||||
$DebFilename = "$(Get-ChildItem -File -Name $artifactsDir\linux\deb\amd64\deb\*.deb)"
|
|
||||||
$DebPath = "$artifactsDir\linux\deb\amd64\deb\$DebFilename"
|
|
||||||
|
|
||||||
node $sourcesDir\build\azure-pipelines\common\publish.js $Quality $PlatformDeb package $DebFilename $Version true $DebPath $CommitId
|
|
||||||
|
|
||||||
# Publish RPM
|
|
||||||
$PlatformRpm = "linux-rpm-$Arch"
|
|
||||||
$RpmFilename = "$(Get-ChildItem -File -Name $artifactsDir\linux\rpm\x86_64\*.rpm)"
|
|
||||||
$RpmPath = "$artifactsDir\linux\rpm\x86_64\$RpmFilename"
|
|
||||||
|
|
||||||
node $sourcesDir\build\azure-pipelines\common\publish.js $Quality $PlatformRpm package $RpmFilename $Version true $RpmPath $CommitId
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
const json = require('gulp-json-editor');
|
|
||||||
const buffer = require('gulp-buffer');
|
|
||||||
const filter = require('gulp-filter');
|
|
||||||
const es = require('event-stream');
|
|
||||||
const vfs = require('vinyl-fs');
|
|
||||||
const fancyLog = require('fancy-log');
|
|
||||||
const ansiColors = require('ansi-colors');
|
|
||||||
|
|
||||||
function main() {
|
|
||||||
const quality = process.env['VSCODE_QUALITY'];
|
|
||||||
|
|
||||||
if (!quality) {
|
|
||||||
console.log('Missing VSCODE_QUALITY, skipping mixin');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const productJsonFilter = filter('**/product.json', { restore: true });
|
|
||||||
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), `Mixing in sources:`);
|
|
||||||
return vfs
|
|
||||||
.src(`quality/${quality}/**`, { base: `quality/${quality}` })
|
|
||||||
.pipe(filter(f => !f.isDirectory()))
|
|
||||||
.pipe(productJsonFilter)
|
|
||||||
.pipe(buffer())
|
|
||||||
.pipe(json(o => Object.assign({}, require('../../product.json'), o)))
|
|
||||||
.pipe(productJsonFilter.restore)
|
|
||||||
.pipe(es.mapSync(function (f) {
|
|
||||||
fancyLog(ansiColors.blue('[mixin]'), f.relative, ansiColors.green('✔︎'));
|
|
||||||
return f;
|
|
||||||
}))
|
|
||||||
.pipe(vfs.dest('.'));
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
||||||
@@ -1,152 +1,65 @@
|
|||||||
resources:
|
resources:
|
||||||
containers:
|
containers:
|
||||||
- container: vscode-x64
|
- container: vscode-x64
|
||||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
|
image: joaomoreno/vscode-linux-build-agent:x64
|
||||||
endpoint: VSCodeHub
|
- container: vscode-ia32
|
||||||
|
image: joaomoreno/vscode-linux-build-agent:ia32
|
||||||
- container: snapcraft
|
- container: snapcraft
|
||||||
image: snapcore/snapcraft:stable
|
image: snapcore/snapcraft
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Compile
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
container: vscode-x64
|
|
||||||
steps:
|
|
||||||
- template: product-compile.yml
|
|
||||||
|
|
||||||
- job: Windows
|
- job: Windows
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_WIN32'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: VS2017-Win2016
|
vmImage: VS2017-Win2016
|
||||||
variables:
|
variables:
|
||||||
VSCODE_ARCH: x64
|
VSCODE_ARCH: x64
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
steps:
|
||||||
- template: win32/product-build-win32.yml
|
- template: win32/product-build-win32.yml
|
||||||
|
|
||||||
- job: Windows32
|
- job: Windows32
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: VS2017-Win2016
|
vmImage: VS2017-Win2016
|
||||||
variables:
|
variables:
|
||||||
VSCODE_ARCH: ia32
|
VSCODE_ARCH: ia32
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
steps:
|
||||||
- template: win32/product-build-win32.yml
|
- template: win32/product-build-win32.yml
|
||||||
|
|
||||||
- job: Linux
|
- job: Linux
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_LINUX'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu-16.04'
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
container: vscode-x64
|
container: vscode-x64
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
steps:
|
||||||
- template: linux/product-build-linux.yml
|
- template: linux/product-build-linux.yml
|
||||||
|
|
||||||
- job: LinuxSnap
|
- job: LinuxSnap
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_LINUX'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu-16.04'
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
container: snapcraft
|
container: snapcraft
|
||||||
dependsOn: Linux
|
dependsOn: Linux
|
||||||
steps:
|
steps:
|
||||||
- template: linux/snap-build-linux.yml
|
- template: linux/snap-build-linux.yml
|
||||||
|
|
||||||
- job: LinuxArmhf
|
- job: Linux32
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_LINUX_32BIT'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu-16.04'
|
vmImage: 'Ubuntu-16.04'
|
||||||
variables:
|
variables:
|
||||||
VSCODE_ARCH: armhf
|
VSCODE_ARCH: ia32
|
||||||
dependsOn:
|
container: vscode-ia32
|
||||||
- Compile
|
|
||||||
steps:
|
steps:
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
- template: linux/product-build-linux.yml
|
||||||
|
|
||||||
- job: LinuxArm64
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: arm64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
|
||||||
|
|
||||||
- job: LinuxAlpine
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: alpine
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
|
||||||
|
|
||||||
- job: LinuxWeb
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WEB'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: web/product-build-web.yml
|
|
||||||
|
|
||||||
- job: macOS
|
- job: macOS
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_MACOS'], 'true'))
|
condition: eq(variables['VSCODE_BUILD_MACOS'], 'true')
|
||||||
pool:
|
pool:
|
||||||
vmImage: macOS 10.13
|
vmImage: macOS 10.13
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
steps:
|
||||||
- template: darwin/product-build-darwin.yml
|
- template: darwin/product-build-darwin.yml
|
||||||
|
|
||||||
- job: Release
|
|
||||||
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'
|
|
||||||
dependsOn:
|
|
||||||
- Windows
|
|
||||||
- Windows32
|
|
||||||
- Linux
|
|
||||||
- LinuxSnap
|
|
||||||
- LinuxArmhf
|
|
||||||
- LinuxArm64
|
|
||||||
- LinuxAlpine
|
|
||||||
- macOS
|
|
||||||
steps:
|
|
||||||
- template: release.yml
|
|
||||||
|
|
||||||
- job: Mooncake
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
condition: and(succeededOrFailed(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
|
||||||
dependsOn:
|
|
||||||
- Windows
|
|
||||||
- Windows32
|
|
||||||
- Linux
|
|
||||||
- LinuxSnap
|
|
||||||
- LinuxArmhf
|
|
||||||
- LinuxArm64
|
|
||||||
- LinuxAlpine
|
|
||||||
- LinuxWeb
|
|
||||||
- macOS
|
|
||||||
steps:
|
|
||||||
- template: sync-mooncake.yml
|
|
||||||
|
|
||||||
trigger: none
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
schedules:
|
|
||||||
- cron: "0 5 * * Mon-Fri"
|
|
||||||
displayName: Mon-Fri at 7:00
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- master
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
dryRun: true
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.13.0"
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
|
||||||
inputs:
|
|
||||||
versionSpec: "1.x"
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
|
||||||
KeyVaultName: vscode
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- 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
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
||||||
displayName: Install dependencies
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn postinstall
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
# Mixin must run before optimize, because the CSS loader will
|
|
||||||
# inline small SVGs
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp hygiene --skip-tslint
|
|
||||||
yarn gulp tslint
|
|
||||||
yarn monaco-compile-check
|
|
||||||
displayName: Run hygiene, tslint and monaco compile checks
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -
|
|
||||||
./build/azure-pipelines/common/extract-telemetry.sh
|
|
||||||
displayName: Extract Telemetry
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
AZURE_WEBVIEW_STORAGE_ACCESS_KEY="$(vscode-webview-storage-key)" \
|
|
||||||
./build/azure-pipelines/common/publish-webview.sh
|
|
||||||
displayName: Publish Webview
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp compile-build
|
|
||||||
yarn gulp compile-extensions-build
|
|
||||||
yarn gulp minify-vscode
|
|
||||||
yarn gulp minify-vscode-reh
|
|
||||||
yarn gulp minify-vscode-reh-web
|
|
||||||
displayName: Compile
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
|
|
||||||
node build/azure-pipelines/upload-sourcemaps
|
|
||||||
displayName: Upload sourcemaps
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VERSION=`node -p "require(\"./package.json\").version"`
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
|
||||||
node build/azure-pipelines/common/createBuild.js $VERSION
|
|
||||||
displayName: Create build
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
node_modules/
|
|
||||||
*.js
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as cp from 'child_process';
|
|
||||||
|
|
||||||
let tag = '';
|
|
||||||
try {
|
|
||||||
tag = cp
|
|
||||||
.execSync('git describe --tags `git rev-list --tags --max-count=1`')
|
|
||||||
.toString()
|
|
||||||
.trim();
|
|
||||||
|
|
||||||
if (!isValidTag(tag)) {
|
|
||||||
throw Error(`Invalid tag ${tag}`);
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err);
|
|
||||||
console.error('Failed to update types');
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function isValidTag(t: string) {
|
|
||||||
if (t.split('.').length !== 3) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const [major, minor, bug] = t.split('.');
|
|
||||||
|
|
||||||
// Only release for tags like 1.34.0
|
|
||||||
if (bug !== '0') {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isNaN(parseInt(major, 10)) || isNaN(parseInt(minor, 10))) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
# Publish @types/vscode for each release
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
branches:
|
|
||||||
include: ['refs/tags/*']
|
|
||||||
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.13.0"
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
|
||||||
inputs:
|
|
||||||
versionSpec: "1.x"
|
|
||||||
|
|
||||||
- bash: |
|
|
||||||
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
|
|
||||||
CHANNEL="G1C14HJ2F"
|
|
||||||
|
|
||||||
if [ "$TAG_VERSION" == "1.999.0" ]; then
|
|
||||||
MESSAGE="<!here>. Someone pushed 1.999.0 tag. Please delete it ASAP from remote and local."
|
|
||||||
|
|
||||||
curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \
|
|
||||||
-H 'Content-type: application/json; charset=utf-8' \
|
|
||||||
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$MESSAGE"'"}' \
|
|
||||||
https://slack.com/api/chat.postMessage
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
displayName: Check 1.999.0 tag
|
|
||||||
|
|
||||||
- bash: |
|
|
||||||
# Install build dependencies
|
|
||||||
(cd build && yarn)
|
|
||||||
node build/azure-pipelines/publish-types/check-version.js
|
|
||||||
displayName: Check version
|
|
||||||
|
|
||||||
- bash: |
|
|
||||||
git config --global user.email "vscode@microsoft.com"
|
|
||||||
git config --global user.name "VSCode"
|
|
||||||
|
|
||||||
git clone https://$(GITHUB_TOKEN)@github.com/DefinitelyTyped/DefinitelyTyped.git --depth=1
|
|
||||||
node build/azure-pipelines/publish-types/update-types.js
|
|
||||||
|
|
||||||
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
|
|
||||||
|
|
||||||
cd DefinitelyTyped
|
|
||||||
|
|
||||||
git diff --color | cat
|
|
||||||
git add -A
|
|
||||||
git status
|
|
||||||
git checkout -b "vscode-types-$TAG_VERSION"
|
|
||||||
git commit -m "VS Code $TAG_VERSION Extension API"
|
|
||||||
git push origin "vscode-types-$TAG_VERSION"
|
|
||||||
|
|
||||||
displayName: Push update to DefinitelyTyped
|
|
||||||
|
|
||||||
- bash: |
|
|
||||||
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
|
|
||||||
CHANNEL="G1C14HJ2F"
|
|
||||||
|
|
||||||
MESSAGE="DefinitelyTyped/DefinitelyTyped#vscode-types-$TAG_VERSION created. Endgame master, please open this link, examine changes and create a PR:"
|
|
||||||
LINK="https://github.com/DefinitelyTyped/DefinitelyTyped/compare/vscode-types-$TAG_VERSION?quick_pull=1&body=Updating%20VS%20Code%20Extension%20API.%20See%20https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode%2Fissues%2F70175%20for%20details."
|
|
||||||
MESSAGE2="[@octref, @jrieken, @kmaetzel, @egamma]. Please review and merge PR to publish @types/vscode."
|
|
||||||
|
|
||||||
curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \
|
|
||||||
-H 'Content-type: application/json; charset=utf-8' \
|
|
||||||
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$MESSAGE"'"}' \
|
|
||||||
https://slack.com/api/chat.postMessage
|
|
||||||
|
|
||||||
curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \
|
|
||||||
-H 'Content-type: application/json; charset=utf-8' \
|
|
||||||
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$LINK"'"}' \
|
|
||||||
https://slack.com/api/chat.postMessage
|
|
||||||
|
|
||||||
curl -X POST -H "Authorization: Bearer $(SLACK_TOKEN)" \
|
|
||||||
-H 'Content-type: application/json; charset=utf-8' \
|
|
||||||
--data '{"channel":"'"$CHANNEL"'", "link_names": true, "text":"'"$MESSAGE2"'"}' \
|
|
||||||
https://slack.com/api/chat.postMessage
|
|
||||||
|
|
||||||
displayName: Send message on Slack
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
import * as fs from 'fs';
|
|
||||||
import * as cp from 'child_process';
|
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
let tag = '';
|
|
||||||
try {
|
|
||||||
tag = cp
|
|
||||||
.execSync('git describe --tags `git rev-list --tags --max-count=1`')
|
|
||||||
.toString()
|
|
||||||
.trim();
|
|
||||||
|
|
||||||
const dtsUri = `https://raw.githubusercontent.com/microsoft/vscode/${tag}/src/vs/vscode.d.ts`;
|
|
||||||
const outPath = path.resolve(process.cwd(), 'DefinitelyTyped/types/vscode/index.d.ts');
|
|
||||||
cp.execSync(`curl ${dtsUri} --output ${outPath}`);
|
|
||||||
|
|
||||||
updateDTSFile(outPath, tag);
|
|
||||||
|
|
||||||
console.log(`Done updating vscode.d.ts at ${outPath}`);
|
|
||||||
} catch (err) {
|
|
||||||
console.error(err);
|
|
||||||
console.error('Failed to update types');
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateDTSFile(outPath: string, tag: string) {
|
|
||||||
const oldContent = fs.readFileSync(outPath, 'utf-8');
|
|
||||||
const newContent = getNewFileContent(oldContent, tag);
|
|
||||||
|
|
||||||
fs.writeFileSync(outPath, newContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getNewFileContent(content: string, tag: string) {
|
|
||||||
const oldheader = [
|
|
||||||
`/*---------------------------------------------------------------------------------------------`,
|
|
||||||
` * Copyright (c) Microsoft Corporation. All rights reserved.`,
|
|
||||||
` * Licensed under the Source EULA. See License.txt in the project root for license information.`,
|
|
||||||
` *--------------------------------------------------------------------------------------------*/`
|
|
||||||
].join('\n');
|
|
||||||
|
|
||||||
return getNewFileHeader(tag) + content.slice(oldheader.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getNewFileHeader(tag: string) {
|
|
||||||
const [major, minor] = tag.split('.');
|
|
||||||
const shorttag = `${major}.${minor}`;
|
|
||||||
|
|
||||||
const header = [
|
|
||||||
`// Type definitions for Visual Studio Code ${shorttag}`,
|
|
||||||
`// Project: https://github.com/microsoft/vscode`,
|
|
||||||
`// Definitions by: Visual Studio Code Team, Microsoft <https://github.com/Microsoft>`,
|
|
||||||
`// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped`,
|
|
||||||
``,
|
|
||||||
`/*---------------------------------------------------------------------------------------------`,
|
|
||||||
` * Copyright (c) Microsoft Corporation. All rights reserved.`,
|
|
||||||
` * Licensed under the Source EULA.`,
|
|
||||||
` * See https://github.com/Microsoft/vscode/blob/master/LICENSE.txt for license information.`,
|
|
||||||
` *--------------------------------------------------------------------------------------------*/`,
|
|
||||||
``,
|
|
||||||
`/**`,
|
|
||||||
` * Type Definition for Visual Studio Code ${shorttag} Extension API`,
|
|
||||||
` * See https://code.visualstudio.com/api for more information`,
|
|
||||||
` */`
|
|
||||||
].join('\n');
|
|
||||||
|
|
||||||
return header;
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "10.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
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
|
|
||||||
(cd build ; yarn)
|
|
||||||
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
|
||||||
node build/azure-pipelines/common/releaseBuild.js
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
resources:
|
|
||||||
containers:
|
|
||||||
- container: linux-x64
|
|
||||||
image: sqltoolscontainers.azurecr.io/linux-build-agent:1
|
|
||||||
endpoint: ContainerRegistry
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: Compile
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
container: linux-x64
|
|
||||||
steps:
|
|
||||||
- template: sql-product-compile.yml
|
|
||||||
|
|
||||||
- job: macOS
|
|
||||||
condition: eq(variables['VSCODE_BUILD_MACOS'], 'true')
|
|
||||||
pool:
|
|
||||||
vmImage: macOS 10.13
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: darwin/sql-product-build-darwin.yml
|
|
||||||
|
|
||||||
- job: Linux
|
|
||||||
condition: eq(variables['VSCODE_BUILD_LINUX'], 'true')
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
container: linux-x64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: linux/sql-product-build-linux.yml
|
|
||||||
|
|
||||||
- job: Windows
|
|
||||||
condition: eq(variables['VSCODE_BUILD_WIN32'], 'true')
|
|
||||||
pool:
|
|
||||||
vmImage: VS2017-Win2016
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: win32/sql-product-build-win32.yml
|
|
||||||
|
|
||||||
- job: Windows_Test
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
|
||||||
pool:
|
|
||||||
name: mssqltools
|
|
||||||
dependsOn:
|
|
||||||
- Linux
|
|
||||||
- Windows
|
|
||||||
steps:
|
|
||||||
- template: win32/sql-product-test-win32.yml
|
|
||||||
|
|
||||||
- job: Release
|
|
||||||
condition: and(succeeded(), or(eq(variables['VSCODE_RELEASE'], 'true'), and(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['Build.Reason'], 'Schedule'))))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
dependsOn:
|
|
||||||
- macOS
|
|
||||||
- Linux
|
|
||||||
- Windows
|
|
||||||
- Windows_Test
|
|
||||||
steps:
|
|
||||||
- template: sql-release.yml
|
|
||||||
|
|
||||||
trigger: none
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
schedules:
|
|
||||||
- cron: "0 5 * * Mon-Fri"
|
|
||||||
displayName: Mon-Fri at 7:00
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- master
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "10.15.1"
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
|
||||||
inputs:
|
|
||||||
versionSpec: "1.x"
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
|
||||||
KeyVaultName: ado-secrets
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
cat << EOF > ~/.netrc
|
|
||||||
machine github.com
|
|
||||||
login azuredatastudio
|
|
||||||
password $(github-distro-mixin-password)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
git config user.email "andresse@microsoft.com"
|
|
||||||
git config user.name "AzureDataStudio"
|
|
||||||
displayName: Prepare tooling
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
||||||
displayName: Install dependencies
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn postinstall
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
# Mixin must run before optimize, because the CSS loader will
|
|
||||||
# inline small SVGs
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp hygiene --skip-tslint
|
|
||||||
yarn gulp tslint
|
|
||||||
displayName: Run hygiene, tslint
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
yarn gulp compile-build
|
|
||||||
yarn gulp compile-extensions-build
|
|
||||||
yarn gulp minify-vscode
|
|
||||||
yarn gulp minify-vscode-reh
|
|
||||||
yarn gulp minify-vscode-reh-web
|
|
||||||
displayName: Compile
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
echo "##vso[build.addbuildtag]Release"
|
|
||||||
displayName: Set For Release
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.13.0"
|
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
|
|
||||||
(cd build ; yarn)
|
|
||||||
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
|
||||||
MOONCAKE_STORAGE_ACCESS_KEY="$(vscode-mooncake-storage-key)" \
|
|
||||||
node build/azure-pipelines/common/sync-mooncake.js "$VSCODE_QUALITY"
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
const path = require('path');
|
|
||||||
const es = require('event-stream');
|
|
||||||
const azure = require('gulp-azure-storage');
|
|
||||||
const vfs = require('vinyl-fs');
|
|
||||||
const util = require('../lib/util');
|
|
||||||
const root = path.dirname(path.dirname(__dirname));
|
|
||||||
const commit = util.getVersion(root);
|
|
||||||
|
|
||||||
// optionally allow to pass in explicit base/maps to upload
|
|
||||||
const [, , base, maps] = process.argv;
|
|
||||||
|
|
||||||
const fetch = function (base, maps = `${base}/**/*.map`) {
|
|
||||||
return vfs.src(maps, { base })
|
|
||||||
.pipe(es.mapSync(f => {
|
|
||||||
f.path = `${f.base}/core/${f.relative}`;
|
|
||||||
return f;
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
function main() {
|
|
||||||
const sources = [];
|
|
||||||
|
|
||||||
// vscode client maps (default)
|
|
||||||
if (!base) {
|
|
||||||
const vs = fetch('out-vscode-min'); // client source-maps only
|
|
||||||
sources.push(vs);
|
|
||||||
|
|
||||||
const extensionsOut = vfs.src(['.build/extensions/**/*.js.map', '!**/node_modules/**'], { base: '.build' });
|
|
||||||
sources.push(extensionsOut);
|
|
||||||
}
|
|
||||||
|
|
||||||
// specific client base/maps
|
|
||||||
else {
|
|
||||||
sources.push(fetch(base, maps));
|
|
||||||
}
|
|
||||||
|
|
||||||
return es.merge(...sources)
|
|
||||||
.pipe(es.through(function (data) {
|
|
||||||
console.log('Uploading Sourcemap', data.relative); // debug
|
|
||||||
this.emit('data', data);
|
|
||||||
}))
|
|
||||||
.pipe(azure.upload({
|
|
||||||
account: process.env.AZURE_STORAGE_ACCOUNT,
|
|
||||||
key: process.env.AZURE_STORAGE_ACCESS_KEY,
|
|
||||||
container: 'sourcemaps',
|
|
||||||
prefix: commit + '/'
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
main();
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
steps:
|
|
||||||
- script: |
|
|
||||||
mkdir -p .build
|
|
||||||
echo -n $BUILD_SOURCEVERSION > .build/commit
|
|
||||||
echo -n $VSCODE_QUALITY > .build/quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "12.13.0"
|
|
||||||
|
|
||||||
- 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
|
|
||||||
|
|
||||||
- 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 remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
# inputs:
|
|
||||||
# keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
# vstsFeed: 'npm-vscode'
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile
|
|
||||||
displayName: Install dependencies
|
|
||||||
# condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
# inputs:
|
|
||||||
# keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
# vstsFeed: 'npm-vscode'
|
|
||||||
# condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
# - script: |
|
|
||||||
# set -e
|
|
||||||
# yarn postinstall
|
|
||||||
# displayName: Run postinstall scripts
|
|
||||||
# condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
node build/azure-pipelines/mixin
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
yarn gulp vscode-web-min-ci
|
|
||||||
displayName: Build
|
|
||||||
|
|
||||||
# upload only the workbench.web.api.js source maps because
|
|
||||||
# we just compiled these bits in the previous step and the
|
|
||||||
# general task to upload source maps has already been run
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \
|
|
||||||
node build/azure-pipelines/upload-sourcemaps out-vscode-web-min out-vscode-web-min/vs/workbench/workbench.web.api.js.map
|
|
||||||
displayName: Upload sourcemaps (Web)
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
AZURE_DOCUMENTDB_MASTERKEY="$(builds-docdb-key-readwrite)" \
|
|
||||||
AZURE_STORAGE_ACCESS_KEY_2="$(vscode-storage-key)" \
|
|
||||||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
|
|
||||||
./build/azure-pipelines/web/publish.sh
|
|
||||||
displayName: Publish
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
REPO="$(pwd)"
|
|
||||||
ROOT="$REPO/.."
|
|
||||||
|
|
||||||
# Publish Web Client
|
|
||||||
WEB_BUILD_NAME="vscode-web"
|
|
||||||
WEB_TARBALL_FILENAME="vscode-web.tar.gz"
|
|
||||||
WEB_TARBALL_PATH="$ROOT/$WEB_TARBALL_FILENAME"
|
|
||||||
|
|
||||||
rm -rf $ROOT/vscode-web.tar.*
|
|
||||||
|
|
||||||
(cd $ROOT && tar --owner=0 --group=0 -czf $WEB_TARBALL_PATH $WEB_BUILD_NAME)
|
|
||||||
|
|
||||||
node build/azure-pipelines/common/createAsset.js web-standalone archive-unsigned "$WEB_TARBALL_FILENAME" "$WEB_TARBALL_PATH"
|
|
||||||
@@ -1,60 +1,51 @@
|
|||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.1"
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3 # {{SQL CARBON EDIT}} update version
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "1.x"
|
versionSpec: "1.10.1"
|
||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '2.x'
|
versionSpec: '2.x'
|
||||||
addToPath: true
|
addToPath: true
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
# - task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
||||||
inputs:
|
# inputs:
|
||||||
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
||||||
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
|
# vstsFeed: '$(ArtifactFeed)'
|
||||||
|
# condition: eq(variables['System.PullRequest.PullRequestId'], '')
|
||||||
- powershell: |
|
- powershell: |
|
||||||
yarn --frozen-lockfile
|
yarn
|
||||||
env:
|
|
||||||
CHILD_CONCURRENCY: "1"
|
|
||||||
displayName: Install Dependencies
|
displayName: Install Dependencies
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
# condition: or(ne(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
# - task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
||||||
inputs:
|
# inputs:
|
||||||
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
# keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
# targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
||||||
vstsFeed: 'npm-cache' # {{SQL CARBON EDIT}} update build cache
|
# vstsFeed: '$(ArtifactFeed)'
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
# condition: and(succeeded(), eq(variables['System.PullRequest.PullRequestId'], ''), ne(variables['CacheRestored'], 'true'))
|
||||||
- powershell: |
|
- powershell: |
|
||||||
yarn electron
|
yarn gulp electron
|
||||||
- script: |
|
displayName: Download Electron
|
||||||
yarn gulp hygiene --skip-tslint
|
- powershell: |
|
||||||
|
yarn gulp hygiene
|
||||||
displayName: Run Hygiene Checks
|
displayName: Run Hygiene Checks
|
||||||
- script: |
|
- powershell: |
|
||||||
yarn gulp tslint
|
yarn monaco-compile-check
|
||||||
displayName: Run TSLint Checks
|
displayName: Run Monaco Editor Checks
|
||||||
- script: | # {{SQL CARBON EDIT}} add step
|
|
||||||
yarn tslint
|
|
||||||
displayName: Run TSLint (gci)
|
|
||||||
- script: | # {{SQL CARBON EDIT}} add step
|
|
||||||
yarn strict-null-check
|
|
||||||
displayName: Run Strict Null Check
|
|
||||||
# - powershell: | {{SQL CARBON EDIT}} remove step
|
|
||||||
# yarn monaco-compile-check
|
|
||||||
# displayName: Run Monaco Editor Checks
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
yarn compile
|
yarn compile
|
||||||
displayName: Compile Sources
|
displayName: Compile Sources
|
||||||
# - powershell: | {{SQL CARBON EDIT}} remove step
|
- powershell: |
|
||||||
# yarn download-builtin-extensions
|
yarn download-builtin-extensions
|
||||||
# displayName: Download Built-in Extensions
|
displayName: Download Built-in Extensions
|
||||||
- powershell: |
|
- powershell: |
|
||||||
.\scripts\test.bat --tfs "Unit Tests"
|
.\scripts\test.bat --tfs "Unit Tests"
|
||||||
displayName: Run Unit Tests
|
displayName: Run Unit Tests
|
||||||
# - powershell: | {{SQL CARBON EDIT}} remove step
|
- powershell: |
|
||||||
# .\scripts\test-integration.bat --tfs "Integration Tests"
|
.\scripts\test-integration.bat --tfs "Integration Tests"
|
||||||
# displayName: Run Integration Tests
|
displayName: Run Integration Tests
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
displayName: Publish Tests Results
|
displayName: Publish Tests Results
|
||||||
inputs:
|
inputs:
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
|
|
||||||
$Arch = "x64"
|
|
||||||
|
|
||||||
$Repo = "$(pwd)"
|
|
||||||
$Root = "$Repo\.."
|
|
||||||
$LegacyServer = "$Root\azuredatastudio-reh-win32-$Arch"
|
|
||||||
$ServerName = "azuredatastudio-server-win32-$Arch"
|
|
||||||
$Server = "$Root\$ServerName"
|
|
||||||
$ServerZipLocation = "$Repo\.build\win32-$Arch\server"
|
|
||||||
$ServerZip = "$ServerZipLocation\azuredatastudio-server-win32-$Arch.zip"
|
|
||||||
|
|
||||||
# Create server archive
|
|
||||||
New-Item $ServerZipLocation -ItemType Directory # this will throw even when success for we don't want to exec this
|
|
||||||
$global:LASTEXITCODE = 0
|
|
||||||
exec { Rename-Item -Path $LegacyServer -NewName $ServerName } "Rename Item"
|
|
||||||
exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $ServerZip $Server -r } "Zip Server"
|
|
||||||
|
|
||||||
exec { node build/azure-pipelines/common/copyArtifacts.js } "Copy Artifacts"
|
|
||||||
@@ -1,134 +1,51 @@
|
|||||||
steps:
|
steps:
|
||||||
- powershell: |
|
|
||||||
mkdir .build -ea 0
|
|
||||||
"$env:BUILD_SOURCEVERSION" | Out-File -Encoding ascii -NoNewLine .build\commit
|
|
||||||
"$env:VSCODE_QUALITY" | Out-File -Encoding ascii -NoNewLine .build\quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "10.15.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.10.1"
|
||||||
|
|
||||||
- task: UsePythonVersion@0
|
- task: UsePythonVersion@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: '2.x'
|
versionSpec: '2.x'
|
||||||
addToPath: true
|
addToPath: true
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'vscode-builds-subscription'
|
|
||||||
KeyVaultName: vscode
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
"machine github.com`nlogin vscode`npassword $(github-distro-mixin-password)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
|
|
||||||
|
|
||||||
exec { git config user.email "vscode@microsoft.com" }
|
|
||||||
exec { git config user.name "VSCode" }
|
|
||||||
|
|
||||||
mkdir .build -ea 0
|
|
||||||
"$(VSCODE_ARCH)" | Out-File -Encoding ascii -NoNewLine .build\arch
|
|
||||||
displayName: Prepare tooling
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git" }
|
|
||||||
exec { git fetch distro }
|
|
||||||
exec { git merge $(node -p "require('./package.json').distro") }
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/arch, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
"machine monacotools.visualstudio.com`npassword $(VSO_PAT)`nmachine github.com`nlogin vscode`npassword $(VSCODE_MIXIN_PASSWORD)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
|
||||||
$env:npm_config_arch="$(VSCODE_ARCH)"
|
$env:npm_config_arch="$(VSCODE_ARCH)"
|
||||||
$env:CHILD_CONCURRENCY="1"
|
$env:CHILD_CONCURRENCY="1"
|
||||||
exec { yarn --frozen-lockfile }
|
$env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
|
||||||
displayName: Install dependencies
|
exec { yarn }
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
exec { npm run gulp -- mixin }
|
||||||
|
exec { npm run gulp -- hygiene }
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
exec { npm run monaco-compile-check }
|
||||||
inputs:
|
exec { node build/azure-pipelines/common/installDistro.js }
|
||||||
keyfile: 'build/.cachesalt, .build/arch, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
|
exec { node build/lib/builtInExtensions.js }
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
|
|
||||||
vstsFeed: 'npm-vscode'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
exec { yarn postinstall }
|
$env:VSCODE_MIXIN_PASSWORD="$(VSCODE_MIXIN_PASSWORD)"
|
||||||
displayName: Run postinstall scripts
|
exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-min" }
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-inno-updater" }
|
||||||
|
name: build
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
exec { node build/azure-pipelines/mixin }
|
exec { npm run gulp -- "electron-$(VSCODE_ARCH)" }
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
|
|
||||||
exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-min-ci" }
|
|
||||||
exec { yarn gulp "vscode-reh-win32-$env:VSCODE_ARCH-min-ci" }
|
|
||||||
exec { yarn gulp "vscode-reh-web-win32-$env:VSCODE_ARCH-min-ci" }
|
|
||||||
exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-code-helper" }
|
|
||||||
exec { yarn gulp "vscode-win32-$env:VSCODE_ARCH-inno-updater" }
|
|
||||||
displayName: Build
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { yarn electron $(VSCODE_ARCH) }
|
|
||||||
exec { .\scripts\test.bat --build --tfs "Unit Tests" }
|
exec { .\scripts\test.bat --build --tfs "Unit Tests" }
|
||||||
displayName: Run unit tests
|
# yarn smoketest -- --build "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
name: test
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
# Figure out the full absolute path of the product we just built
|
|
||||||
# including the remote server and configure the integration tests
|
|
||||||
# to run with these builds instead of running out of sources.
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
|
||||||
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
|
|
||||||
$AppNameShort = $AppProductJson.nameShort
|
|
||||||
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\scripts\test-integration.bat --build --tfs "Integration Tests" }
|
|
||||||
displayName: Run integration tests
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- 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: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH),$(agent.builddirectory)/vscode-reh-win32-$(VSCODE_ARCH)'
|
FolderPath: '$(agent.builddirectory)/VSCode-win32-$(VSCODE_ARCH)'
|
||||||
Pattern: '*.dll,*.exe,*.node'
|
Pattern: '*.dll,*.exe,*.node'
|
||||||
signConfigType: inlineSignParams
|
signConfigType: inlineSignParams
|
||||||
inlineOperation: |
|
inlineOperation: |
|
||||||
@@ -196,18 +113,38 @@ steps:
|
|||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
.\build\azure-pipelines\win32\import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(esrp-auth-certificate) -AuthCertificateKey $(esrp-auth-certificate-key)
|
.\build\azure-pipelines\win32\import-esrp-auth-cert.ps1 -AuthCertificateBase64 $(ESRP_AUTH_CERTIFICATE) -AuthCertificateKey $(ESRP_AUTH_CERTIFICATE_KEY)
|
||||||
displayName: Import ESRP Auth Certificate
|
displayName: Import ESRP Auth Certificate
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = "$(vscode-storage-key)"
|
exec { npm run gulp -- "vscode-win32-$(VSCODE_ARCH)-archive" "vscode-win32-$(VSCODE_ARCH)-system-setup" "vscode-win32-$(VSCODE_ARCH)-user-setup" --sign }
|
||||||
$env:AZURE_DOCUMENTDB_MASTERKEY = "$(builds-docdb-key-readwrite)"
|
|
||||||
$env:VSCODE_HOCKEYAPP_TOKEN = "$(vscode-hockeyapp-token)"
|
$Repo = "$(pwd)"
|
||||||
$env:VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)"
|
$Root = "$Repo\.."
|
||||||
.\build\azure-pipelines\win32\publish.ps1
|
$SystemExe = "$Repo\.build\win32-$(VSCODE_ARCH)\system-setup\VSCodeSetup.exe"
|
||||||
displayName: Publish
|
$UserExe = "$Repo\.build\win32-$(VSCODE_ARCH)\user-setup\VSCodeSetup.exe"
|
||||||
|
$Zip = "$Repo\.build\win32-$(VSCODE_ARCH)\archive\VSCode-win32-$(VSCODE_ARCH).zip"
|
||||||
|
$Build = "$Root\VSCode-win32-$(VSCODE_ARCH)"
|
||||||
|
|
||||||
|
# get version
|
||||||
|
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
|
||||||
|
$Version = $PackageJson.version
|
||||||
|
$Quality = "$env:VSCODE_QUALITY"
|
||||||
|
$env:AZURE_STORAGE_ACCESS_KEY_2 = "$(AZURE_STORAGE_ACCESS_KEY_2)"
|
||||||
|
$env:MOONCAKE_STORAGE_ACCESS_KEY = "$(MOONCAKE_STORAGE_ACCESS_KEY)"
|
||||||
|
$env:AZURE_DOCUMENTDB_MASTERKEY = "$(AZURE_DOCUMENTDB_MASTERKEY)"
|
||||||
|
|
||||||
|
$assetPlatform = if ("$(VSCODE_ARCH)" -eq "ia32") { "win32" } else { "win32-x64" }
|
||||||
|
|
||||||
|
exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$(VSCODE_ARCH)-$Version.zip" $Version true $Zip }
|
||||||
|
exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $SystemExe }
|
||||||
|
exec { node build/azure-pipelines/common/publish.js $Quality "$global:assetPlatform-user" setup "VSCodeUserSetup-$(VSCODE_ARCH)-$Version.exe" $Version true $UserExe }
|
||||||
|
|
||||||
|
# publish hockeyapp symbols
|
||||||
|
$hockeyAppId = if ("$(VSCODE_ARCH)" -eq "ia32") { "$(VSCODE_HOCKEYAPP_ID_WIN32)" } else { "$(VSCODE_HOCKEYAPP_ID_WIN64)" }
|
||||||
|
exec { node build/azure-pipelines/common/symbols.js "$(VSCODE_MIXIN_PASSWORD)" "$(VSCODE_HOCKEYAPP_TOKEN)" "$(VSCODE_ARCH)" $hockeyAppId }
|
||||||
|
|
||||||
- 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'
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
|
|
||||||
$Arch = "$env:VSCODE_ARCH"
|
|
||||||
|
|
||||||
exec { yarn gulp "vscode-win32-$Arch-archive" "vscode-win32-$Arch-system-setup" "vscode-win32-$Arch-user-setup" --sign }
|
|
||||||
|
|
||||||
$Repo = "$(pwd)"
|
|
||||||
$Root = "$Repo\.."
|
|
||||||
$SystemExe = "$Repo\.build\win32-$Arch\system-setup\VSCodeSetup.exe"
|
|
||||||
$UserExe = "$Repo\.build\win32-$Arch\user-setup\VSCodeSetup.exe"
|
|
||||||
$Zip = "$Repo\.build\win32-$Arch\archive\VSCode-win32-$Arch.zip"
|
|
||||||
$LegacyServer = "$Root\vscode-reh-win32-$Arch"
|
|
||||||
$ServerName = "vscode-server-win32-$Arch"
|
|
||||||
$Server = "$Root\$ServerName"
|
|
||||||
$ServerZip = "$Repo\.build\vscode-server-win32-$Arch.zip"
|
|
||||||
$Build = "$Root\VSCode-win32-$Arch"
|
|
||||||
|
|
||||||
# Create server archive
|
|
||||||
exec { Rename-Item -Path $LegacyServer -NewName $ServerName }
|
|
||||||
exec { .\node_modules\7zip\7zip-lite\7z.exe a -tzip $ServerZip $Server -r }
|
|
||||||
|
|
||||||
# get version
|
|
||||||
$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json
|
|
||||||
$Version = $PackageJson.version
|
|
||||||
|
|
||||||
$AssetPlatform = if ("$Arch" -eq "ia32") { "win32" } else { "win32-x64" }
|
|
||||||
|
|
||||||
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-archive" archive "VSCode-win32-$Arch-$Version.zip" $Zip }
|
|
||||||
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform" setup "VSCodeSetup-$Arch-$Version.exe" $SystemExe }
|
|
||||||
exec { node build/azure-pipelines/common/createAsset.js "$AssetPlatform-user" setup "VSCodeUserSetup-$Arch-$Version.exe" $UserExe }
|
|
||||||
exec { node build/azure-pipelines/common/createAsset.js "server-$AssetPlatform" archive "vscode-server-win32-$Arch.zip" $ServerZip }
|
|
||||||
|
|
||||||
# publish hockeyapp symbols
|
|
||||||
$hockeyAppId = if ("$Arch" -eq "ia32") { "$env:VSCODE_HOCKEYAPP_ID_WIN32" } else { "$env:VSCODE_HOCKEYAPP_ID_WIN64" }
|
|
||||||
exec { node build/azure-pipelines/common/symbols.js "$env:VSCODE_MIXIN_PASSWORD" "$env:VSCODE_HOCKEYAPP_TOKEN" "$Arch" $hockeyAppId }
|
|
||||||
@@ -1,280 +0,0 @@
|
|||||||
steps:
|
|
||||||
- powershell: |
|
|
||||||
mkdir .build -ea 0
|
|
||||||
"$env:BUILD_SOURCEVERSION" | Out-File -Encoding ascii -NoNewLine .build\commit
|
|
||||||
"$env:VSCODE_QUALITY" | Out-File -Encoding ascii -NoNewLine .build\quality
|
|
||||||
displayName: Prepare cache flag
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .build/commit, .build/quality'
|
|
||||||
targetfolder: '.build, out-build, out-vscode-min, out-vscode-reh-min, out-vscode-reh-web-min'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
platformIndependent: true
|
|
||||||
alias: 'Compilation'
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exit 1
|
|
||||||
displayName: Check RestoreCache
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored-Compilation'], 'true'))
|
|
||||||
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "10.15.1"
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
|
||||||
inputs:
|
|
||||||
versionSpec: "1.x"
|
|
||||||
|
|
||||||
- task: UsePythonVersion@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: '2.x'
|
|
||||||
addToPath: true
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
|
||||||
KeyVaultName: ado-secrets
|
|
||||||
SecretsFilter: 'github-distro-mixin-password'
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
"machine github.com`nlogin azuredatastudio`npassword $(github-distro-mixin-password)" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII
|
|
||||||
|
|
||||||
exec { git config user.email "andresse@microsoft.com" }
|
|
||||||
exec { git config user.name "AzureDataStudio" }
|
|
||||||
displayName: Prepare tooling
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
git remote add distro "https://github.com/$(VSCODE_MIXIN_REPO).git"
|
|
||||||
git fetch distro
|
|
||||||
git merge $(node -p "require('./package.json').distro")
|
|
||||||
displayName: Merge distro
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$env:CHILD_CONCURRENCY="1"
|
|
||||||
exec { yarn --frozen-lockfile }
|
|
||||||
displayName: Install dependencies
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: $(github-distro-mixin-password)
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
|
|
||||||
inputs:
|
|
||||||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
|
|
||||||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules, !samples/**/node_modules'
|
|
||||||
vstsFeed: 'BuildCache'
|
|
||||||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { yarn postinstall }
|
|
||||||
displayName: Run postinstall scripts
|
|
||||||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true'))
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { node build/azure-pipelines/mixin }
|
|
||||||
displayName: Mix in quality
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { yarn gulp "install-sqltoolsservice" }
|
|
||||||
displayName: Install sqltoolsservice
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { yarn gulp "package-rebuild-extensions" }
|
|
||||||
exec { yarn gulp "vscode-win32-x64-min-ci" }
|
|
||||||
exec { yarn gulp "vscode-reh-win32-x64-min-ci" }
|
|
||||||
exec { yarn gulp "vscode-reh-web-win32-x64-min-ci" }
|
|
||||||
displayName: Build
|
|
||||||
env:
|
|
||||||
VSCODE_MIXIN_PASSWORD: $(github-distro-mixin-password)
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { .\scripts\test-unstable.bat --build --coverage --reporter mocha-junit-reporter }
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_UNSTABLE_TESTS'], 'true'))
|
|
||||||
displayName: Run unstable tests
|
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
|
||||||
displayName: 'Sign out code'
|
|
||||||
inputs:
|
|
||||||
ConnectedServiceName: 'Code Signing'
|
|
||||||
FolderPath: '$(agent.builddirectory)/azuredatastudio-win32-x64'
|
|
||||||
Pattern: '*.exe,*.node,resources/app/node_modules.asar.unpacked/*.dll,swiftshader/*.dll,d3dcompiler_47.dll,libGLESv2.dll,ffmpeg.dll,libEGL.dll,Microsoft.SqlTools.Hosting.dll,Microsoft.SqlTools.ResourceProvider.Core.dll,Microsoft.SqlTools.ResourceProvider.DefaultImpl.dll,MicrosoftSqlToolsCredentials.dll,MicrosoftSqlToolsServiceLayer.dll,Newtonsoft.Json.dll,SqlSerializationService.dll,SqlToolsResourceProviderService.dll,Microsoft.SqlServer.*.dll,Microsoft.Data.Tools.Sql.BatchParser.dll'
|
|
||||||
signConfigType: inlineSignParams
|
|
||||||
inlineOperation: |
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"keyCode": "CP-230012",
|
|
||||||
"operationSetCode": "SigntoolSign",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"parameterName": "OpusName",
|
|
||||||
"parameterValue": "Azure Data Studio"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "OpusInfo",
|
|
||||||
"parameterValue": "https://github.com/microsoft/azuredatastudio"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "PageHash",
|
|
||||||
"parameterValue": "/NPH"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "FileDigest",
|
|
||||||
"parameterValue": "/fd sha256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "TimeStamp",
|
|
||||||
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"toolName": "signtool.exe",
|
|
||||||
"toolVersion": "6.2.9304.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keyCode": "CP-230012",
|
|
||||||
"operationSetCode": "SigntoolVerify",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"parameterName": "VerifyAll",
|
|
||||||
"parameterValue": "/all"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"toolName": "signtool.exe",
|
|
||||||
"toolVersion": "6.2.9304.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
SessionTimeout: 600
|
|
||||||
MaxConcurrency: 5
|
|
||||||
MaxRetryAttempts: 20
|
|
||||||
condition: and(succeeded(), eq(variables['signed'], true))
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { yarn gulp "vscode-win32-x64-user-setup" }
|
|
||||||
exec { yarn gulp "vscode-win32-x64-system-setup" }
|
|
||||||
exec { yarn gulp "vscode-win32-x64-archive" }
|
|
||||||
displayName: Archive & User & System setup
|
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
|
||||||
displayName: 'Sign installers'
|
|
||||||
inputs:
|
|
||||||
ConnectedServiceName: 'Code Signing'
|
|
||||||
FolderPath: '.build'
|
|
||||||
Pattern: '*.exe'
|
|
||||||
signConfigType: inlineSignParams
|
|
||||||
inlineOperation: |
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"keyCode": "CP-230012",
|
|
||||||
"operationSetCode": "SigntoolSign",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"parameterName": "OpusName",
|
|
||||||
"parameterValue": "Azure Data Studio"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "OpusInfo",
|
|
||||||
"parameterValue": "https://github.com/microsoft/azuredatastudio"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "PageHash",
|
|
||||||
"parameterValue": "/NPH"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "FileDigest",
|
|
||||||
"parameterValue": "/fd sha256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"parameterName": "TimeStamp",
|
|
||||||
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"toolName": "signtool.exe",
|
|
||||||
"toolVersion": "6.2.9304.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"keyCode": "CP-230012",
|
|
||||||
"operationSetCode": "SigntoolVerify",
|
|
||||||
"parameters": [
|
|
||||||
{
|
|
||||||
"parameterName": "VerifyAll",
|
|
||||||
"parameterValue": "/all"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"toolName": "signtool.exe",
|
|
||||||
"toolVersion": "6.2.9304.0"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
SessionTimeout: 600
|
|
||||||
MaxConcurrency: 5
|
|
||||||
MaxRetryAttempts: 20
|
|
||||||
condition: and(succeeded(), eq(variables['signed'], true))
|
|
||||||
|
|
||||||
- task: ArchiveFiles@2
|
|
||||||
displayName: 'Archive build scripts source'
|
|
||||||
inputs:
|
|
||||||
rootFolderOrFile: '$(Build.SourcesDirectory)/build'
|
|
||||||
archiveType: tar
|
|
||||||
archiveFile: '$(Build.BinariesDirectory)/source.tar.gz'
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish Artifact: build scripts source'
|
|
||||||
inputs:
|
|
||||||
PathtoPublish: '$(Build.BinariesDirectory)/source.tar.gz'
|
|
||||||
ArtifactName: source
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
.\build\azure-pipelines\win32\createDrop.ps1
|
|
||||||
displayName: Create Drop
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: 'Publish Artifact: drop'
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: 'Publish Test Results test-results.xml'
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: 'test-results.xml'
|
|
||||||
searchFolder: '$(Build.SourcesDirectory)'
|
|
||||||
failTaskOnFailedTests: true
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
|
||||||
displayName: 'Publish Integration and Smoke Test Results'
|
|
||||||
inputs:
|
|
||||||
testResultsFiles: '*.xml'
|
|
||||||
searchFolder: '$(Build.ArtifactStagingDirectory)\test-results'
|
|
||||||
mergeTestResults: true
|
|
||||||
failTaskOnFailedTests: true
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
|
|
||||||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
||||||
displayName: 'Component Detection'
|
|
||||||
inputs:
|
|
||||||
failOnAlert: true
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "10.15.1"
|
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
|
|
||||||
inputs:
|
|
||||||
versionSpec: "1.x"
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$env:CHILD_CONCURRENCY="1"
|
|
||||||
exec { git clean -fxd }
|
|
||||||
displayName: Clean repo
|
|
||||||
|
|
||||||
- task: DownloadPipelineArtifact@2
|
|
||||||
inputs:
|
|
||||||
buildType: 'current'
|
|
||||||
targetPath: '$(Build.SourcesDirectory)\.build'
|
|
||||||
artifactName: drop
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$env:CHILD_CONCURRENCY="1"
|
|
||||||
exec { yarn --frozen-lockfile }
|
|
||||||
displayName: Install dependencies
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
exec { .\node_modules\7zip\7zip-lite\7z.exe x $(Build.SourcesDirectory)\.build\win32-x64/archive/azuredatastudio-win32-x64.zip -o$(Agent.TempDirectory)\azuredatastudio-win32-x64 }
|
|
||||||
displayName: Unzip artifact
|
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
|
||||||
displayName: 'Azure Key Vault: SqlToolsSecretStore'
|
|
||||||
inputs:
|
|
||||||
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
|
|
||||||
KeyVaultName: SqlToolsSecretStore
|
|
||||||
SecretsFilter: 'ads-integration-test-azure-server,ads-integration-test-azure-server-password,ads-integration-test-azure-server-username,ads-integration-test-bdc-server,ads-integration-test-bdc-server-password,ads-integration-test-bdc-server-username,ads-integration-test-standalone-server,ads-integration-test-standalone-server-password,ads-integration-test-standalone-server-username'
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$AppRoot = "$(Agent.TempDirectory)\azuredatastudio-win32-x64"
|
|
||||||
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
|
|
||||||
$AppNameShort = $AppProductJson.nameShort
|
|
||||||
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:INTEGRATION_TEST_CLI_PATH = "$AppRoot\bin\$AppNameShort"; .\scripts\sql-test-integration.bat }
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
displayName: Run stable tests
|
|
||||||
env:
|
|
||||||
BDC_BACKEND_USERNAME: $(ads-integration-test-bdc-server-username)
|
|
||||||
BDC_BACKEND_PWD: $(ads-integration-test-bdc-server-password)
|
|
||||||
BDC_BACKEND_HOSTNAME: $(ads-integration-test-bdc-server)
|
|
||||||
STANDALONE_SQL_USERNAME: $(ads-integration-test-standalone-server-username)
|
|
||||||
STANDALONE_SQL_PWD: $(ads-integration-test-standalone-server-password)
|
|
||||||
STANDALONE_SQL: $(ads-integration-test-standalone-server)
|
|
||||||
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
|
||||||
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
|
||||||
AZURE_SQL: $(ads-integration-test-azure-server)
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$AppRoot = "$(Agent.TempDirectory)\azuredatastudio-win32-x64"
|
|
||||||
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
|
|
||||||
$AppNameShort = $AppProductJson.nameShort
|
|
||||||
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:INTEGRATION_TEST_CLI_PATH = "$AppRoot\bin\$AppNameShort"; .\scripts\sql-test-integration.bat }
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_TESTS'], 'true'))
|
|
||||||
displayName: Run release tests
|
|
||||||
env:
|
|
||||||
ADS_TEST_GREP: (.*@REL@|integration test setup)
|
|
||||||
ADS_TEST_INVERT_GREP: 0
|
|
||||||
BDC_BACKEND_USERNAME: $(ads-integration-test-bdc-server-username)
|
|
||||||
BDC_BACKEND_PWD: $(ads-integration-test-bdc-server-password)
|
|
||||||
BDC_BACKEND_HOSTNAME: $(ads-integration-test-bdc-server)
|
|
||||||
STANDALONE_SQL_USERNAME: $(ads-integration-test-standalone-server-username)
|
|
||||||
STANDALONE_SQL_PWD: $(ads-integration-test-standalone-server-password)
|
|
||||||
STANDALONE_SQL: $(ads-integration-test-standalone-server)
|
|
||||||
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
|
||||||
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
|
||||||
AZURE_SQL: $(ads-integration-test-azure-server)
|
|
||||||
|
|
||||||
- powershell: |
|
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
|
||||||
$ErrorActionPreference = "Stop"
|
|
||||||
$AppRoot = "$(Agent.TempDirectory)\azuredatastudio-win32-x64"
|
|
||||||
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
|
|
||||||
$AppNameShort = $AppProductJson.nameShort
|
|
||||||
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; .\scripts\sql-test-integration-unstable.bat }
|
|
||||||
continueOnError: true
|
|
||||||
condition: and(succeeded(), eq(variables['RUN_UNSTABLE_TESTS'], 'true'))
|
|
||||||
displayName: Run unstable integration tests
|
|
||||||
env:
|
|
||||||
BDC_BACKEND_USERNAME: $(ads-integration-test-bdc-server-username)
|
|
||||||
BDC_BACKEND_PWD: $(ads-integration-test-bdc-server-password)
|
|
||||||
BDC_BACKEND_HOSTNAME: $(ads-integration-test-bdc-server)
|
|
||||||
STANDALONE_SQL_USERNAME: $(ads-integration-test-standalone-server-username)
|
|
||||||
STANDALONE_SQL_PWD: $(ads-integration-test-standalone-server-password)
|
|
||||||
STANDALONE_SQL: $(ads-integration-test-standalone-server)
|
|
||||||
AZURE_SQL_USERNAME: $(ads-integration-test-azure-server-username)
|
|
||||||
AZURE_SQL_PWD: $(ads-integration-test-azure-server-password)
|
|
||||||
AZURE_SQL: $(ads-integration-test-azure-server)
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
Param(
|
|
||||||
[string]$sourcesDir,
|
|
||||||
[string]$artifactsDir,
|
|
||||||
[string]$storageKey,
|
|
||||||
[string]$documentDbKey
|
|
||||||
)
|
|
||||||
|
|
||||||
$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey
|
|
||||||
$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey
|
|
||||||
|
|
||||||
$ExeName = "AzureDataStudioSetup.exe"
|
|
||||||
$SystemExe = "$artifactsDir\win32-x64\system-setup\$ExeName"
|
|
||||||
$UserExe = "$artifactsDir\win32-x64\user-setup\$ExeName"
|
|
||||||
$UserExeName = "AzureDataStudioUserSetup.exe"
|
|
||||||
$ZipName = "azuredatastudio-win32-x64.zip"
|
|
||||||
$Zip = "$artifactsDir\win32-x64\archive\$ZipName"
|
|
||||||
|
|
||||||
$VersionJson = Get-Content -Raw -Path "$artifactsDir\version.json" | ConvertFrom-Json
|
|
||||||
$Version = $VersionJson.version
|
|
||||||
$Quality = $VersionJson.quality
|
|
||||||
$CommitId = $VersionJson.commit
|
|
||||||
|
|
||||||
$assetPlatform = "win32-x64"
|
|
||||||
|
|
||||||
node $sourcesDir/build/azure-pipelines/common/publish.js $Quality "$assetPlatform-archive" archive $ZipName $Version true $Zip $CommitId
|
|
||||||
|
|
||||||
node $sourcesDir/build/azure-pipelines/common/publish.js $Quality "$assetPlatform" setup $ExeName $Version true $SystemExe $CommitId
|
|
||||||
|
|
||||||
node $sourcesDir/build/azure-pipelines/common/publish.js $Quality "$assetPlatform-user" setup $UserExeName $Version true $UserExe $CommitId
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"name": "Microsoft.sqlservernotebook",
|
|
||||||
"version": "0.3.3",
|
|
||||||
"repo": "https://github.com/Microsoft/azuredatastudio"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@@ -1,7 +1,2 @@
|
|||||||
[
|
[
|
||||||
{
|
|
||||||
"name": "Microsoft.sqlservernotebook",
|
|
||||||
"version": "0.3.3",
|
|
||||||
"repo": "https://github.com/Microsoft/azuredatastudio"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const path = require('path');
|
|||||||
let window = null;
|
let window = null;
|
||||||
|
|
||||||
app.once('ready', () => {
|
app.once('ready', () => {
|
||||||
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true } });
|
window = new BrowserWindow({ width: 800, height: 600 });
|
||||||
window.setMenuBarVisibility(false);
|
window.setMenuBarVisibility(false);
|
||||||
window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }));
|
window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }));
|
||||||
// window.webContents.openDevTools();
|
// window.webContents.openDevTools();
|
||||||
|
|||||||
91
build/download/download.js
Normal file
91
build/download/download.js
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
"use strict";
|
||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const https = require("https");
|
||||||
|
const fs = require("fs");
|
||||||
|
const path = require("path");
|
||||||
|
const cp = require("child_process");
|
||||||
|
function ensureDir(filepath) {
|
||||||
|
if (!fs.existsSync(filepath)) {
|
||||||
|
ensureDir(path.dirname(filepath));
|
||||||
|
fs.mkdirSync(filepath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function download(options, destination) {
|
||||||
|
ensureDir(path.dirname(destination));
|
||||||
|
return new Promise((c, e) => {
|
||||||
|
const fd = fs.openSync(destination, 'w');
|
||||||
|
const req = https.get(options, (res) => {
|
||||||
|
res.on('data', (chunk) => {
|
||||||
|
fs.writeSync(fd, chunk);
|
||||||
|
});
|
||||||
|
res.on('end', () => {
|
||||||
|
fs.closeSync(fd);
|
||||||
|
c();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
req.on('error', (reqErr) => {
|
||||||
|
console.error(`request to ${options.host}${options.path} failed.`);
|
||||||
|
console.error(reqErr);
|
||||||
|
e(reqErr);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const MARKER_ARGUMENT = `_download_fork_`;
|
||||||
|
function base64encode(str) {
|
||||||
|
return Buffer.from(str, 'utf8').toString('base64');
|
||||||
|
}
|
||||||
|
function base64decode(str) {
|
||||||
|
return Buffer.from(str, 'base64').toString('utf8');
|
||||||
|
}
|
||||||
|
function downloadInExternalProcess(options) {
|
||||||
|
const url = `https://${options.requestOptions.host}${options.requestOptions.path}`;
|
||||||
|
console.log(`Downloading ${url}...`);
|
||||||
|
return new Promise((c, e) => {
|
||||||
|
const child = cp.fork(__filename, [MARKER_ARGUMENT, base64encode(JSON.stringify(options))], {
|
||||||
|
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
|
||||||
|
});
|
||||||
|
let stderr = [];
|
||||||
|
child.stderr.on('data', (chunk) => {
|
||||||
|
stderr.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk);
|
||||||
|
});
|
||||||
|
child.on('exit', (code) => {
|
||||||
|
if (code === 0) {
|
||||||
|
// normal termination
|
||||||
|
console.log(`Finished downloading ${url}.`);
|
||||||
|
c();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// abnormal termination
|
||||||
|
console.error(Buffer.concat(stderr).toString());
|
||||||
|
e(new Error(`Download of ${url} failed.`));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.downloadInExternalProcess = downloadInExternalProcess;
|
||||||
|
function _downloadInExternalProcess() {
|
||||||
|
let options;
|
||||||
|
try {
|
||||||
|
options = JSON.parse(base64decode(process.argv[3]));
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
console.error(`Cannot read arguments`);
|
||||||
|
console.error(err);
|
||||||
|
process.exit(-1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
download(options.requestOptions, options.destinationPath).then(() => {
|
||||||
|
process.exit(0);
|
||||||
|
}, (err) => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(-2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (process.argv.length >= 4 && process.argv[2] === MARKER_ARGUMENT) {
|
||||||
|
// running as forked download script
|
||||||
|
_downloadInExternalProcess();
|
||||||
|
}
|
||||||
111
build/download/download.ts
Normal file
111
build/download/download.ts
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import * as https from 'https';
|
||||||
|
import * as fs from 'fs';
|
||||||
|
import * as path from 'path';
|
||||||
|
import * as cp from 'child_process';
|
||||||
|
|
||||||
|
function ensureDir(filepath: string) {
|
||||||
|
if (!fs.existsSync(filepath)) {
|
||||||
|
ensureDir(path.dirname(filepath));
|
||||||
|
fs.mkdirSync(filepath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function download(options: https.RequestOptions, destination: string): Promise<void> {
|
||||||
|
ensureDir(path.dirname(destination));
|
||||||
|
|
||||||
|
return new Promise<void>((c, e) => {
|
||||||
|
const fd = fs.openSync(destination, 'w');
|
||||||
|
const req = https.get(options, (res) => {
|
||||||
|
res.on('data', (chunk) => {
|
||||||
|
fs.writeSync(fd, chunk);
|
||||||
|
});
|
||||||
|
res.on('end', () => {
|
||||||
|
fs.closeSync(fd);
|
||||||
|
c();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
req.on('error', (reqErr) => {
|
||||||
|
console.error(`request to ${options.host}${options.path} failed.`);
|
||||||
|
console.error(reqErr);
|
||||||
|
e(reqErr);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const MARKER_ARGUMENT = `_download_fork_`;
|
||||||
|
|
||||||
|
function base64encode(str: string): string {
|
||||||
|
return Buffer.from(str, 'utf8').toString('base64');
|
||||||
|
}
|
||||||
|
|
||||||
|
function base64decode(str: string): string {
|
||||||
|
return Buffer.from(str, 'base64').toString('utf8');
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IDownloadRequestOptions {
|
||||||
|
host: string;
|
||||||
|
path: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IDownloadOptions {
|
||||||
|
requestOptions: IDownloadRequestOptions;
|
||||||
|
destinationPath: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function downloadInExternalProcess(options: IDownloadOptions): Promise<void> {
|
||||||
|
const url = `https://${options.requestOptions.host}${options.requestOptions.path}`;
|
||||||
|
console.log(`Downloading ${url}...`);
|
||||||
|
return new Promise<void>((c, e) => {
|
||||||
|
const child = cp.fork(
|
||||||
|
__filename,
|
||||||
|
[MARKER_ARGUMENT, base64encode(JSON.stringify(options))],
|
||||||
|
{
|
||||||
|
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
|
||||||
|
}
|
||||||
|
);
|
||||||
|
let stderr: Buffer[] = [];
|
||||||
|
child.stderr.on('data', (chunk) => {
|
||||||
|
stderr.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk);
|
||||||
|
});
|
||||||
|
child.on('exit', (code) => {
|
||||||
|
if (code === 0) {
|
||||||
|
// normal termination
|
||||||
|
console.log(`Finished downloading ${url}.`);
|
||||||
|
c();
|
||||||
|
} else {
|
||||||
|
// abnormal termination
|
||||||
|
console.error(Buffer.concat(stderr).toString());
|
||||||
|
e(new Error(`Download of ${url} failed.`));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function _downloadInExternalProcess() {
|
||||||
|
let options: IDownloadOptions;
|
||||||
|
try {
|
||||||
|
options = JSON.parse(base64decode(process.argv[3]));
|
||||||
|
} catch (err) {
|
||||||
|
console.error(`Cannot read arguments`);
|
||||||
|
console.error(err);
|
||||||
|
process.exit(-1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
download(options.requestOptions, options.destinationPath).then(() => {
|
||||||
|
process.exit(0);
|
||||||
|
}, (err) => {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(-2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (process.argv.length >= 4 && process.argv[2] === MARKER_ARGUMENT) {
|
||||||
|
// running as forked download script
|
||||||
|
_downloadInExternalProcess();
|
||||||
|
}
|
||||||
@@ -5,12 +5,14 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const gulp = require('gulp');
|
|
||||||
const util = require('./lib/util');
|
const util = require('./lib/util');
|
||||||
const task = require('./lib/task');
|
const task = require('./lib/task');
|
||||||
const compilation = require('./lib/compilation');
|
const compilation = require('./lib/compilation');
|
||||||
|
const { compileExtensionsBuildTask } = require('./gulpfile.extensions');
|
||||||
|
|
||||||
// Full compile, including nls and inline sources in sourcemaps, for build
|
// Full compile, including nls and inline sources in sourcemaps, for build
|
||||||
const compileBuildTask = task.define('compile-build', task.series(util.rimraf('out-build'), compilation.compileTask('src', 'out-build', true)));
|
const compileClientBuildTask = task.define('compile-client-build', task.series(util.rimraf('out-build'), compilation.compileTask('src', 'out-build', true)));
|
||||||
gulp.task(compileBuildTask);
|
|
||||||
|
// All Build
|
||||||
|
const compileBuildTask = task.define('compile-build', task.parallel(compileClientBuildTask, compileExtensionsBuildTask));
|
||||||
exports.compileBuildTask = compileBuildTask;
|
exports.compileBuildTask = compileBuildTask;
|
||||||
|
|||||||
@@ -41,7 +41,12 @@ var editorEntryPoints = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
var editorResources = [
|
var editorResources = [
|
||||||
'out-editor-build/vs/base/browser/ui/codiconLabel/**/*.ttf'
|
'out-build/vs/{base,editor}/**/*.{svg,png}',
|
||||||
|
'!out-build/vs/base/browser/ui/splitview/**/*',
|
||||||
|
'!out-build/vs/base/browser/ui/toolbar/**/*',
|
||||||
|
'!out-build/vs/base/browser/ui/octiconLabel/**/*',
|
||||||
|
'!out-build/vs/workbench/**',
|
||||||
|
'!**/test/**'
|
||||||
];
|
];
|
||||||
|
|
||||||
var BUNDLED_FILE_HEADER = [
|
var BUNDLED_FILE_HEADER = [
|
||||||
@@ -57,6 +62,7 @@ var BUNDLED_FILE_HEADER = [
|
|||||||
const languages = i18n.defaultLanguages.concat([]); // i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages : []);
|
const languages = i18n.defaultLanguages.concat([]); // i18n.defaultLanguages.concat(process.env.VSCODE_QUALITY !== 'stable' ? i18n.extraLanguages : []);
|
||||||
|
|
||||||
const extractEditorSrcTask = task.define('extract-editor-src', () => {
|
const extractEditorSrcTask = task.define('extract-editor-src', () => {
|
||||||
|
console.log(`If the build fails, consider tweaking shakeLevel below to a lower value.`);
|
||||||
const apiusages = monacoapi.execute().usageContent;
|
const apiusages = monacoapi.execute().usageContent;
|
||||||
const extrausages = fs.readFileSync(path.join(root, 'build', 'monaco', 'monaco.usage.recipe')).toString();
|
const extrausages = fs.readFileSync(path.join(root, 'build', 'monaco', 'monaco.usage.recipe')).toString();
|
||||||
standalone.extractEditor({
|
standalone.extractEditor({
|
||||||
@@ -70,15 +76,25 @@ const extractEditorSrcTask = task.define('extract-editor-src', () => {
|
|||||||
apiusages,
|
apiusages,
|
||||||
extrausages
|
extrausages
|
||||||
],
|
],
|
||||||
|
typings: [
|
||||||
|
'typings/lib.ie11_safe_es6.d.ts',
|
||||||
|
'typings/thenable.d.ts',
|
||||||
|
'typings/es6-promise.d.ts',
|
||||||
|
'typings/require-monaco.d.ts',
|
||||||
|
"typings/lib.es2018.promise.d.ts",
|
||||||
|
'vs/monaco.d.ts'
|
||||||
|
],
|
||||||
libs: [
|
libs: [
|
||||||
`lib.es5.d.ts`,
|
`lib.es5.d.ts`,
|
||||||
`lib.dom.d.ts`,
|
`lib.dom.d.ts`,
|
||||||
`lib.webworker.importscripts.d.ts`
|
`lib.webworker.importscripts.d.ts`
|
||||||
],
|
],
|
||||||
|
redirects: {
|
||||||
|
'vs/base/browser/ui/octiconLabel/octiconLabel': 'vs/base/browser/ui/octiconLabel/octiconLabel.mock',
|
||||||
|
},
|
||||||
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
|
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
|
||||||
importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/,
|
importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/,
|
||||||
destRoot: path.join(root, 'out-editor-src'),
|
destRoot: path.join(root, 'out-editor-src')
|
||||||
redirects: []
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -129,70 +145,18 @@ const createESMSourcesAndResourcesTask = task.define('extract-editor-esm', () =>
|
|||||||
});
|
});
|
||||||
|
|
||||||
const compileEditorESMTask = task.define('compile-editor-esm', () => {
|
const compileEditorESMTask = task.define('compile-editor-esm', () => {
|
||||||
console.log(`Launching the TS compiler at ${path.join(__dirname, '../out-editor-esm')}...`);
|
|
||||||
let result;
|
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
result = cp.spawnSync(`..\\node_modules\\.bin\\tsc.cmd`, {
|
const result = cp.spawnSync(`..\\node_modules\\.bin\\tsc.cmd`, {
|
||||||
cwd: path.join(__dirname, '../out-editor-esm')
|
cwd: path.join(__dirname, '../out-editor-esm')
|
||||||
});
|
});
|
||||||
|
console.log(result.stdout.toString());
|
||||||
|
console.log(result.stderr.toString());
|
||||||
} else {
|
} else {
|
||||||
result = cp.spawnSync(`node`, [`../node_modules/.bin/tsc`], {
|
const result = cp.spawnSync(`node`, [`../node_modules/.bin/tsc`], {
|
||||||
cwd: path.join(__dirname, '../out-editor-esm')
|
cwd: path.join(__dirname, '../out-editor-esm')
|
||||||
});
|
});
|
||||||
}
|
console.log(result.stdout.toString());
|
||||||
|
console.log(result.stderr.toString());
|
||||||
console.log(result.stdout.toString());
|
|
||||||
console.log(result.stderr.toString());
|
|
||||||
|
|
||||||
if (result.status !== 0) {
|
|
||||||
console.log(`The TS Compilation failed, preparing analysis folder...`);
|
|
||||||
const destPath = path.join(__dirname, '../../vscode-monaco-editor-esm-analysis');
|
|
||||||
return util.rimraf(destPath)().then(() => {
|
|
||||||
fs.mkdirSync(destPath);
|
|
||||||
|
|
||||||
// initialize a new repository
|
|
||||||
cp.spawnSync(`git`, [`init`], {
|
|
||||||
cwd: destPath
|
|
||||||
});
|
|
||||||
|
|
||||||
// build a list of files to copy
|
|
||||||
const files = util.rreddir(path.join(__dirname, '../out-editor-esm'));
|
|
||||||
|
|
||||||
// copy files from src
|
|
||||||
for (const file of files) {
|
|
||||||
const srcFilePath = path.join(__dirname, '../src', file);
|
|
||||||
const dstFilePath = path.join(destPath, file);
|
|
||||||
if (fs.existsSync(srcFilePath)) {
|
|
||||||
util.ensureDir(path.dirname(dstFilePath));
|
|
||||||
const contents = fs.readFileSync(srcFilePath).toString().replace(/\r\n|\r|\n/g, '\n');
|
|
||||||
fs.writeFileSync(dstFilePath, contents);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// create an initial commit to diff against
|
|
||||||
cp.spawnSync(`git`, [`add`, `.`], {
|
|
||||||
cwd: destPath
|
|
||||||
});
|
|
||||||
|
|
||||||
// create the commit
|
|
||||||
cp.spawnSync(`git`, [`commit`, `-m`, `"original sources"`, `--no-gpg-sign`], {
|
|
||||||
cwd: destPath
|
|
||||||
});
|
|
||||||
|
|
||||||
// copy files from esm
|
|
||||||
for (const file of files) {
|
|
||||||
const srcFilePath = path.join(__dirname, '../out-editor-esm', file);
|
|
||||||
const dstFilePath = path.join(destPath, file);
|
|
||||||
if (fs.existsSync(srcFilePath)) {
|
|
||||||
util.ensureDir(path.dirname(dstFilePath));
|
|
||||||
const contents = fs.readFileSync(srcFilePath).toString().replace(/\r\n|\r|\n/g, '\n');
|
|
||||||
fs.writeFileSync(dstFilePath, contents);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`Open in VS Code the folder at '${destPath}' and you can alayze the compilation error`);
|
|
||||||
throw new Error('Standalone Editor compilation failed. If this is the build machine, simply launch `yarn run gulp editor-distro` on your machine to further analyze the compilation problem.');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -21,15 +21,9 @@ const nlsDev = require('vscode-nls-dev');
|
|||||||
const root = path.dirname(__dirname);
|
const root = path.dirname(__dirname);
|
||||||
const commit = util.getVersion(root);
|
const commit = util.getVersion(root);
|
||||||
const plumber = require('gulp-plumber');
|
const plumber = require('gulp-plumber');
|
||||||
const ext = require('./lib/extensions');
|
const _ = require('underscore');
|
||||||
|
|
||||||
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
|
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
const sqlLocalizedExtensions = [
|
|
||||||
'dacpac',
|
|
||||||
'schema-compare'
|
|
||||||
];
|
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
|
|
||||||
const compilations = glob.sync('**/tsconfig.json', {
|
const compilations = glob.sync('**/tsconfig.json', {
|
||||||
cwd: extensionsPath,
|
cwd: extensionsPath,
|
||||||
@@ -42,38 +36,38 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||||||
const absolutePath = path.join(extensionsPath, tsconfigFile);
|
const absolutePath = path.join(extensionsPath, tsconfigFile);
|
||||||
const relativeDirname = path.dirname(tsconfigFile);
|
const relativeDirname = path.dirname(tsconfigFile);
|
||||||
|
|
||||||
const overrideOptions = {};
|
const tsconfig = require(absolutePath);
|
||||||
overrideOptions.sourceMap = true;
|
const tsOptions = _.assign({}, tsconfig.extends ? require(path.join(extensionsPath, relativeDirname, tsconfig.extends)).compilerOptions : {}, tsconfig.compilerOptions);
|
||||||
|
tsOptions.verbose = false;
|
||||||
|
tsOptions.sourceMap = true;
|
||||||
|
|
||||||
const name = relativeDirname.replace(/\//g, '-');
|
const name = relativeDirname.replace(/\//g, '-');
|
||||||
|
|
||||||
const root = path.join('extensions', relativeDirname);
|
const root = path.join('extensions', relativeDirname);
|
||||||
const srcBase = path.join(root, 'src');
|
const srcBase = path.join(root, 'src');
|
||||||
const src = path.join(srcBase, '**');
|
const src = path.join(srcBase, '**');
|
||||||
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
|
|
||||||
|
|
||||||
const out = path.join(root, 'out');
|
const out = path.join(root, 'out');
|
||||||
const baseUrl = getBaseUrl(out);
|
const baseUrl = getBaseUrl(out);
|
||||||
|
|
||||||
let headerId, headerOut;
|
let headerId, headerOut;
|
||||||
let index = relativeDirname.indexOf('/');
|
let index = relativeDirname.indexOf('/');
|
||||||
if (index < 0) {
|
if (index < 0) {
|
||||||
headerId = 'microsoft.' + relativeDirname; // {{SQL CARBON EDIT}}
|
headerId = 'vscode.' + relativeDirname;
|
||||||
headerOut = 'out';
|
headerOut = 'out';
|
||||||
} else {
|
} else {
|
||||||
headerId = 'microsoft.' + relativeDirname.substr(0, index); // {{SQL CARBON EDIT}}
|
headerId = 'vscode.' + relativeDirname.substr(0, index);
|
||||||
headerOut = relativeDirname.substr(index + 1) + '/out';
|
headerOut = relativeDirname.substr(index + 1) + '/out';
|
||||||
}
|
}
|
||||||
|
|
||||||
function createPipeline(build, emitError) {
|
function createPipeline(build, emitError) {
|
||||||
const reporter = createReporter();
|
const reporter = createReporter();
|
||||||
|
|
||||||
overrideOptions.inlineSources = Boolean(build);
|
tsOptions.inlineSources = !!build;
|
||||||
overrideOptions.base = path.dirname(absolutePath);
|
tsOptions.base = path.dirname(absolutePath);
|
||||||
|
|
||||||
const compilation = tsb.create(absolutePath, overrideOptions, false, err => reporter(err.toString()));
|
const compilation = tsb.create(tsOptions, null, null, err => reporter(err.toString()));
|
||||||
|
|
||||||
const pipeline = function () {
|
return function () {
|
||||||
const input = es.through();
|
const input = es.through();
|
||||||
const tsFilter = filter(['**/*.ts', '!**/lib/lib*.d.ts', '!**/node_modules/**'], { restore: true });
|
const tsFilter = filter(['**/*.ts', '!**/lib/lib*.d.ts', '!**/node_modules/**'], { restore: true });
|
||||||
const output = input
|
const output = input
|
||||||
@@ -103,20 +97,15 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||||||
|
|
||||||
return es.duplex(input, output);
|
return es.duplex(input, output);
|
||||||
};
|
};
|
||||||
|
|
||||||
// add src-stream for project files
|
|
||||||
pipeline.tsProjectSrc = () => {
|
|
||||||
return compilation.src(srcOpts);
|
|
||||||
};
|
|
||||||
return pipeline;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase };
|
||||||
|
|
||||||
const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out));
|
const cleanTask = task.define(`clean-extension-${name}`, util.rimraf(out));
|
||||||
|
|
||||||
const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => {
|
const compileTask = task.define(`compile-extension:${name}`, task.series(cleanTask, () => {
|
||||||
const pipeline = createPipeline(sqlLocalizedExtensions.includes(name), true); // {{SQL CARBON EDIT}}
|
const pipeline = createPipeline(false, true);
|
||||||
const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts']));
|
const input = gulp.src(src, srcOpts);
|
||||||
const input = es.merge(nonts, pipeline.tsProjectSrc());
|
|
||||||
|
|
||||||
return input
|
return input
|
||||||
.pipe(pipeline())
|
.pipe(pipeline())
|
||||||
@@ -125,9 +114,8 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||||||
|
|
||||||
const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => {
|
const watchTask = task.define(`watch-extension:${name}`, task.series(cleanTask, () => {
|
||||||
const pipeline = createPipeline(false);
|
const pipeline = createPipeline(false);
|
||||||
const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts']));
|
const input = gulp.src(src, srcOpts);
|
||||||
const input = es.merge(nonts, pipeline.tsProjectSrc());
|
const watchInput = watcher(src, srcOpts);
|
||||||
const watchInput = watcher(src, { ...srcOpts, ...{ readDelay: 200 } });
|
|
||||||
|
|
||||||
return watchInput
|
return watchInput
|
||||||
.pipe(util.incremental(pipeline, input))
|
.pipe(util.incremental(pipeline, input))
|
||||||
@@ -136,8 +124,7 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||||||
|
|
||||||
const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => {
|
const compileBuildTask = task.define(`compile-build-extension-${name}`, task.series(cleanTask, () => {
|
||||||
const pipeline = createPipeline(true, true);
|
const pipeline = createPipeline(true, true);
|
||||||
const nonts = gulp.src(src, srcOpts).pipe(filter(['**', '!**/*.ts']));
|
const input = gulp.src(src, srcOpts);
|
||||||
const input = es.merge(nonts, pipeline.tsProjectSrc());
|
|
||||||
|
|
||||||
return input
|
return input
|
||||||
.pipe(pipeline())
|
.pipe(pipeline())
|
||||||
@@ -148,7 +135,11 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||||||
gulp.task(compileTask);
|
gulp.task(compileTask);
|
||||||
gulp.task(watchTask);
|
gulp.task(watchTask);
|
||||||
|
|
||||||
return { compileTask, watchTask, compileBuildTask };
|
return {
|
||||||
|
compileTask: compileTask,
|
||||||
|
watchTask: watchTask,
|
||||||
|
compileBuildTask: compileBuildTask
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const compileExtensionsTask = task.define('compile-extensions', task.parallel(...tasks.map(t => t.compileTask)));
|
const compileExtensionsTask = task.define('compile-extensions', task.parallel(...tasks.map(t => t.compileTask)));
|
||||||
@@ -159,17 +150,5 @@ const watchExtensionsTask = task.define('watch-extensions', task.parallel(...tas
|
|||||||
gulp.task(watchExtensionsTask);
|
gulp.task(watchExtensionsTask);
|
||||||
exports.watchExtensionsTask = watchExtensionsTask;
|
exports.watchExtensionsTask = watchExtensionsTask;
|
||||||
|
|
||||||
const compileExtensionsBuildLegacyTask = task.define('compile-extensions-build-legacy', task.parallel(...tasks.map(t => t.compileBuildTask)));
|
const compileExtensionsBuildTask = task.define('compile-extensions-build', task.parallel(...tasks.map(t => t.compileBuildTask)));
|
||||||
gulp.task(compileExtensionsBuildLegacyTask);
|
|
||||||
|
|
||||||
// Azure Pipelines
|
|
||||||
|
|
||||||
const cleanExtensionsBuildTask = task.define('clean-extensions-build', util.rimraf('.build/extensions'));
|
|
||||||
const compileExtensionsBuildTask = task.define('compile-extensions-build', task.series(
|
|
||||||
cleanExtensionsBuildTask,
|
|
||||||
task.define('bundle-extensions-build', () => ext.packageLocalExtensionsStream().pipe(gulp.dest('.build'))),
|
|
||||||
task.define('bundle-marketplace-extensions-build', () => ext.packageMarketplaceExtensionsStream().pipe(gulp.dest('.build')))
|
|
||||||
));
|
|
||||||
|
|
||||||
gulp.task(compileExtensionsBuildTask);
|
|
||||||
exports.compileExtensionsBuildTask = compileExtensionsBuildTask;
|
exports.compileExtensionsBuildTask = compileExtensionsBuildTask;
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ const vfs = require('vinyl-fs');
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const pall = require('p-all');
|
const pall = require('p-all');
|
||||||
const task = require('./lib/task');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hygiene works by creating cascading subsets of all our files and
|
* Hygiene works by creating cascading subsets of all our files and
|
||||||
@@ -51,15 +50,12 @@ const indentationFilter = [
|
|||||||
'!src/vs/css.js',
|
'!src/vs/css.js',
|
||||||
'!src/vs/css.build.js',
|
'!src/vs/css.build.js',
|
||||||
'!src/vs/loader.js',
|
'!src/vs/loader.js',
|
||||||
'!src/vs/base/common/insane/insane.js',
|
|
||||||
'!src/vs/base/common/marked/marked.js',
|
'!src/vs/base/common/marked/marked.js',
|
||||||
'!src/vs/base/node/terminateProcess.sh',
|
'!src/vs/base/node/terminateProcess.sh',
|
||||||
'!src/vs/base/node/cpuUsage.sh',
|
'!src/vs/base/node/cpuUsage.sh',
|
||||||
'!test/assert.js',
|
'!test/assert.js',
|
||||||
'!build/testSetup.js',
|
|
||||||
|
|
||||||
// except specific folders
|
// except specific folders
|
||||||
'!test/automation/out/**',
|
|
||||||
'!test/smoke/out/**',
|
'!test/smoke/out/**',
|
||||||
'!extensions/vscode-api-tests/testWorkspace/**',
|
'!extensions/vscode-api-tests/testWorkspace/**',
|
||||||
'!extensions/vscode-api-tests/testWorkspace2/**',
|
'!extensions/vscode-api-tests/testWorkspace2/**',
|
||||||
@@ -68,12 +64,11 @@ const indentationFilter = [
|
|||||||
|
|
||||||
// except multiple specific files
|
// except multiple specific files
|
||||||
'!**/package.json',
|
'!**/package.json',
|
||||||
'!**/package-lock.json', // {{SQL CARBON EDIT}}
|
|
||||||
'!**/yarn.lock',
|
'!**/yarn.lock',
|
||||||
'!**/yarn-error.log',
|
'!**/yarn-error.log',
|
||||||
|
|
||||||
// except multiple specific folders
|
// except multiple specific folders
|
||||||
'!**/codicon/**',
|
'!**/octicons/**',
|
||||||
'!**/fixtures/**',
|
'!**/fixtures/**',
|
||||||
'!**/lib/**',
|
'!**/lib/**',
|
||||||
'!extensions/**/out/**',
|
'!extensions/**/out/**',
|
||||||
@@ -92,19 +87,9 @@ const indentationFilter = [
|
|||||||
'!build/azure-pipelines/**/*.js',
|
'!build/azure-pipelines/**/*.js',
|
||||||
'!build/azure-pipelines/**/*.config',
|
'!build/azure-pipelines/**/*.config',
|
||||||
'!**/Dockerfile',
|
'!**/Dockerfile',
|
||||||
'!**/Dockerfile.*',
|
|
||||||
'!**/*.Dockerfile',
|
'!**/*.Dockerfile',
|
||||||
'!**/*.dockerfile',
|
'!**/*.dockerfile',
|
||||||
'!extensions/markdown-language-features/media/*.js',
|
'!extensions/markdown-language-features/media/*.js'
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
'!**/*.{xlf,docx,sql,vsix,bacpac,ipynb}',
|
|
||||||
'!extensions/mssql/sqltoolsservice/**',
|
|
||||||
'!extensions/import/flatfileimportservice/**',
|
|
||||||
'!extensions/admin-tool-ext-win/ssmsmin/**',
|
|
||||||
'!extensions/resource-deployment/notebooks/**',
|
|
||||||
'!extensions/mssql/notebooks/**',
|
|
||||||
'!extensions/big-data-cluster/src/bigDataCluster/controller/apiGenerated.ts',
|
|
||||||
'!extensions/big-data-cluster/src/bigDataCluster/controller/clusterApiGenerated2.ts'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const copyrightFilter = [
|
const copyrightFilter = [
|
||||||
@@ -125,7 +110,6 @@ const copyrightFilter = [
|
|||||||
'!**/*.opts',
|
'!**/*.opts',
|
||||||
'!**/*.disabled',
|
'!**/*.disabled',
|
||||||
'!**/*.code-workspace',
|
'!**/*.code-workspace',
|
||||||
'!**/*.js.map',
|
|
||||||
'!**/promise-polyfill/polyfill.js',
|
'!**/promise-polyfill/polyfill.js',
|
||||||
'!build/**/*.init',
|
'!build/**/*.init',
|
||||||
'!resources/linux/snap/snapcraft.yaml',
|
'!resources/linux/snap/snapcraft.yaml',
|
||||||
@@ -134,42 +118,7 @@ const copyrightFilter = [
|
|||||||
'!resources/completions/**',
|
'!resources/completions/**',
|
||||||
'!extensions/markdown-language-features/media/highlight.css',
|
'!extensions/markdown-language-features/media/highlight.css',
|
||||||
'!extensions/html-language-features/server/src/modes/typescript/*',
|
'!extensions/html-language-features/server/src/modes/typescript/*',
|
||||||
'!extensions/*/server/bin/*',
|
'!extensions/*/server/bin/*'
|
||||||
'!src/vs/editor/test/node/classification/typescript-test.ts',
|
|
||||||
'!scripts/code-web.js',
|
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
'!extensions/notebook/src/intellisense/text.ts',
|
|
||||||
'!extensions/mssql/src/hdfs/webhdfs.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/outputs/tableRenderers.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/common/models/url.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/models/renderMimeInterfaces.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/models/outputProcessor.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/models/mimemodel.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/cellViews/media/*.css',
|
|
||||||
'!src/sql/base/browser/ui/table/plugins/rowSelectionModel.plugin.ts',
|
|
||||||
'!src/sql/base/browser/ui/table/plugins/rowDetailView.ts',
|
|
||||||
'!src/sql/base/browser/ui/table/plugins/headerFilter.plugin.ts',
|
|
||||||
'!src/sql/base/browser/ui/table/plugins/checkboxSelectColumn.plugin.ts',
|
|
||||||
'!src/sql/base/browser/ui/table/plugins/cellSelectionModel.plugin.ts',
|
|
||||||
'!src/sql/base/browser/ui/table/plugins/autoSizeColumns.plugin.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/outputs/sanitizer.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/outputs/renderers.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/outputs/registry.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/browser/outputs/factories.ts',
|
|
||||||
'!src/sql/workbench/contrib/notebook/common/models/nbformat.ts',
|
|
||||||
'!extensions/markdown-language-features/media/tomorrow.css',
|
|
||||||
'!src/sql/workbench/browser/modelComponents/media/highlight.css',
|
|
||||||
'!src/sql/workbench/contrib/notebook/electron-browser/cellViews/media/highlight.css',
|
|
||||||
'!extensions/mssql/sqltoolsservice/**',
|
|
||||||
'!extensions/import/flatfileimportservice/**',
|
|
||||||
'!extensions/notebook/src/prompts/**',
|
|
||||||
'!extensions/mssql/src/prompts/**',
|
|
||||||
'!extensions/notebook/resources/jupyter_config/**',
|
|
||||||
'!extensions/query-history/images/**',
|
|
||||||
'!**/*.gif',
|
|
||||||
'!**/*.xlf',
|
|
||||||
'!**/*.dacpac',
|
|
||||||
'!**/*.bacpac'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const eslintFilter = [
|
const eslintFilter = [
|
||||||
@@ -180,84 +129,25 @@ const eslintFilter = [
|
|||||||
'!src/vs/nls.js',
|
'!src/vs/nls.js',
|
||||||
'!src/vs/css.build.js',
|
'!src/vs/css.build.js',
|
||||||
'!src/vs/nls.build.js',
|
'!src/vs/nls.build.js',
|
||||||
'!src/**/insane.js',
|
|
||||||
'!src/**/marked.js',
|
'!src/**/marked.js',
|
||||||
'!**/test/**'
|
'!**/test/**'
|
||||||
];
|
];
|
||||||
|
|
||||||
const tslintBaseFilter = [
|
const tslintFilter = [
|
||||||
|
'src/**/*.ts',
|
||||||
|
'test/**/*.ts',
|
||||||
|
'extensions/**/*.ts',
|
||||||
'!**/fixtures/**',
|
'!**/fixtures/**',
|
||||||
'!**/typings/**',
|
'!**/typings/**',
|
||||||
'!**/node_modules/**',
|
'!**/node_modules/**',
|
||||||
'!extensions/typescript-basics/test/colorize-fixtures/**',
|
'!extensions/typescript/test/colorize-fixtures/**',
|
||||||
'!extensions/vscode-api-tests/testWorkspace/**',
|
'!extensions/vscode-api-tests/testWorkspace/**',
|
||||||
'!extensions/vscode-api-tests/testWorkspace2/**',
|
'!extensions/vscode-api-tests/testWorkspace2/**',
|
||||||
'!extensions/**/*.test.ts',
|
'!extensions/**/*.test.ts',
|
||||||
'!extensions/html-language-features/server/lib/jquery.d.ts',
|
'!extensions/html-language-features/server/lib/jquery.d.ts'
|
||||||
'!extensions/big-data-cluster/src/bigDataCluster/controller/apiGenerated.ts', // {{SQL CARBON EDIT}},
|
|
||||||
'!extensions/big-data-cluster/src/bigDataCluster/controller/tokenApiGenerated.ts', // {{SQL CARBON EDIT}},
|
|
||||||
'!src/vs/workbench/services/themes/common/textMateScopeMatcher.ts' // {{SQL CARBON EDIT}} skip this because we have no plans on touching this and its not ours
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
// {{SQL CARBON EDIT}}
|
||||||
const sqlFilter = [
|
|
||||||
'src/sql/**',
|
|
||||||
'extensions/**',
|
|
||||||
// Ignore VS Code extensions
|
|
||||||
'!extensions/bat/**',
|
|
||||||
'!extensions/configuration-editing/**',
|
|
||||||
'!extensions/docker/**',
|
|
||||||
'!extensions/extension-editing/**',
|
|
||||||
'!extensions/git/**',
|
|
||||||
'!extensions/git-ui/**',
|
|
||||||
'!extensions/image-preview/**',
|
|
||||||
'!extensions/insights-default/**',
|
|
||||||
'!extensions/json/**',
|
|
||||||
'!extensions/json-language-features/**',
|
|
||||||
'!extensions/markdown-basics/**',
|
|
||||||
'!extensions/markdown-language-features/**',
|
|
||||||
'!extensions/merge-conflict/**',
|
|
||||||
'!extensions/powershell/**',
|
|
||||||
'!extensions/python/**',
|
|
||||||
'!extensions/r/**',
|
|
||||||
'!extensions/theme-*/**',
|
|
||||||
'!extensions/vscode-*/**',
|
|
||||||
'!extensions/xml/**',
|
|
||||||
'!extensions/xml-language-features/**',
|
|
||||||
'!extensions/yarml/**',
|
|
||||||
];
|
|
||||||
|
|
||||||
const tslintCoreFilter = [
|
|
||||||
'src/**/*.ts',
|
|
||||||
'test/**/*.ts',
|
|
||||||
'!extensions/**/*.ts',
|
|
||||||
'!test/automation/**',
|
|
||||||
'!test/smoke/**',
|
|
||||||
...tslintBaseFilter
|
|
||||||
];
|
|
||||||
|
|
||||||
const tslintExtensionsFilter = [
|
|
||||||
'extensions/**/*.ts',
|
|
||||||
'!src/**/*.ts',
|
|
||||||
'!test/**/*.ts',
|
|
||||||
'test/automation/**/*.ts',
|
|
||||||
...tslintBaseFilter
|
|
||||||
];
|
|
||||||
|
|
||||||
const tslintHygieneFilter = [
|
|
||||||
'src/**/*.ts',
|
|
||||||
'test/**/*.ts',
|
|
||||||
'extensions/**/*.ts',
|
|
||||||
'!src/vs/workbench/contrib/extensions/browser/extensionTipsService.ts', // {{SQL CARBON EDIT}} known formatting issue do to commenting out code
|
|
||||||
...tslintBaseFilter
|
|
||||||
];
|
|
||||||
|
|
||||||
const fileLengthFilter = filter([
|
|
||||||
'**',
|
|
||||||
'!extensions/import/*.docx',
|
|
||||||
'!extensions/admin-tool-ext-win/license/**'
|
|
||||||
], {restore: true});
|
|
||||||
|
|
||||||
const copyrightHeaderLines = [
|
const copyrightHeaderLines = [
|
||||||
'/*---------------------------------------------------------------------------------------------',
|
'/*---------------------------------------------------------------------------------------------',
|
||||||
' * Copyright (c) Microsoft Corporation. All rights reserved.',
|
' * Copyright (c) Microsoft Corporation. All rights reserved.',
|
||||||
@@ -274,63 +164,18 @@ gulp.task('eslint', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('tslint', () => {
|
gulp.task('tslint', () => {
|
||||||
return es.merge([
|
// {{SQL CARBON EDIT}}
|
||||||
|
const options = { emitError: false };
|
||||||
|
|
||||||
// Core: include type information (required by certain rules like no-nodejs-globals)
|
return vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
||||||
vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
.pipe(filter(tslintFilter))
|
||||||
.pipe(filter(tslintCoreFilter))
|
.pipe(gulptslint.default({ rulesDirectory: 'build/lib/tslint' }))
|
||||||
.pipe(gulptslint.default({ rulesDirectory: 'build/lib/tslint', program: tslint.Linter.createProgram('src/tsconfig.json') }))
|
.pipe(gulptslint.default.report(options));
|
||||||
.pipe(gulptslint.default.report({ emitError: true })),
|
|
||||||
|
|
||||||
// Exenstions: do not include type information
|
|
||||||
vfs.src(all, { base: '.', follow: true, allowEmpty: true })
|
|
||||||
.pipe(filter(tslintExtensionsFilter))
|
|
||||||
.pipe(gulptslint.default({ rulesDirectory: 'build/lib/tslint' }))
|
|
||||||
.pipe(gulptslint.default.report({ emitError: true }))
|
|
||||||
]).pipe(es.through());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkPackageJSON(actualPath) {
|
|
||||||
const actual = require(path.join(__dirname, '..', actualPath));
|
|
||||||
const rootPackageJSON = require('../package.json');
|
|
||||||
|
|
||||||
for (let depName in actual.dependencies) {
|
|
||||||
const depVersion = actual.dependencies[depName];
|
|
||||||
const rootDepVersion = rootPackageJSON.dependencies[depName];
|
|
||||||
if (!rootDepVersion) {
|
|
||||||
// missing in root is allowed
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (depVersion !== rootDepVersion) {
|
|
||||||
this.emit('error', `The dependency ${depName} in '${actualPath}' (${depVersion}) is different than in the root package.json (${rootDepVersion})`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const checkPackageJSONTask = task.define('check-package-json', () => {
|
|
||||||
return gulp.src('package.json')
|
|
||||||
.pipe(es.through(function() {
|
|
||||||
checkPackageJSON.call(this, 'remote/package.json');
|
|
||||||
checkPackageJSON.call(this, 'remote/web/package.json');
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
gulp.task(checkPackageJSONTask);
|
|
||||||
|
|
||||||
|
|
||||||
function hygiene(some) {
|
function hygiene(some) {
|
||||||
let errorCount = 0;
|
let errorCount = 0;
|
||||||
|
|
||||||
const productJson = es.through(function (file) {
|
|
||||||
// const product = JSON.parse(file.contents.toString('utf8'));
|
|
||||||
|
|
||||||
// if (product.extensionsGallery) { // {{SQL CARBON EDIT}} @todo we need to research on what the point of this is
|
|
||||||
// console.error('product.json: Contains "extensionsGallery"');
|
|
||||||
// errorCount++;
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.emit('data', file);
|
|
||||||
});
|
|
||||||
|
|
||||||
const indentation = es.through(function (file) {
|
const indentation = es.through(function (file) {
|
||||||
const lines = file.contents.toString('utf8').split(/\r\n|\r|\n/);
|
const lines = file.contents.toString('utf8').split(/\r\n|\r|\n/);
|
||||||
file.__lines = lines;
|
file.__lines = lines;
|
||||||
@@ -353,8 +198,8 @@ function hygiene(some) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const copyrights = es.through(function (file) {
|
const copyrights = es.through(function (file) {
|
||||||
|
|
||||||
const lines = file.__lines;
|
const lines = file.__lines;
|
||||||
|
|
||||||
for (let i = 0; i < copyrightHeaderLines.length; i++) {
|
for (let i = 0; i < copyrightHeaderLines.length; i++) {
|
||||||
if (lines[i] !== copyrightHeaderLines[i]) {
|
if (lines[i] !== copyrightHeaderLines[i]) {
|
||||||
console.error(file.relative + ': Missing or bad copyright statement');
|
console.error(file.relative + ': Missing or bad copyright statement');
|
||||||
@@ -396,23 +241,6 @@ function hygiene(some) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const filelength = es.through(function (file) {
|
|
||||||
|
|
||||||
const fileName = path.basename(file.relative);
|
|
||||||
const fileDir = path.dirname(file.relative);
|
|
||||||
//check the filename is < 50 characters (basename gets the filename with extension).
|
|
||||||
if (fileName.length > 50) {
|
|
||||||
console.error(`File name '${fileName}' under ${fileDir} is too long. Rename file to have less than 50 characters.`);
|
|
||||||
errorCount++;
|
|
||||||
}
|
|
||||||
if (file.relative.length > 150) {
|
|
||||||
console.error(`File path ${file.relative} exceeds acceptable file-length. Rename the path to have less than 150 characters.`);
|
|
||||||
errorCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.emit('data', file);
|
|
||||||
});
|
|
||||||
|
|
||||||
const tslintConfiguration = tslint.Configuration.findConfiguration('tslint.json', '.');
|
const tslintConfiguration = tslint.Configuration.findConfiguration('tslint.json', '.');
|
||||||
const tslintOptions = { fix: false, formatter: 'json' };
|
const tslintOptions = { fix: false, formatter: 'json' };
|
||||||
const tsLinter = new tslint.Linter(tslintOptions);
|
const tsLinter = new tslint.Linter(tslintOptions);
|
||||||
@@ -426,100 +254,36 @@ function hygiene(some) {
|
|||||||
let input;
|
let input;
|
||||||
|
|
||||||
if (Array.isArray(some) || typeof some === 'string' || !some) {
|
if (Array.isArray(some) || typeof some === 'string' || !some) {
|
||||||
const options = { base: '.', follow: true, allowEmpty: true };
|
input = vfs.src(some || all, { base: '.', follow: true, allowEmpty: true });
|
||||||
if (some) {
|
|
||||||
input = vfs.src(some, options).pipe(filter(all)); // split this up to not unnecessarily filter all a second time
|
|
||||||
} else {
|
|
||||||
input = vfs.src(all, options);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
input = some;
|
input = some;
|
||||||
}
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}} Linting for SQL
|
|
||||||
const tslintSqlConfiguration = tslint.Configuration.findConfiguration('tslint-sql.json', '.');
|
|
||||||
const tslintSqlOptions = { fix: false, formatter: 'json' };
|
|
||||||
const sqlTsLinter = new tslint.Linter(tslintSqlOptions);
|
|
||||||
|
|
||||||
const sqlTsl = es.through(function (file) { //TODO restore
|
|
||||||
const contents = file.contents.toString('utf8');
|
|
||||||
sqlTsLinter.lint(file.relative, contents, tslintSqlConfiguration.results);
|
|
||||||
});
|
|
||||||
|
|
||||||
const productJsonFilter = filter('product.json', { restore: true });
|
|
||||||
|
|
||||||
const result = input
|
const result = input
|
||||||
.pipe(fileLengthFilter)
|
|
||||||
.pipe(filelength)
|
|
||||||
.pipe(fileLengthFilter.restore)
|
|
||||||
.pipe(filter(f => !f.stat.isDirectory()))
|
.pipe(filter(f => !f.stat.isDirectory()))
|
||||||
.pipe(productJsonFilter)
|
|
||||||
.pipe(process.env['BUILD_SOURCEVERSION'] ? es.through() : productJson)
|
|
||||||
.pipe(productJsonFilter.restore)
|
|
||||||
.pipe(filter(indentationFilter))
|
.pipe(filter(indentationFilter))
|
||||||
.pipe(indentation)
|
.pipe(indentation)
|
||||||
.pipe(filter(copyrightFilter))
|
.pipe(filter(copyrightFilter));
|
||||||
.pipe(copyrights);
|
// {{SQL CARBON EDIT}}
|
||||||
|
// .pipe(copyrights);
|
||||||
|
|
||||||
let typescript = result
|
const typescript = result
|
||||||
.pipe(filter(tslintHygieneFilter))
|
.pipe(filter(tslintFilter))
|
||||||
.pipe(formatting);
|
.pipe(formatting)
|
||||||
|
.pipe(tsl);
|
||||||
if (!process.argv.some(arg => arg === '--skip-tslint')) {
|
|
||||||
typescript = typescript.pipe(tsl);
|
|
||||||
typescript = typescript
|
|
||||||
.pipe(filter(sqlFilter)) // {{SQL CARBON EDIT}}
|
|
||||||
.pipe(sqlTsl);
|
|
||||||
}
|
|
||||||
|
|
||||||
const javascript = result
|
const javascript = result
|
||||||
.pipe(filter(eslintFilter))
|
.pipe(filter(eslintFilter))
|
||||||
.pipe(gulpeslint('src/.eslintrc'))
|
.pipe(gulpeslint('src/.eslintrc'))
|
||||||
.pipe(gulpeslint.formatEach('compact'))
|
.pipe(gulpeslint.formatEach('compact'));
|
||||||
.pipe(gulpeslint.failAfterError());
|
// {{SQL CARBON EDIT}}
|
||||||
|
// .pipe(gulpeslint.failAfterError());
|
||||||
|
|
||||||
let count = 0;
|
let count = 0;
|
||||||
return es.merge(typescript, javascript)
|
return es.merge(typescript, javascript)
|
||||||
.pipe(es.through(function (data) {
|
.pipe(es.through(function (data) {
|
||||||
count++;
|
// {{SQL CARBON EDIT}}
|
||||||
if (process.env['TRAVIS'] && count % 10 === 0) {
|
this.emit('end');
|
||||||
process.stdout.write('.');
|
|
||||||
}
|
|
||||||
this.emit('data', data);
|
|
||||||
}, function () {
|
|
||||||
process.stdout.write('\n');
|
|
||||||
|
|
||||||
const tslintResult = tsLinter.getResult();
|
|
||||||
if (tslintResult.failures.length > 0) {
|
|
||||||
for (const failure of tslintResult.failures) {
|
|
||||||
const name = failure.getFileName();
|
|
||||||
const position = failure.getStartPosition();
|
|
||||||
const line = position.getLineAndCharacter().line;
|
|
||||||
const character = position.getLineAndCharacter().character;
|
|
||||||
|
|
||||||
console.error(`${name}:${line + 1}:${character + 1}:${failure.getFailure()}`);
|
|
||||||
}
|
|
||||||
errorCount += tslintResult.failures.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
const sqlTslintResult = sqlTsLinter.getResult();
|
|
||||||
if (sqlTslintResult.failures.length > 0) {
|
|
||||||
for (const failure of sqlTslintResult.failures) {
|
|
||||||
const name = failure.getFileName();
|
|
||||||
const position = failure.getStartPosition();
|
|
||||||
const line = position.getLineAndCharacter().line;
|
|
||||||
const character = position.getLineAndCharacter().character;
|
|
||||||
|
|
||||||
console.error(`${name}:${line + 1}:${character + 1}:${failure.getFailure()}`);
|
|
||||||
}
|
|
||||||
errorCount += sqlTslintResult.failures.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (errorCount > 0) {
|
|
||||||
this.emit('error', 'Hygiene failed with ' + errorCount + ' errors. Check \'build/gulpfile.hygiene.js\'.');
|
|
||||||
} else {
|
|
||||||
this.emit('end');
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,7 +301,7 @@ function createGitIndexVinyls(paths) {
|
|||||||
return e(err);
|
return e(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
cp.exec(`git show ":${relativePath}"`, { maxBuffer: 2000 * 1024, encoding: 'buffer' }, (err, out) => {
|
cp.exec(`git show :${relativePath}`, { maxBuffer: 2000 * 1024, encoding: 'buffer' }, (err, out) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return e(err);
|
return e(err);
|
||||||
}
|
}
|
||||||
@@ -556,7 +320,7 @@ function createGitIndexVinyls(paths) {
|
|||||||
.then(r => r.filter(p => !!p));
|
.then(r => r.filter(p => !!p));
|
||||||
}
|
}
|
||||||
|
|
||||||
gulp.task('hygiene', task.series(checkPackageJSONTask, () => hygiene()));
|
gulp.task('hygiene', () => hygiene());
|
||||||
|
|
||||||
// this allows us to run hygiene as a git pre-commit hook
|
// this allows us to run hygiene as a git pre-commit hook
|
||||||
if (require.main === module) {
|
if (require.main === module) {
|
||||||
|
|||||||
53
build/gulpfile.mixin.js
Normal file
53
build/gulpfile.mixin.js
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const gulp = require('gulp');
|
||||||
|
const json = require('gulp-json-editor');
|
||||||
|
const buffer = require('gulp-buffer');
|
||||||
|
const filter = require('gulp-filter');
|
||||||
|
const es = require('event-stream');
|
||||||
|
const vfs = require('vinyl-fs');
|
||||||
|
const pkg = require('../package.json');
|
||||||
|
const cp = require('child_process');
|
||||||
|
const fancyLog = require('fancy-log');
|
||||||
|
const ansiColors = require('ansi-colors');
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
const jeditor = require('gulp-json-editor');
|
||||||
|
|
||||||
|
gulp.task('mixin', function () {
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
const updateUrl = process.env['SQLOPS_UPDATEURL'];
|
||||||
|
if (!updateUrl) {
|
||||||
|
console.log('Missing SQLOPS_UPDATEURL, skipping mixin');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const quality = process.env['VSCODE_QUALITY'];
|
||||||
|
|
||||||
|
if (!quality) {
|
||||||
|
console.log('Missing VSCODE_QUALITY, skipping mixin');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
|
let serviceUrl = 'https://sqlopsextensions.blob.core.windows.net/marketplace/v1/extensionsGallery.json';
|
||||||
|
if (quality === 'insider') {
|
||||||
|
serviceUrl = `https://sqlopsextensions.blob.core.windows.net/marketplace/v1/extensionsGallery-${quality}.json`;
|
||||||
|
}
|
||||||
|
let newValues = {
|
||||||
|
"updateUrl": updateUrl,
|
||||||
|
"quality": quality,
|
||||||
|
"extensionsGallery": {
|
||||||
|
"serviceUrl": serviceUrl
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return gulp.src('./product.json')
|
||||||
|
.pipe(jeditor(newValues))
|
||||||
|
.pipe(gulp.dest('.'));
|
||||||
|
});
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user