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

Use ads service donwloader instead of private version #431

Merged
merged 17 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
83 changes: 28 additions & 55 deletions .pipeline/insiders-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
trigger: none
pr: none
jobs:
- job: platform_matrix
- job: build_artifacts
displayName: Build and Publish Artifacts
strategy:
matrix:
linux:
platform: 'linux'
imageName: 'ubuntu-latest'
archiveType: 'tar'
mac-x64:
platform: 'mac-x64'
imageName: 'macOS-latest'
archiveType: 'tar'
mac-arm64:
platform: 'mac-arm64'
imageName: 'macOS-latest'
ubuntu:
platform: 'ubuntu'
imageName: 'ubuntu-latest'
archiveType: 'tar'
windows:
platform: 'windows'
imageName: 'windows-latest'
pool:
vmImage: $(imageName)
vmImage: 'windows-latest'
steps:
- template: templates/build.yml
- template: templates/code-sign.yml
Expand All @@ -39,36 +19,29 @@ jobs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: build
displayName: 'Publish Artifacts'
- job: github_release
displayName: Manage GitHub Release
dependsOn:
- platform_matrix
pool:
vmImage: windows-latest
steps:
- task: GithubRelease@1
displayName: 'Delete GitHub Release'
continueOnError: true
inputs:
gitHubConnection: azuredatastudio-postgresqlext2
repositoryName: microsoft/azuredatastudio-postgresql
action: delete
tag: '$(InsidersVersion)'
- task: DownloadBuildArtifacts@0
inputs:
buildType: current
downloadType: specific
artifactName: dist
downloadPath: $(System.ArtifactsDirectory)
- task: GithubRelease@1
displayName: Create GitHub Release
inputs:
gitHubConnection: azuredatastudio-postgresqlext2
repositoryName: microsoft/azuredatastudio-postgresql
tagSource: userSpecifiedTag
tag: $(InsidersVersion)
title: $(InsidersVersion)
changeLogType: issueBased
isPreRelease: true
assets: |
$(System.ArtifactsDirectory)/**/*.vsix
- task: GithubRelease@1
displayName: 'Delete GitHub Release'
continueOnError: true
inputs:
gitHubConnection: azuredatastudio-postgresqlext2
repositoryName: microsoft/azuredatastudio-postgresql
action: delete
tag: '$(InsidersVersion)'
- task: DownloadBuildArtifacts@1
inputs:
buildType: current
downloadType: specific
artifactName: build
downloadPath: $(System.ArtifactsDirectory)
- task: GithubRelease@1
displayName: Create GitHub Release
inputs:
gitHubConnection: azuredatastudio-postgresqlext2
repositoryName: microsoft/azuredatastudio-postgresql
tagSource: userSpecifiedTag
tag: $(InsidersVersion)
title: $(InsidersVersion)
changeLogType: issueBased
isPreRelease: true
assets: |
$(System.ArtifactsDirectory)/**/*.vsix
22 changes: 1 addition & 21 deletions .pipeline/pullrequest-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,8 @@
trigger: none
pr:
- master
strategy:
matrix:
linux:
platform: 'linux'
imageName: 'ubuntu-latest'
archiveType: 'tar'
mac-x64:
platform: 'mac-x64'
imageName: 'macOS-latest'
archiveType: 'tar'
mac-arm64:
platform: 'mac-arm64'
imageName: 'macOS-latest'
ubuntu:
platform: 'ubuntu'
imageName: 'ubuntu-latest'
archiveType: 'tar'
windows:
platform: 'windows'
imageName: 'windows-latest'
pool:
vmImage: $(imageName)
vmImage: 'windows-latest'
steps:
- template: templates/build.yml
- template: templates/code-sign.yml
65 changes: 19 additions & 46 deletions .pipeline/release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,10 @@ trigger:
- release
pr: none
jobs:
- job: platform_matrix
- job: build_artifacts
displayName: Build and Publish Artifacts
strategy:
matrix:
linux:
platform: 'linux'
imageName: 'ubuntu-latest'
archiveType: 'tar'
mac-x64:
platform: 'mac-x64'
imageName: 'macOS-latest'
archiveType: 'tar'
mac-arm64:
platform: 'mac-arm64'
imageName: 'macOS-latest'
ubuntu:
platform: 'ubuntu'
imageName: 'ubuntu-latest'
archiveType: 'tar'
windows:
platform: 'windows'
imageName: 'windows-latest'
pool:
vmImage: $(imageName)
vmImage: 'windows-latest'
steps:
- template: templates/build.yml
- template: templates/code-sign.yml
Expand All @@ -40,27 +20,20 @@ jobs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: build
displayName: 'Publish Artifacts'
- job: github_release
displayName: Manage GitHub Release
dependsOn:
- platform_matrix
pool:
vmImage: windows-latest
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: current
downloadType: specific
artifactName: dist
downloadPath: $(System.ArtifactsDirectory)
- task: GithubRelease@1
displayName: Create GitHub Release
inputs:
gitHubConnection: azuredatastudio-postgresqlext2
repositoryName: microsoft/azuredatastudio-postgresql
tagSource: userSpecifiedTag
tag: $(ReleaseVersion)
title: $(ReleaseVersion)
changeLogType: issueBased
assets: |
$(System.ArtifactsDirectory)/**/*.vsix
- task: DownloadBuildArtifacts@1
inputs:
buildType: current
downloadType: specific
artifactName: build
downloadPath: $(System.ArtifactsDirectory)
- task: GithubRelease@1
displayName: Create GitHub Release
inputs:
gitHubConnection: azuredatastudio-postgresqlext2
repositoryName: microsoft/azuredatastudio-postgresql
tagSource: userSpecifiedTag
tag: $(ReleaseVersion)
title: $(ReleaseVersion)
changeLogType: issueBased
assets: |
$(System.ArtifactsDirectory)/**/*.vsix
126 changes: 15 additions & 111 deletions .pipeline/templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ steps:
versionSpec: 14.x
displayName: Install Node.js
- powershell: >
npm cache clean --force

