Skip to content

Commit

Permalink
add az pipepline yaml (#247)
Browse files Browse the repository at this point in the history
* add az pipepline yaml

* use az pipeline versioning

* build on vsts condition
  • Loading branch information
tg123 authored and k8s-ci-robot committed Mar 5, 2019
1 parent 5422eb0 commit e0db2ae
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 8 deletions.
74 changes: 74 additions & 0 deletions .azure-pipelines.yaml
Original file line number Diff line number Diff line change
@@ -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'



2 changes: 1 addition & 1 deletion src/KubernetesClient/KubernetesClient.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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" />
Expand Down
6 changes: 6 additions & 0 deletions tests/KubernetesClient.Tests/KubernetesClient.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
7 changes: 0 additions & 7 deletions version.json

This file was deleted.

0 comments on commit e0db2ae

Please sign in to comment.