Files
sqltoolsservice/azure-pipelines/release.yml
Charles Gagnon 455d3bc975 Update release pipeline to validate build artifacts hash against current source hash (#1116)
* initial

* update password and checkout

* fix param

* pull

* print

* cd

* use build secret

* older build

* Use env var

* use old secret

* use env var

* remove debug

* remove unused secret
2020-11-06 17:42:30 -08:00

67 lines
2.7 KiB
YAML

stages:
- stage: Release
jobs:
- job: Release
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: AzureKeyVault@1
displayName: 'Azure Key Vault: ado-secrets'
inputs:
azureSubscription: 'ClientToolsInfra_670062 (88d5392f-a34f-4769-b405-f597fc533613)'
KeyVaultName: 'ado-secrets'
SecretsFilter: 'github-distro-mixin-password,ado-crossplatbuildscripts-password'
- powershell: |
git clone https://$(ado-crossplatbuildscripts-password)@dev.azure.com/mssqltools/_git/CrossPlatBuildScripts
displayName: Clone CrossPlatBuildScripts
- task: DownloadPipelineArtifact@2
displayName: 'Download pipeline source artifacts'
inputs:
buildType: 'specific'
project: 'ae14e11c-7eb2-46af-b588-471e6116d635'
definition: '309'
specificBuildWithTriggering: true
buildVersionToDownload: 'latest'
artifactName: 'source'
itemPattern: '**/source.tar.gz'
targetPath: '$(Agent.TempDirectory)/source'
- task: DownloadPipelineArtifact@2
displayName: 'Download pipeline drop artifacts'
inputs:
buildType: 'specific'
project: 'ae14e11c-7eb2-46af-b588-471e6116d635'
definition: '309'
specificBuildWithTriggering: true
buildVersionToDownload: 'latest'
artifactName: 'drop'
itemPattern: '**/*'
targetPath: '$(Agent.TempDirectory)/drop'
- task: ExtractFiles@1
displayName: 'Extract files '
inputs:
archiveFilePatterns: '$(Agent.TempDirectory)/source/source.tar.gz'
destinationFolder: '$(System.DefaultWorkingDirectory)/sqltoolsservice'
- task: CopyFiles@2
displayName: 'Copy Files to: $(System.DefaultWorkingDirectory)/sqltoolsservice/artifacts/package'
inputs:
SourceFolder: '$(Agent.TempDirectory)/drop'
TargetFolder: '$(System.DefaultWorkingDirectory)/sqltoolsservice/artifacts/package'
- task: PowerShell@2
displayName: 'PowerShell Script'
inputs:
filePath: '$(System.DefaultWorkingDirectory)/CrossPlatBuildScripts/AutomatedReleases/sqltoolsserviceRelease.ps1'
arguments: '-workspace $(System.DefaultWorkingDirectory)/sqltoolsservice -minTag v3.0.0.0 -target main -tagFormat release -isPrerelease $false -artifactsBuildId $(Build.TriggeredBy.BuildId)'
workingDirectory: '$(System.DefaultWorkingDirectory)/sqltoolsservice'
env:
GITHUB_DISTRO_MIXIN_PASSWORD: $(github-distro-mixin-password)
ADO_CROSSPLATBUILDSCRIPTS_PASSWORD: $(ado-crossplatbuildscripts-password)
trigger: none
pr: none
schedules:
- cron: "0 7 * * Mon-Fri"
displayName: Mon-Fri at 7:00UTC
branches:
include:
- main