2018-12-05 23:47:54 +01:00
|
|
|
parameters:
|
|
|
|
jobName: 'build_macOS'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
- job: ${{ parameters.jobName }}
|
|
|
|
displayName: Build macOS
|
|
|
|
condition: succeeded()
|
2019-01-30 23:10:52 +01:00
|
|
|
pool: Hosted Mac Internal
|
2019-03-16 19:57:17 +01:00
|
|
|
variables:
|
|
|
|
# Turn off Homebrew analytics
|
|
|
|
HOMEBREW_NO_ANALYTICS: 1
|
2020-08-10 18:07:58 +02:00
|
|
|
runCodesignValidationInjection: false
|
2018-12-05 23:47:54 +01:00
|
|
|
steps:
|
|
|
|
#- task: <task type name>@<version>
|
|
|
|
# inputs:
|
|
|
|
# <task specific inputs>
|
|
|
|
# displayName: '<display name of task>'
|
2020-10-23 20:42:24 +02:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
2019-02-01 00:10:19 +01:00
|
|
|
- template: SetVersionVariables.yml
|
|
|
|
parameters:
|
|
|
|
ReleaseTagVar: $(ReleaseTagVar)
|
|
|
|
|
2020-08-11 23:01:47 +02:00
|
|
|
- pwsh: |
|
2018-12-05 23:47:54 +01:00
|
|
|
# create folder
|
|
|
|
sudo mkdir /PowerShell
|
|
|
|
|
|
|
|
# make the current user the owner
|
|
|
|
sudo chown $env:USER /PowerShell
|
|
|
|
displayName: 'Create /PowerShell'
|
2019-02-01 00:10:19 +01:00
|
|
|
|
2020-08-11 23:01:47 +02:00
|
|
|
- pwsh: |
|
2018-12-05 23:47:54 +01:00
|
|
|
Write-Host "##vso[task.setvariable variable=PowerShellRoot]/PowerShell"
|
|
|
|
git clone $env:BUILD_REPOSITORY_LOCALPATH /PowerShell
|
|
|
|
displayName: Clone PowerShell Repo to /PowerShell
|
2019-02-01 00:10:19 +01:00
|
|
|
|
2020-08-11 23:01:47 +02:00
|
|
|
- pwsh: |
|
2018-12-05 23:47:54 +01:00
|
|
|
tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -location $(PowerShellRoot) -BootStrap
|
|
|
|
displayName: 'Bootstrap VM'
|
2019-02-01 00:10:19 +01:00
|
|
|
|
2020-08-11 23:01:47 +02:00
|
|
|
- pwsh: |
|
2018-12-05 23:47:54 +01:00
|
|
|
Import-Module $(Build.SourcesDirectory)/build.psm1 -Force
|
|
|
|
New-NugetConfigFile -NugetFeedUrl $(AzDevOpsFeed) -UserName $(AzDevOpsFeedUserName) -ClearTextPAT $(AzDevOpsFeedPAT) -FeedName AzDevOpsFeed -Destination "$(PowerShellRoot)/src/Modules"
|
|
|
|
|
|
|
|
if(-not (Test-Path "$(PowerShellRoot)/src/Modules/nuget.config"))
|
|
|
|
{
|
|
|
|
throw "nuget.config is not created"
|
|
|
|
}
|
|
|
|
displayName: 'Add nuget.config for AzDevOps feed for PSGallery modules '
|
2019-02-01 00:10:19 +01:00
|
|
|
|
2020-08-11 23:01:47 +02:00
|
|
|
- pwsh: |
|
2018-12-05 23:47:54 +01:00
|
|
|
$env:AZDEVOPSFEEDPAT = '$(AzDevOpsFeedPAT)'
|
2020-08-11 23:01:47 +02:00
|
|
|
$(Build.SourcesDirectory)/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -ReleaseTag $(ReleaseTagVar) -Destination $(System.ArtifactsDirectory) -Symbols -location $(PowerShellRoot) -Build -ArtifactName macosBinResults
|
2018-12-05 23:47:54 +01:00
|
|
|
$env:AZDEVOPSFEEDPAT = $null
|
2020-08-11 23:01:47 +02:00
|
|
|
displayName: 'Build'
|
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
|