PowerShell/tools/releaseBuild/azureDevOps/templates/mac.yml
Travis Plunk 5f7dde584f
Create unified release build for macOS and Linux packages (#8399)
Create unified release build for macOS and Linux packages
  - Also, updated the definition with latest definitions from the definitions in use.

I will work on these in future PRs:

- Add compliance Job
- Add macOS Signing step
- Merging Windows into the YAML
2018-12-05 14:47:54 -08:00

45 lines
1.8 KiB
YAML

parameters:
jobName: 'build_macOS'
jobs:
- job: ${{ parameters.jobName }}
displayName: Build macOS
condition: succeeded()
pool: Hosted macOS Preview
steps:
#- task: <task type name>@<version>
# inputs:
# <task specific inputs>
# displayName: '<display name of task>'
- powershell: |
tools/releaseBuild/setReleaseTag.ps1 -ReleaseTag $(ReleaseTagVar) -Variable "ReleaseTagVar"
displayName: 'Calculate Release Tag'
- powershell: |
# create folder
sudo mkdir /PowerShell
# make the current user the owner
sudo chown $env:USER /PowerShell
displayName: 'Create /PowerShell'
- powershell: |
Write-Host "##vso[task.setvariable variable=PowerShellRoot]/PowerShell"
git clone $env:BUILD_REPOSITORY_LOCALPATH /PowerShell
displayName: Clone PowerShell Repo to /PowerShell
- powershell: |
tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -location $(PowerShellRoot) -BootStrap
displayName: 'Bootstrap VM'
- 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 '
- powershell: |
$env:AZDEVOPSFEEDPAT = '$(AzDevOpsFeedPAT)'
$(Build.SourcesDirectory)/tools/releaseBuild/macOS/PowerShellPackageVsts.ps1 -ReleaseTag $(ReleaseTagVar) -Destination $(System.ArtifactsDirectory) -ExtraPackage "tar" -location $(PowerShellRoot) -Build
$env:AZDEVOPSFEEDPAT = $null
displayName: 'Build and Package'