npm install -g yarn

npm install -g vsce
Expand All @@ -16,16 +18,19 @@ steps:
"Windows_86" = "${env:WIN-X86}.zip"
"OSX" = "${env:OSX}.tar.gz"
"OSX_ARM64" = "${env:OSX-ARM64}.tar.gz"
"Linux_64" = "${env:LINUX-X64}.tar.gz"
"Linux_86" = "${env:LINUX-X64}.tar.gz"
"Linux" = "${env:LINUX-X64}.tar.gz"
"Ubuntu_14" = "${env:LINUX-X64}.tar.gz"
"Ubuntu_16" = "${env:LINUX-X64}.tar.gz"
"CentOS_7" = "${env:LINUX-X64}.tar.gz"
"Debian_8" = "${env:LINUX-X64}.tar.gz"
"Fedora_23" = "${env:LINUX-X64}.tar.gz"
"OpenSUSE_13_2" = "${env:LINUX-X64}.tar.gz"
"RHEL_7" = "${env:LINUX-X64}.tar.gz"
"SLES_12_2" = "${env:LINUX-X64}.tar.gz"
"Ubuntu_18" = "${env:LINUX-X64}.tar.gz"
"Ubuntu_20" = "${env:LINUX-X64}.tar.gz"
"Ubuntu_22" = "${env:LINUX-X64}.tar.gz"
"Ubuntu" = "${env:LINUX-X64}.tar.gz"
"CentOS" = "${env:LINUX-X64}.tar.gz"
"Debian" = "${env:LINUX-X64}.tar.gz"
"Fedora" = "${env:LINUX-X64}.tar.gz"
"OpenSUSE" = "${env:LINUX-X64}.tar.gz"
"RHEL" = "${env:LINUX-X64}.tar.gz"
"SLES" = "${env:LINUX-X64}.tar.gz"
}
"installDirectory" = "ossdbtoolsservice/{#platform#}/{#version#}"
"executableFiles" = @(
Expand All @@ -42,106 +47,5 @@ steps:

yarn run package

yarn run package-offline-windows
displayName: Installing Dependencies and build packages windows
condition: eq(variables['platform'], 'windows')
- task: CmdLine@2
displayName: Installing Dependencies and build packages mac-x64
condition: eq(variables['platform'], 'mac-x64')
inputs:
script: |
npm install -g yarn
npm install -g vsce

config='{
"downloadUrl": "https://github.com/Microsoft/pgtoolsservice/releases/download/{#version#}/pgsqltoolsservice-{#fileName#}",
"version": "$(PGTOOLSSERVICE_VERSION)",
"downloadFileNames": {
"OSX": "$(OSX).tar.gz"
},
"installDirectory": "ossdbtoolsservice/{#platform#}/{#version#}",
"executableFiles": [
"pgsqltoolsservice/ossdbtoolsservice_main",
"pgsqltoolsservice/ossdbtoolsservice_main.exe"
]
}'
echo "$config" > "$BUILD_SOURCESDIRECTORY/src/config.json"

