Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFidge committed Oct 16, 2019
1 parent 8b57db9 commit 0395fa4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 131 deletions.
111 changes: 14 additions & 97 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,104 +22,21 @@ pr:
exclude:
- '*.md'

jobs:
- job: compile_test_pack_push
displayName: 'Compile, test, pack and push'
pool:
vmImage: 'VS2017-Win2016'
resources:
repositories:
- repository: templates
type: github
name: CluedIn-io/AzurePipelines.Templates
endpoint: 'CluedIn-io'

variables:
BuildConfiguration: 'Release'
Dotnet.Skip.First.Time.Experience: 'True'
testFolderPath: '$(Build.SourcesDirectory)/test'
pool:
vmImage: 'windows-latest'

steps:
# DotNet SDK
- task: DotNetCoreInstaller@0
inputs:
version: '2.2.100'
variables:
Dotnet.Skip.First.Time.Experience: 'True'
testFolderPath: '$(Build.SourcesDirectory)/test'

# Restore NuGet
- task: DotNetCoreCLI@2
displayName: 'Restore NuGet packages'
inputs:
command: 'restore'
feedsToUse: 'config'
nugetConfigPath: 'nuget.config'
verbosityRestore: 'normal'
steps:
- template: crawler.default.build.yml@templates

# GitVersion
- task: GitVersion@4
inputs:
preferBundledVersion: true

# Build
- task: DotNetCoreCLI@2
displayName: 'Build Solution'
inputs:
command: 'build'

# Unit Test
- task: DotNetCoreCLI@2
displayName: 'Run Unit tests'
inputs:
command: 'test'
projects: 'test/unit/**/*.csproj'
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) /p:CollectCoverage=true /p:Exclude="[xunit.*]*%2c[*.Test]*" --filter Unit'

# TODO restore integration tests when Docker environment is available
# # Integration Test
# - task: DotNetCoreCLI@2
# displayName: 'Run Integration tests'
# inputs:
# command: 'test'
# projects: 'test/integration/**/*.csproj'
# arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) /p:CollectCoverage=true /p:Exclude="[xunit.*]*%2c[*.Test]*" --filter Integration'

# Acceptance Test
- task: richardfennellBM.BM-VSTS-PesterRunner-Task.Pester-Task.Pester@8
displayName: 'Run Acceptance tests'
inputs:
scriptFolder: '$(testFolderPath)'
tag: Acceptance

# Pack
- task: DotNetCoreCLI@2
displayName: 'Create NuGet packages'
inputs:
command: 'pack'
packagesToPack: '**/*.csproj'
packDirectory: '$(Build.ArtifactStagingDirectory)'
versioningScheme: 'byEnvVar'
versionEnvVar: GITVERSION_NUGETVERSIONV2
includeSymbols: true

# Publish Artifacts
- task: PublishPipelineArtifact@0
displayName: 'Create Pipeline Artifact'
inputs:
artifactName: 'Nuget'
targetPath: $(Build.ArtifactStagingDirectory)

# Push NuGet packages to Develop
- task: NuGetCommand@2
displayName: 'Push to develop feed'
condition: and ( succeeded(), in(variables['Build.SourceBranch'], 'refs/heads/develop'))
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
allowPackageConflicts: true
publishVstsFeed: 'develop'
includeSymbols: true

# TODO restore once master branch creates valid packages for release
# Push NuGet packages to Release
# - task: NuGetCommand@2
# displayName: 'Push to release feed'
# condition: and ( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/master'))
# inputs:
# command: 'push'
# packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
# allowPackageConflicts: true
# publishVstsFeed: 'release'
# includeSymbols: false
- template: documentation.publish.yml@templates
16 changes: 5 additions & 11 deletions src/ExternalSearch.Providers.GoogleMaps.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
<RootNamespace>CluedIn.ExternalSearch.Providers.GoogleMaps</RootNamespace>
<AssemblyName>CluedIn.ExternalSearch.Providers.GoogleMaps</AssemblyName>
<TargetFramework>net452</TargetFramework>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<OutputPath>bin\$(Configuration)\</OutputPath>
<AssemblyTitle>ExternalSearch.Providers.GoogleMaps</AssemblyTitle>
<Company>CluedIn</Company>
<Product>ExternalSearch.Providers.GoogleMaps</Product>
<Copyright>Copyright (c) 2019 Clued In. All rights reserved.</Copyright>
<OutputPath>bin\$(Configuration)</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
Expand All @@ -27,9 +30,6 @@
<PackageReference Include="RestSharp" Version="105.2.3" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Build">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\Microsoft.Build.dll</HintPath>
</Reference>
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Net.Http" />
Expand All @@ -45,10 +45,4 @@
<Version>0.15.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Remove="_Name_ExternalSearchProvider.cs" />
<Compile Remove="Models\_Name_Response.cs" />
<Compile Remove="Properties\AssemblyInfo.cs" />
<Compile Remove="Vocabularies\_Name_Vocabulary.cs" />
</ItemGroup>
</Project>
23 changes: 0 additions & 23 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ExternalSearch.Providers.GoogleMaps")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ExternalSearch.Providers.GoogleMaps")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
Expand All @@ -22,15 +11,3 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1fcdc10b-2fbe-4f8c-9288-134d82f7af34")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

0 comments on commit 0395fa4

Please sign in to comment.