2018-12-05 23:47:54 +01:00
|
|
|
parameters:
|
|
|
|
buildName: ''
|
2019-06-27 19:21:44 +02:00
|
|
|
uploadDisplayName: 'Upload'
|
2020-06-09 03:06:48 +02:00
|
|
|
parentJob: ''
|
2018-11-05 19:35:53 +01:00
|
|
|
|
2018-12-05 23:47:54 +01:00
|
|
|
jobs:
|
|
|
|
- job: build_${{ parameters.buildName }}
|
|
|
|
displayName: Build ${{ parameters.buildName }}
|
2018-11-05 19:35:53 +01:00
|
|
|
condition: succeeded()
|
2020-11-23 23:50:00 +01:00
|
|
|
pool:
|
|
|
|
vmImage: ubuntu-16.04
|
2020-06-09 03:06:48 +02:00
|
|
|
dependsOn: ${{ parameters.parentJob }}
|
2018-12-05 23:47:54 +01:00
|
|
|
variables:
|
2020-11-23 23:50:00 +01:00
|
|
|
- name: runCodesignValidationInjection
|
|
|
|
value: false
|
|
|
|
- name: build
|
|
|
|
value: ${{ parameters.buildName }}
|
|
|
|
- group: ESRP
|
|
|
|
|
2018-11-05 19:35:53 +01:00
|
|
|
steps:
|
2020-10-23 20:42:24 +02:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
2018-11-05 19:35:53 +01:00
|
|
|
|
2020-12-07 21:11:54 +01:00
|
|
|
- checkout: ComplianceRepo
|
|
|
|
clean: true
|
|
|
|
|
2019-02-01 00:10:19 +01:00
|
|
|
- template: SetVersionVariables.yml
|
|
|
|
parameters:
|
|
|
|
ReleaseTagVar: $(ReleaseTagVar)
|
2018-11-05 19:35:53 +01:00
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Write-Verbose -Verbose "$(build)"
|
|
|
|
|
2018-12-05 23:47:54 +01:00
|
|
|
if ('$(build)' -in 'alpine', 'fxdependent' -and '$(ReleaseTagVar)' -match '6.0.*')
|
2018-11-05 19:35:53 +01:00
|
|
|
{
|
2018-12-05 23:47:54 +01:00
|
|
|
$vstsCommandString = "vso[task.setvariable variable=SkipBuild]true"
|
2018-11-05 19:35:53 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-12-05 23:47:54 +01:00
|
|
|
$vstsCommandString = "vso[task.setvariable variable=SkipBuild]false"
|
2018-11-05 19:35:53 +01:00
|
|
|
}
|
2018-12-05 23:47:54 +01:00
|
|
|
displayName: 'Skip Alpine or fxdependent for PS v6.0.*'
|
|
|
|
|
2019-02-01 19:59:01 +01:00
|
|
|
- template: insert-nuget-config-azfeed.yml
|
2018-11-05 19:35:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
- powershell: |
|
2020-11-23 23:50:00 +01:00
|
|
|
import-module "$env:REPOROOT/build.psm1"
|
2018-11-05 19:35:53 +01:00
|
|
|
Sync-PSTags -AddRemoteIfMissing
|
|
|
|
displayName: SyncTags
|
2018-12-05 23:47:54 +01:00
|
|
|
condition: and(succeeded(), ne(variables['SkipBuild'], 'true'))
|
2018-11-05 19:35:53 +01:00
|
|
|
|
|
|
|
- powershell: |
|
2020-11-23 23:50:00 +01:00
|
|
|
& "$env:REPOROOT/tools/releaseBuild/vstsbuild.ps1" -ReleaseTag $(ReleaseTagVar) -Name '$(build)'
|
2020-02-05 01:21:59 +01:00
|
|
|
|
2018-11-05 19:35:53 +01:00
|
|
|
displayName: 'Build and package'
|
2018-12-05 23:47:54 +01:00
|
|
|
condition: and(succeeded(), ne(variables['SkipBuild'], 'true'))
|
2018-11-05 19:35:53 +01:00
|
|
|
|
2018-12-05 23:47:54 +01:00
|
|
|
- job: upload_${{ parameters.buildName }}
|
2019-06-27 19:21:44 +02:00
|
|
|
displayName: ${{ parameters.uploadDisplayName }} ${{ parameters.buildName }}
|
2018-12-05 23:47:54 +01:00
|
|
|
dependsOn: build_${{ parameters.buildName }}
|
2018-11-05 19:35:53 +01:00
|
|
|
condition: succeeded()
|
2020-11-23 23:50:00 +01:00
|
|
|
pool:
|
|
|
|
vmImage: windows-latest
|
2018-12-05 23:47:54 +01:00
|
|
|
variables:
|
2020-11-23 23:50:00 +01:00
|
|
|
- name: buildName
|
|
|
|
value: ${{ parameters.buildName }}
|
|
|
|
- group: ESRP
|
|
|
|
|
2018-11-05 19:35:53 +01:00
|
|
|
steps:
|
2020-11-23 23:50:00 +01:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
|
|
|
|
- checkout: ComplianceRepo
|
|
|
|
clean: true
|
2018-11-05 19:35:53 +01:00
|
|
|
|
2019-08-28 18:44:02 +02:00
|
|
|
- template: shouldSign.yml
|
|
|
|
|
2019-02-01 00:10:19 +01:00
|
|
|
- template: SetVersionVariables.yml
|
|
|
|
parameters:
|
|
|
|
ReleaseTagVar: $(ReleaseTagVar)
|
2018-11-05 19:35:53 +01:00
|
|
|
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: 'Download Deb Artifacts'
|
|
|
|
inputs:
|
|
|
|
downloadType: specific
|
|
|
|
itemPattern: '**/*.deb'
|
|
|
|
downloadPath: '$(System.ArtifactsDirectory)\finished'
|
2018-12-05 23:47:54 +01:00
|
|
|
condition: and(eq(variables['buildName'], 'DEB'),succeeded())
|
2018-11-05 19:35:53 +01:00
|
|
|
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: 'Download tar.gz Artifacts copy'
|
|
|
|
inputs:
|
|
|
|
downloadType: specific
|
|
|
|
itemPattern: '**/*.tar.gz'
|
|
|
|
downloadPath: '$(System.ArtifactsDirectory)\finished'
|
|
|
|
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
|
|
displayName: 'Download rpm Artifacts copy'
|
|
|
|
inputs:
|
|
|
|
downloadType: specific
|
|
|
|
itemPattern: '**/*.rpm'
|
|
|
|
downloadPath: '$(System.ArtifactsDirectory)\rpm'
|
2018-12-05 23:47:54 +01:00
|
|
|
condition: and(eq(variables['buildName'], 'RPM'),succeeded())
|
2018-11-05 19:35:53 +01:00
|
|
|
|
2020-12-07 21:11:54 +01:00
|
|
|
- template: EsrpScan.yml@ComplianceRepo
|
|
|
|
parameters:
|
|
|
|
scanPath: $(System.ArtifactsDirectory)
|
|
|
|
pattern: |
|
|
|
|
**\*.rpm
|
|
|
|
**\*.deb
|
|
|
|
**\*.tar.gz
|
2020-11-23 23:50:00 +01:00
|
|
|
|
|
|
|
- ${{ if eq(variables['buildName'], 'RPM') }}:
|
|
|
|
- template: EsrpSign.yml@ComplianceRepo
|
|
|
|
parameters:
|
|
|
|
buildOutputPath: $(System.ArtifactsDirectory)\rpm
|
|
|
|
signOutputPath: $(Build.StagingDirectory)\signedPackages
|
|
|
|
certificateId: "CP-450779-Pgp"
|
|
|
|
pattern: |
|
|
|
|
**\*.rpm
|
|
|
|
useMinimatch: true
|
2020-12-09 23:51:43 +01:00
|
|
|
shouldSign: $(SHOULD_SIGN)
|
2020-11-23 23:50:00 +01:00
|
|
|
|
|
|
|
# requires windows
|
2020-07-14 21:08:45 +02:00
|
|
|
- task: AzureFileCopy@4
|
2019-02-01 19:59:01 +01:00
|
|
|
displayName: 'Upload to Azure - DEB and tar.gz'
|
2018-11-05 19:35:53 +01:00
|
|
|
inputs:
|
2020-07-15 21:45:47 +02:00
|
|
|
SourcePath: '$(System.ArtifactsDirectory)\finished\release\*'
|
2018-11-05 19:35:53 +01:00
|
|
|
azureSubscription: '$(AzureFileCopySubscription)'
|
|
|
|
Destination: AzureBlob
|
|
|
|
storage: '$(StorageAccount)'
|
|
|
|
ContainerName: '$(AzureVersion)'
|
|
|
|
|
2019-02-01 19:59:01 +01:00
|
|
|
- template: upload-final-results.yml
|
|
|
|
parameters:
|
|
|
|
artifactPath: $(System.ArtifactsDirectory)\finished\release
|
|
|
|
|
2020-11-23 23:50:00 +01:00
|
|
|
# requires windows
|
2020-07-14 21:08:45 +02:00
|
|
|
- task: AzureFileCopy@4
|
2019-06-27 19:21:44 +02:00
|
|
|
displayName: 'Upload to Azure - RPM - Unsigned'
|
2018-11-05 19:35:53 +01:00
|
|
|
inputs:
|
2020-07-15 21:45:47 +02:00
|
|
|
SourcePath: '$(System.ArtifactsDirectory)\rpm\release\*'
|
2018-11-05 19:35:53 +01:00
|
|
|
azureSubscription: '$(AzureFileCopySubscription)'
|
|
|
|
Destination: AzureBlob
|
|
|
|
storage: '$(StorageAccount)'
|
2019-06-27 19:21:44 +02:00
|
|
|
ContainerName: '$(AzureVersion)'
|
2019-08-28 18:44:02 +02:00
|
|
|
condition: and(and(succeeded(), ne(variables['SHOULD_SIGN'], 'true')),eq(variables['buildName'], 'RPM'))
|
2019-06-27 19:21:44 +02:00
|
|
|
|
2020-11-23 23:50:00 +01:00
|
|
|
# requires windows
|
2020-07-14 21:08:45 +02:00
|
|
|
- task: AzureFileCopy@4
|
2019-06-27 19:21:44 +02:00
|
|
|
displayName: 'Upload to Azure - RPM - Signed'
|
|
|
|
inputs:
|
2020-07-15 21:45:47 +02:00
|
|
|
SourcePath: '$(Build.StagingDirectory)\signedPackages\*'
|
2019-06-27 19:21:44 +02:00
|
|
|
azureSubscription: '$(AzureFileCopySubscription)'
|
|
|
|
Destination: AzureBlob
|
|
|
|
storage: '$(StorageAccount)'
|
|
|
|
ContainerName: '$(AzureVersion)'
|
2019-08-28 18:44:02 +02:00
|
|
|
condition: and(and(succeeded(), eq(variables['SHOULD_SIGN'], 'true')),eq(variables['buildName'], 'RPM'))
|
2019-02-01 19:59:01 +01:00
|
|
|
|
|
|
|
- template: upload-final-results.yml
|
|
|
|
parameters:
|
|
|
|
artifactPath: $(System.ArtifactsDirectory)\rpm\release
|
2019-08-28 18:44:02 +02:00
|
|
|
condition: and(and(succeeded(), ne(variables['SHOULD_SIGN'], 'true')),eq(variables['buildName'], 'RPM'))
|
2019-06-27 19:21:44 +02:00
|
|
|
|
|
|
|
- template: upload-final-results.yml
|
|
|
|
parameters:
|
|
|
|
artifactPath: '$(Build.StagingDirectory)\signedPackages'
|
2019-08-28 18:44:02 +02:00
|
|
|
condition: and(and(succeeded(), eq(variables['SHOULD_SIGN'], 'true')),eq(variables['buildName'], 'RPM'))
|
2019-03-29 23:18:55 +01:00
|
|
|
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
|
|
displayName: 'Component Detection'
|
|
|
|
inputs:
|
|
|
|
sourceScanPath: '$(Build.SourcesDirectory)'
|
|
|
|
snapshotForceEnabled: true
|