Skip to content

Commit

Permalink
Merge pull request #419 from microsoft/nasc/snap623
Browse files Browse the repository at this point in the history
Snap start 6/23
  • Loading branch information
DaeunYim authored Jun 29, 2023
2 parents 5dc803e + ebdb95e commit df71d45
Show file tree
Hide file tree
Showing 11 changed files with 508 additions and 86 deletions.
74 changes: 74 additions & 0 deletions .pipeline/insiders-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
trigger: none
pr: none
jobs:
- job: platform_matrix
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)
steps:
- template: templates/build.yml
- template: templates/code-sign.yml
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: '*.vsix'
targetFolder: '$(Build.ArtifactStagingDirectory)'
displayName: 'Copy Files'
- task: PublishBuildArtifacts@1
inputs:
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
28 changes: 28 additions & 0 deletions .pipeline/pullrequest-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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)
steps:
- template: templates/build.yml
- template: templates/code-sign.yml
128 changes: 65 additions & 63 deletions .pipeline/release-pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,66 @@
trigger: none
trigger:
- release
pr: none
pool:
vmImage: 'ubuntu-latest'

steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
displayName: 'Install Node.js'
- task: CmdLine@2
displayName: 'Installing Dependencies'
inputs:
script: |
sudo npm install -g yarn
sudo npm install -g vsce
- task: CmdLine@2
displayName: 'Building Vsix Packages'
inputs:
script: |
yarn install
yarn run compile
yarn run package
- task: EsrpCodeSigning@2
displayName: 'Code Signing'
inputs:
ConnectedServiceName: 'Database System ESRP Connector'
FolderPath: '$(Build.SourcesDirectory)'
Pattern: '*.vsix'
useMinimatch: true
signConfigType: inlineSignParams
inlineOperation: |
[
{
"KeyCode" : "CP-233016",
"OperationCode" : "OpcSign",
"Parameters" : {
"FileDigest" : "/fd SHA256"
},
"ToolName" : "sign",
"ToolVersion" : "1.0"
},
{
"KeyCode" : "CP-233016",
"OperationCode" : "OpcVerify",
"Parameters" : {},
"ToolName" : "sign",
"ToolVersion" : "1.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: '*.vsix'
targetFolder: '$(Build.ArtifactStagingDirectory)'
displayName: 'Copy Files'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: build
displayName: 'Publish Artifacts'
jobs:
- job: platform_matrix
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)
steps:
- template: templates/build.yml
- template: templates/code-sign.yml
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: '*.vsix'
targetFolder: '$(Build.ArtifactStagingDirectory)'
displayName: 'Copy Files'
- task: PublishBuildArtifacts@1
inputs:
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
138 changes: 138 additions & 0 deletions .pipeline/templates/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: 14.x
displayName: Install Node.js
- powershell: >
npm install -g yarn
npm install -g vsce
$config = @{
"downloadUrl" = "https://github.com/Microsoft/pgtoolsservice/releases/download/{#version#}/pgsqltoolsservice-{#fileName#}"
"version" = "${env:PGTOOLSSERVICE_VERSION}"
"downloadFileNames" = @{
"Windows_64" = "${env:WIN-X64}.zip"
"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"
}
"installDirectory" = "ossdbtoolsservice/{#platform#}/{#version#}"
"executableFiles" = @(
"pgsqltoolsservice/ossdbtoolsservice_main",
"pgsqltoolsservice/ossdbtoolsservice_main.exe"
)
}
$config | ConvertTo-Json -Depth 4 | Set-Content -Path "$env:BUILD_SOURCESDIRECTORY\src\config.json" -Encoding utf8
yarn install
yarn run compile
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
Loading

0 comments on commit df71d45

Please sign in to comment.