2018-04-14 00:04:22 +02:00
|
|
|
resources:
|
|
|
|
- repo: self
|
|
|
|
clean: true
|
|
|
|
queue:
|
2019-01-30 23:10:52 +01:00
|
|
|
name: Hosted Mac Internal
|
2018-04-14 00:04:22 +02:00
|
|
|
name: macOS_$(Build.SourceBranchName)_$(Build.BuildId)
|
2018-03-19 23:56:43 +01:00
|
|
|
steps:
|
|
|
|
#- task: <task type name>@<version>
|
|
|
|
# inputs:
|
|
|
|
# <task specific inputs>
|
|
|
|
# displayName: '<display name of task>'
|
|
|
|
- task: ShellScript@2
|
|
|
|
inputs:
|
|
|
|
scriptPath: 'tools/releaseBuild/setReleaseTag.sh'
|
|
|
|
args: '-ReleaseTag $(ReleaseTagVar) -Variable "ReleaseTagVar"'
|
|
|
|
displayName: 'Calculate Release Tag'
|
|
|
|
- task: ShellScript@2
|
|
|
|
inputs:
|
|
|
|
scriptPath: 'tools/installpsh-osx.sh'
|
|
|
|
displayName: 'Install pwsh'
|
|
|
|
- task: ShellScript@2
|
|
|
|
inputs:
|
|
|
|
scriptPath: 'tools/releaseBuild/macOS/createPowerShell.sh'
|
|
|
|
displayName: 'Create /PowerShell'
|
2018-11-14 02:04:39 +01:00
|
|
|
- powershell: |
|
|
|
|
Write-Host "##vso[task.setvariable variable=PowerShellRoot]/PowerShell"
|
|
|
|
git clone $env:BUILD_REPOSITORY_LOCALPATH /PowerShell
|
|
|
|
displayName: Clone PowerShell Repo to /PowerShell
|
2018-03-19 23:56:43 +01:00
|
|
|
- task: ShellScript@2
|
|
|
|
inputs:
|
|
|
|
scriptPath: 'tools/releaseBuild/macOS/PowerShellPackageVsts.sh'
|
2018-11-14 02:04:39 +01:00
|
|
|
args: '-location $(PowerShellRoot) -BootStrap'
|
2018-03-19 23:56:43 +01:00
|
|
|
displayName: 'Bootstrap VM'
|
2018-11-14 02:04:39 +01:00
|
|
|
- powershell: |
|
|
|
|
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 '
|
2018-11-06 03:02:10 +01:00
|
|
|
- powershell: |
|
|
|
|
$env:AZDEVOPSFEEDPAT = '$(AzDevOpsFeedPAT)'
|
2018-11-14 02:04:39 +01:00
|
|
|
$(Build.SourcesDirectory)/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -ReleaseTag $(ReleaseTagVar) -Destination $(System.ArtifactsDirectory) -ExtraPackage "tar" -location $(PowerShellRoot) -Build
|
2018-11-06 03:02:10 +01:00
|
|
|
$env:AZDEVOPSFEEDPAT = $null
|
2018-03-19 23:56:43 +01:00
|
|
|
displayName: 'Build and Package'
|