-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Templateify full core pipeline. Create independent pipeline for oss-c…
…haracteristics
- Loading branch information
Showing
6 changed files
with
443 additions
and
460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
|
Oops, something went wrong.