add az pipepline yaml (#247)
* add az pipepline yaml * use az pipeline versioning * build on vsts condition
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
5422eb0bcc
commit
e0db2ae8bd
74
.azure-pipelines.yaml
Normal file
74
.azure-pipelines.yaml
Normal file
@@ -0,0 +1,74 @@
|
||||
jobs:
|
||||
|
||||
- job: Build
|
||||
pool:
|
||||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
|
||||
steps:
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'dotnet restore'
|
||||
inputs:
|
||||
command: restore
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'dotnet build'
|
||||
inputs:
|
||||
projects: '**/*.sln'
|
||||
|
||||
# - task: MSBuild@1
|
||||
# displayName: 'Build solution **/*.sln'
|
||||
# inputs:
|
||||
# msbuildArchitecture: x64
|
||||
|
||||
# configuration: Release
|
||||
|
||||
# - task: VSTest@2
|
||||
# displayName: 'VsTest - testAssemblies'
|
||||
# inputs:
|
||||
# testAssemblyVer2: |
|
||||
# tests\**\*Tests*.dll
|
||||
# !**\obj\**
|
||||
|
||||
# codeCoverageEnabled: true
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'dotnet test'
|
||||
inputs:
|
||||
command: test
|
||||
projects: tests\**\*.csproj
|
||||
arguments: /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
|
||||
|
||||
- task: PublishCodeCoverageResults@1
|
||||
displayName: 'publish coverage results'
|
||||
inputs:
|
||||
codeCoverageTool: 'cobertura'
|
||||
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.cobertura.xml'
|
||||
|
||||
- task: alanwales.resharper-code-analysis.custom-build-task.ResharperCli@1
|
||||
displayName: 'Automated code quality checks'
|
||||
inputs:
|
||||
SolutionOrProjectPath: 'kubernetes-client.sln'
|
||||
|
||||
FailBuildOnCodeIssues: false
|
||||
|
||||
continueOnError: true
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: 'dotnet pack'
|
||||
inputs:
|
||||
command: pack
|
||||
packagesToPack: src/KubernetesClient/KubernetesClient.csproj
|
||||
packDirectory: '$(Build.ArtifactStagingDirectory)/nupkg'
|
||||
majorVersion: 1
|
||||
minorVersion: 4
|
||||
versioningScheme: byPrereleaseNumber
|
||||
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: drop'
|
||||
inputs:
|
||||
PathtoPublish: '$(build.artifactstagingdirectory)/nupkg'
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<PackageTags>kubernetes;docker;containers;</PackageTags>
|
||||
|
||||
<TargetFrameworks>netstandard1.4;net452;netcoreapp2.1;xamarinios10;monoandroid81</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(TF_BUILD)' == 'True'">netstandard1.4;net452;netcoreapp2.1</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard1.4;netcoreapp2.1</TargetFrameworks>
|
||||
<RootNamespace>k8s</RootNamespace>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
@@ -20,7 +21,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="1.1.2" />
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="2.2.33" PrivateAssets="all" />
|
||||
<PackageReference Include="Portable.BouncyCastle" Version="1.8.1.3" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="1.1.2" />
|
||||
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.10" />
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
<PackageReference Include="coverlet.msbuild" Version="2.2.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
|
||||
<PackageReference Include="xunit" Version="2.3.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" NoWarn="NU1701" />
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
|
||||
"version": "1.4",
|
||||
"publicReleaseRefSpec": [
|
||||
"^refs/heads/master$", // we release out of master
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user