Skip to content

Commit

Permalink
Templateify full core pipeline. Create independent pipeline for oss-c…
Browse files Browse the repository at this point in the history
…haracteristics
  • Loading branch information
gfs committed Jun 1, 2020
1 parent 25485b6 commit 70d2c29
Show file tree
Hide file tree
Showing 6 changed files with 443 additions and 460 deletions.
71 changes: 53 additions & 18 deletions Pipelines/build-oss-component-mac-linux.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,56 @@
parameters:
projects: []
project: string

steps:
- ${{ each project in parameters.projects}}:
- task: DotNetCoreCLI@2
displayName: ${{ project}} - Dotnet Publish Linux x64
inputs:
command: 'publish'
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)/linux/OSSGadget_$(ReleaseVersion)/${{ project }} -r linux-x64'
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(SolutionDirectory)/${{ project }}
- task: DotNetCoreCLI@2
displayName: ${{ project}} - Dotnet Publish MacOS x64
inputs:
command: 'publish'
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)/macos/OSSGadget_$(ReleaseVersion)/${{ project }} -r osx-x64'
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(SolutionDirectory)/${{ project }}
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.1.x'
- script: 'dotnet tool install -g nbgv'
displayName: 'Install GitVersioning'
- task: PowerShell@2
displayName: Set Release Version
inputs:
targetType: 'inline'
script: |
$version = (nbgv get-version -v AssemblyInformationalVersion).split('+')[0]
Write-Host "##vso[task.setvariable variable=ReleaseVersion;]$version"
- task: DotNetCoreCLI@2
displayName: ${{ project}} - Dotnet Publish Linux x64
inputs:
command: 'publish'
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)/linux/OSSGadget_$(ReleaseVersion)/${{ parameters.project }} -r linux-x64'
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(SolutionDirectory)/${{ parameters.project }}
- task: DotNetCoreCLI@2
displayName: ${{ project}} - Dotnet Publish MacOS x64
inputs:
command: 'publish'
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)/macos/OSSGadget_$(ReleaseVersion)/${{ parameters.project }} -r osx-x64'
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(SolutionDirectory)/${{ parameters.project }}
- task: ArchiveFiles@2
displayName: Archive Artifact - Linux
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)/linux/'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.StagingDirectory)/OSSGadget_linux_$(ReleaseVersion)-${{ parameters.project }}.zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
displayName: Archive Artifact - MacOS
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)/macos/'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.StagingDirectory)/OSSGadget_macos_$(ReleaseVersion)-${{ parameters.project }}.zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
displayName: Store Linux & Mac Archives
inputs:
PathtoPublish: '$(Build.StagingDirectory)'
ArtifactName: 'Unsigned_Nix'
publishLocation: 'Container'
82 changes: 64 additions & 18 deletions Pipelines/build-oss-component-windows-nuget.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,67 @@
parameters:
projects: []
project: string

steps:
- ${{ each project in parameters.projects}}:
- task: DotNetCoreCLI@2
displayName: ${{ project}} - Dotnet Publish Windows x64
inputs:
command: 'publish'
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)\win-x64\OSSGadget_$(ReleaseVersion)\${{ project }} -r win-x64'
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(SolutionDirectory)/${{ project }}
- task: DotNetCoreCLI@2
displayName: ${{ project}} - Dotnet Build .NET Core App
inputs:
command: 'build'
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)\netcoreapp\OSSGadget_$(ReleaseVersion)\${{ project }}'
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(SolutionDirectory)/${{ project }}
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.1.x'
- script: 'dotnet tool install -g nbgv'
displayName: 'Install GitVersioning'
- task: PowerShell@2
displayName: Set Release Version
inputs:
targetType: 'inline'
script: |
$version = (nbgv get-version -v AssemblyInformationalVersion).split('+')[0]
Write-Host "##vso[task.setvariable variable=ReleaseVersion;]$version"
- task: DotNetCoreCLI@2
displayName: ${{ project}} - Dotnet Publish Windows x64
inputs:
command: 'publish'
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)\win-x64\OSSGadget_$(ReleaseVersion)\${{ project }} -r win-x64'
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(SolutionDirectory)/${{ project }}
- task: DotNetCoreCLI@2
displayName: ${{ project}} - Dotnet Build .NET Core App
inputs:
command: 'build'
arguments: '-c $(BuildConfiguration) -o $(Build.BinariesDirectory)\netcoreapp\OSSGadget_$(ReleaseVersion)\${{ project }}'
publishWebProjects: false
zipAfterPublish: false
workingDirectory: $(SolutionDirectory)/${{ project }}
- task: AntiMalware@3
displayName: Anti-Malware Scan
inputs:
InputType: 'Basic'
ScanType: 'CustomScan'
FileDirPath: '$(Build.BinariesDirectory)'
EnableServices: true
SupportLogOnError: false
TreatSignatureUpdateFailureAs: 'Warning'
SignatureFreshness: 'UpToDate'
TreatStaleSignatureAs: 'Warning'
- task: ArchiveFiles@2
displayName: Archive Artifact - Windows x64
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)\win-x64\'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.StagingDirectory)\OSSGadget_win-x64_$(ReleaseVersion)-${{ project }}.zip'
replaceExistingArchive: true
- task: ArchiveFiles@2
displayName: Archive Artifact - .NET Core App
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)\netcoreapp\'
includeRootFolder: true
archiveType: 'zip'
archiveFile: '$(Build.StagingDirectory)\OSSGadget_netcoreapp_$(ReleaseVersion)-${{ project }}.zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
displayName: Store Windows, NetCoreApp, Nupkg Archives
inputs:
PathtoPublish: '$(Build.StagingDirectory)'
ArtifactName: 'Unsigned_WinNuget'
publishLocation: 'Container'

Loading

0 comments on commit 70d2c29

Please sign in to comment.