-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* simplify build script * fix template path * pack all projects
- Loading branch information
Oren Novotny
authored
Jun 19, 2018
1 parent
29fa48f
commit 55e967e
Showing
5 changed files
with
90 additions
and
58 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
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,29 +1,8 @@ | ||
trigger: none | ||
queue: Hosted VS2017 | ||
|
||
queue: Hosted VS2017 | ||
variables: | ||
BuildConfiguration: Release | ||
BuildPlatform: Any CPU | ||
|
||
|
||
steps: | ||
- task: BatchScript@1 | ||
inputs: | ||
filename: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\Tools\\VsDevCmd.bat" | ||
arguments: -no_logo | ||
modifyEnvironment: true | ||
displayName: Setup Environment Variables | ||
|
||
- task: PowerShell@1 | ||
inputs: | ||
scriptName: 'Ix.NET/Source/build-new.ps1' | ||
workingFolder: 'Ix.NET/Source' | ||
env: | ||
VSTS_ACCESS_TOKEN: $(System.AccessToken) | ||
displayName: Build | ||
|
||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
PathtoPublish: 'Ix.NET/Source/artifacts' | ||
ArtifactName: artifacts | ||
publishLocation: Container | ||
condition: eq(variables['system.pullrequest.isfork'], false) | ||
- template: .vsts.ix-shared.yml |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
parameters: | ||
signStep: [] | ||
|
||
steps: | ||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: build | ||
projects: Ix.NET/Source/build/setversion.csproj | ||
arguments: -c $(BuildConfiguration) | ||
displayName: Set Version | ||
condition: eq(variables['system.pullrequest.isfork'], false) | ||
|
||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: pack | ||
packagesToPack: Ix.NET/Source/**/System.Interactive*.csproj;!Ix.NET/Source/**/*.Tests*.csproj | ||
configuration: $(BuildConfiguration) | ||
packDirectory: $(Build.ArtifactStagingDirectory)\artifacts | ||
verbosityPack: Minimal | ||
displayName: Pack | ||
|
||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: test | ||
projects: Ix.NET/Source/**/*.Tests.csproj | ||
arguments: -c $(BuildConfiguration) | ||
displayName: Run Tests | ||
|
||
- ${{ parameters.signStep }} | ||
|
||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
PathtoPublish: $(Build.ArtifactStagingDirectory)\artifacts | ||
ArtifactName: artifacts | ||
publishLocation: Container | ||
condition: eq(variables['system.pullrequest.isfork'], false) |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
$currentDirectory = split-path $MyInvocation.MyCommand.Definition | ||
|
||
# See if we have the ClientSecret available | ||
if([string]::IsNullOrEmpty($Env:SignClientSecret)){ | ||
Write-Host "Client Secret not found, not signing packages" | ||
return; | ||
} | ||
|
||
dotnet tool install --tool-path . SignClient | ||
|
||
# Setup Variables we need to pass into the sign client tool | ||
|
||
$appSettings = "$currentDirectory\appsettings.json" | ||
|
||
$nupkgs = gci $Env:ArtifactDirectory\*.nupkg -recurse | Select -ExpandProperty FullName | ||
|
||
foreach ($nupkg in $nupkgs){ | ||
Write-Host "Submitting $nupkg for signing" | ||
|
||
.\SignClient 'sign' -c $appSettings -i $nupkg -r $Env:SignClientUser -s $Env:SignClientSecret -n 'Ix.NET' -d 'Ix.NET' -u 'https://github.com/dotnet/reactive' | ||
|
||
Write-Host "Finished signing $nupkg" | ||
} | ||
|
||
Write-Host "Sign-package complete" |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"SignClient": { | ||
"AzureAd": { | ||
"AADInstance": "https://login.microsoftonline.com/", | ||
"ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8", | ||
"TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e" | ||
}, | ||
"Service": { | ||
"Url": "https://codesign.dotnetfoundation.org/", | ||
"ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001" | ||
} | ||
} | ||
} |