Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize pipelines #8520

Merged
merged 88 commits into from
Dec 7, 2019
Merged
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
e937ead
add remote build to the pipeline
Nov 27, 2019
05b32fe
Merge branch 'master' into remotebuild
Nov 27, 2019
13414bf
add a separte compile step
Nov 27, 2019
19854d7
Merge remote-tracking branch 'origin/remotebuild' into pipelines/opti…
Nov 27, 2019
4b293ec
fix darwin build
Nov 27, 2019
8aa4416
add linux container and fix docker creation
Nov 27, 2019
de17d62
fix distro
Nov 27, 2019
fed2964
remove system install and add xvfb start
Nov 27, 2019
c0589ca
distro
Nov 28, 2019
c9583d6
add logic to only run tests on hosted machine
Nov 28, 2019
a803125
fix yml
Nov 28, 2019
7c155e6
fix yml
Nov 28, 2019
28cac6d
add linux docker container
Nov 28, 2019
d5cba69
fix docker file
Nov 28, 2019
852f7a8
fixdocker
Nov 28, 2019
d269726
fix darwin
Nov 28, 2019
67171e5
fix linux build
Nov 28, 2019
02450f6
add cache salt to npm cache
Nov 28, 2019
5780c6d
intentially ignore kerberos binaries
Nov 28, 2019
f5aedc1
disable docker for now
Nov 28, 2019
8038e96
remove vsix from win32
Nov 28, 2019
df6abea
Merge branch 'master' into pipelines/optimize
Nov 28, 2019
2a822e3
fix linxu and win32
Nov 28, 2019
643a18d
fix linux and win32
Nov 28, 2019
82ba49d
fix linux and win32
Nov 28, 2019
b910f94
fix linux
Nov 28, 2019
4d2220d
maybe fix win32
Nov 28, 2019
a97dee6
fix linux
Nov 28, 2019
a43d363
fix linux image; disable server package for noe
Nov 28, 2019
69a49b5
fix minimatch for win32 test
Nov 28, 2019
0bca8a5
fix linux build
Nov 28, 2019
cb354f9
add back in docker
Nov 30, 2019
fe62a0b
fix test
Nov 30, 2019
c1045f4
use tmp directory insteado workspace
Nov 30, 2019
e6b356c
change name of docker image
Nov 30, 2019
5ed8ccb
try a differnt folder
Nov 30, 2019
e8a7d63
fix download
Nov 30, 2019
4741ed7
add a git clean step
Dec 1, 2019
3f889bb
bump cache
Dec 1, 2019
4eeee57
fix issues with builidng
Dec 1, 2019
7bb098f
readd windows build, revert signing changes
Dec 1, 2019
84a07a8
simplify win32 server packaage
Dec 1, 2019
5966a47
some more optimizations
Dec 1, 2019
4af1f69
use decompress task
Dec 1, 2019
7a859c2
add back in install for windows test
Dec 1, 2019
99b9ee5
fix linux build
Dec 1, 2019
f8bf92e
Merge branch 'master' into pipelines/optimize
Dec 2, 2019
2e032eb
add integration test to bat file
Dec 2, 2019
9b92a1f
make platform the same
Dec 2, 2019
a9f1a90
add copy extension to windows test
Dec 3, 2019
95dc9a1
Merge branch 'master' into pipelines/optimize
Dec 3, 2019
ac73f77
revert tests back
Dec 4, 2019
dd931f2
fix vsix drop aquasition
Dec 4, 2019
2f9737f
fix download
Dec 4, 2019
44688e8
fix dependent on for release
Dec 4, 2019
79e82d0
just downlaod everything which makes it easier
Dec 4, 2019
e94743c
add logic to install extensions for integration tests
Dec 5, 2019
f53fb53
fix extension install
Dec 5, 2019
f47c05c
ad dep on linux
Dec 5, 2019
357a17f
Merge branch 'master' into pipelines/optimize
Dec 5, 2019
f55b31b
Merge branch 'pipelines/optimize' into pipelines/optimize_installexte…
Dec 5, 2019
3842f2a
add more options to integration extension install
Dec 5, 2019
84ad246
add verbose to installer copy
Dec 5, 2019
b1d6023
fix ip rate issues
Dec 5, 2019
1ece09c
fix bat file for including extensions
Dec 5, 2019
a572070
move echo
Dec 5, 2019
446a550
add windows test condition
Dec 5, 2019
cf951aa
use powershell cmdlet rather than cp
Dec 5, 2019
e7282c8
remove verbose
Dec 5, 2019
a8941c1
Merge branch 'master' into pipelines/optimize
Dec 5, 2019
3064f24
Merge remote-tracking branch 'origin/master' into pipelines/optimize
Dec 5, 2019
0799dc0
remove compiling of extensions
Dec 5, 2019
17e558a
Merge branch 'pipelines/optimize' of github.com:Microsoft/azuredatast…
Dec 6, 2019
3af7030
fix copy item
Dec 6, 2019
bd5401f
move back to using cp
Dec 6, 2019
110b101
fix copy
Dec 6, 2019
41681a3
lets try this again
Dec 6, 2019
ca8e920
i guess try the copy files task
Dec 6, 2019
4f30d8c
Merge remote-tracking branch 'origin/master' into pipelines/optimize
Dec 7, 2019
f03f9a6
Merge branch 'pipelines/optimize' into pipelines/optimize_installexte…
Dec 7, 2019
381191a
fix extension install
Dec 7, 2019
36fba56
add better logic for installing extensions
Dec 7, 2019
dbd72ec
testing
Dec 7, 2019
dc72059
ok this should work
Dec 7, 2019
8b05b69
use production cli
Dec 7, 2019
3a94317
fix liveshare vscodeignore
Dec 7, 2019
06e722e
fix integration test script
Dec 7, 2019
0eb24b8
revert changes to integration tests to fix them
Dec 7, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/.cachesalt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2019-08-30T20:24:23.714Z
2019-12-01T02:20:58.491Z
43 changes: 35 additions & 8 deletions build/azure-pipelines/darwin/sql-product-build-darwin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
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'
Expand All @@ -7,12 +27,6 @@ steps:
inputs:
versionSpec: '1.x'

- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
keyfile: '.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'

- task: AzureKeyVault@1
displayName: 'Azure Key Vault: Get Secrets'
inputs:
Expand All @@ -39,6 +53,12 @@ steps:
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
Expand All @@ -47,7 +67,7 @@ steps:

- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
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'))
Expand All @@ -70,7 +90,10 @@ steps:

- script: |
set -e
yarn gulp vscode-darwin-min
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

- task: ArchiveFiles@2 # WHY ARE WE DOING THIS?
Expand Down Expand Up @@ -139,6 +162,10 @@ steps:
timeoutInMinutes: 20
continueOnError: true

- script: |
pushd .. && mv azuredatastudio-reh-darwin azuredatastudio-server-darwin && zip -Xry $(Build.ArtifactStagingDirectory)/azuredatastudio-server-darwin.zip azuredatastudio-server-darwin && popd
displayName: 'Package server'

- script: | # WHY ARE WE DOING THIS?
set -e
PACKAGEJSON=`ls $(Build.SourcesDirectory)/package.json`
Expand Down
16 changes: 16 additions & 0 deletions build/azure-pipelines/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#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
20 changes: 20 additions & 0 deletions build/azure-pipelines/linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#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

#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

ADD ./xvfb.init /etc/init.d/xvfb
RUN chmod +x /etc/init.d/xvfb
RUN update-rc.d xvfb defaults
75 changes: 54 additions & 21 deletions build/azure-pipelines/linux/sql-product-build-linux.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
steps:
- task: NodeTool@0
- 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:
versionSpec: '10.15.1'
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
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
displayName: 'System Installs'
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:
Expand Down Expand Up @@ -44,7 +54,7 @@ steps:

- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
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'

Expand All @@ -56,7 +66,7 @@ steps:

- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
inputs:
keyfile: '.yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock, !samples/**/yarn.lock'
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'))
Expand All @@ -75,25 +85,26 @@ steps:
- script: |
set -e
yarn gulp install-sqltoolsservice
displayName: Install sqltoolsservice

- script: |
set -e
yarn gulp install-ssmsmin
displayName: Install ssmsmin
displayName: Install extension binaries

- script: |
set -e
yarn gulp vscode-linux-x64-min
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

- script: |
set -e
yarn gulp compile-extensions
displayName: Compile Extensions
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

Expand All @@ -110,11 +121,19 @@ steps:
PathtoPublish: '$(Build.BinariesDirectory)/source.tar.gz'
ArtifactName: source

- script: DISPLAY=:10 ./scripts/test-extensions-unit.sh
- script: |
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: DISPLAY=:10 ./scripts/test-extensions-unit-unstable.sh
- script: |
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'))
Expand Down Expand Up @@ -156,6 +175,20 @@ steps:
SourceFolder: '$(Build.SourcesDirectory)/../vsix'
TargetFolder: '$(Build.ArtifactStagingDirectory)/vsix'

- script: |
set -e
docker build -t azuredatastudio-server -f build/azure-pipelines/docker/Dockerfile $(agent.builddirectory)/azuredatastudio-reh-linux-x64
docker save azuredatastudio-server | gzip > azuredatastudio-server-docker.tar.gz
anthonydresser marked this conversation as resolved.
Show resolved Hide resolved
cp azuredatastudio-server-docker.tar.gz $(Build.ArtifactStagingDirectory)
displayName: "Create docker image"

- script: |
set -e
cd $(agent.builddirectory)
tar --owner=0 --group=0 -czf azuredatastudio-server-linux-x64.tar.gz azuredatastudio-reh-linux-x64
cp azuredatastudio-server-linux-x64.tar.gz $(Build.ArtifactStagingDirectory)
displayName: 'Package server'

- script: | # WHY ARE WE DOING THIS?
set -e
PACKAGEJSON="$(Build.SourcesDirectory)/package.json"
Expand Down
35 changes: 30 additions & 5 deletions build/azure-pipelines/sql-product-build.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,53 @@
resources:
containers:
- container: linux-x64
image: sqltoolscontainers.azurecr.io/linux-build-agent:x64
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
timeoutInMinutes: 90
cancelTimeoutInMinutes: 5

- 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:
name: mssqltools
vmImage: VS2017-Win2016
dependsOn:
- Compile
steps:
- template: win32/sql-product-build-win32.yml
timeoutInMinutes: 90
cancelTimeoutInMinutes: 5

- job: Windows_Test
condition: eq(variables['VSCODE_BUILD_WIN32'], 'true')
pool:
name: mssqltools
dependsOn:
- 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'))))
Expand Down
Loading