yarn install
yarn run compile
yarn run package-offline-osx
- task: CmdLine@2
displayName: Installing Dependencies and build packages mac-arm64
condition: eq(variables['platform'], 'mac-arm64')
inputs:
script: |
npm install -g yarn
npm install -g vsce

config='{
"downloadUrl": "https://github.com/Microsoft/pgtoolsservice/releases/download/{#version#}/pgsqltoolsservice-{#fileName#}",
"version": "$(PGTOOLSSERVICE_VERSION)",
"downloadFileNames": {
"OSX_ARM64": "$(OSX-ARM64).tar.gz"
},
"installDirectory": "ossdbtoolsservice/{#platform#}/{#version#}",
"executableFiles": [
"pgsqltoolsservice/ossdbtoolsservice_main",
"pgsqltoolsservice/ossdbtoolsservice_main.exe"
]
}'
echo "$config" > "$BUILD_SOURCESDIRECTORY/src/config.json"

yarn install
yarn run compile
yarn run package-offline-osx-arm64
- task: CmdLine@2
displayName: Installing Dependencies and build packages linux
condition: eq(variables['platform'], 'linux')
inputs:
script: |
npm install -g yarn
npm install -g vsce

config='{
"downloadUrl": "https://github.com/Microsoft/pgtoolsservice/releases/download/{#version#}/pgsqltoolsservice-{#fileName#}",
"version": "$(PGTOOLSSERVICE_VERSION)",
"downloadFileNames": {
"Linux_64": "$(LINUX-X64).tar.gz"
},
"installDirectory": "ossdbtoolsservice/{#platform#}/{#version#}",
"executableFiles": [
"pgsqltoolsservice/ossdbtoolsservice_main",
"pgsqltoolsservice/ossdbtoolsservice_main.exe"
]
}'
echo "$config" > "$BUILD_SOURCESDIRECTORY/src/config.json"

yarn install
yarn run compile
yarn run package-offline-linux
- task: CmdLine@2
displayName: Installing Dependencies and build packages ubuntu
condition: eq(variables['platform'], 'ubuntu')
inputs:
script: |
npm install -g yarn
npm install -g vsce

config='{
"downloadUrl": "https://github.com/Microsoft/pgtoolsservice/releases/download/{#version#}/pgsqltoolsservice-{#fileName#}",
"version": "$(PGTOOLSSERVICE_VERSION)",
"downloadFileNames": {
"Ubuntu_16": "$(LINUX-X64).tar.gz"
},
"installDirectory": "ossdbtoolsservice/{#platform#}/{#version#}",
"executableFiles": [
"pgsqltoolsservice/ossdbtoolsservice_main",
"pgsqltoolsservice/ossdbtoolsservice_main.exe"
]
}'
echo "$config" > "$BUILD_SOURCESDIRECTORY/src/config.json"

yarn install
yarn run compile
yarn run package-offline-ubuntu
yarn run package-offline
displayName: Installing Dependencies and build packages
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
}
},
"dependencies": {
"service-downloader": "github:daeunyim/service-downloader#0.1.1",
"@microsoft/ads-service-downloader": "^1.2.1",
"@microsoft/ads-extension-telemetry": "^1.3.4",
"crypto": "^1.0.1",
"dataprotocol-client": "github:Microsoft/sqlops-dataprotocolclient#1.3.1",
Expand All @@ -436,7 +436,8 @@
"vscode-nls": "^5.0.0",
"fstream": "^1.0.12",
"block-stream": "^0.0.9",
"graceful-fs": "4.2.4"
"graceful-fs": "4.2.4",
"eventemitter2": "^5.0.1"
},
"devDependencies": {
"@types/node": "^12.11.7",
Expand All @@ -451,7 +452,6 @@
"gulp-sourcemaps": "^3.0.0",
"gulp-tslint": "^8.1.4",
"gulp-typescript": "^5.0.1",
"gulp-untar": "0.0.8",
"tslint": "^6.1.3",
"typescript": "^4.3.5",
"vscode-nls-dev": "^3.3.1"
Expand Down
Loading