forked from Augurk/Augurk
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Augurk#10 from jmezach/master
Adding a command line tool for publishing feature files
- Loading branch information
Showing
20 changed files
with
938 additions
and
66 deletions.
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
integration/tfs-build-task/PublishFeaturesToAugurk/PublishFeaturesToAugurk.ps1
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,56 @@ | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Mandatory=$true)][string] $features, | ||
[Parameter(Mandatory=$true)][string] $connectedServiceName, | ||
[Parameter(Mandatory=$true)][string] $branchName, | ||
[Parameter(Mandatory=$true)][string] $groupName, | ||
[Parameter(Mandatory=$true)][string] $clearGroup, | ||
[Parameter(Mandatory=$true)][string] $language | ||
) | ||
|
||
$clearGroupBool = [System.Convert]::ToBoolean($clearGroup) | ||
|
||
Write-Verbose "Entering script PublishFeaturesToAugurk.ps1" | ||
Write-Verbose "Features = $features" | ||
Write-Verbose "Connected Service Name = $connectedServiceName" | ||
Write-Verbose "Branch Name = $branchName" | ||
Write-Verbose "Group Name = $groupName" | ||
Write-Verbose "Clear Group = $clearGroupBool" | ||
Write-Verbose "Language = $language" | ||
|
||
# Import the Task.Common dll that has all the cmdlets we need for Build | ||
Import-Module "Microsoft.TeamFoundation.DistributedTask.Task.Common" | ||
|
||
# Resolve the set of solutions we need to process | ||
if ($features.Contains("*") -or $features.Contains("?")) { | ||
Write-Verbose "Pattern found in features parameter." | ||
Write-Verbose "Find-Files -SearchPattern $features" | ||
$featureFiles = Find-Files -SearchPattern $features | ||
Write-Verbose "featureFiles = $featureFiles" | ||
} else { | ||
Write-Verbose "No pattern found in features parameter." | ||
$featureFiles = ,$features | ||
} | ||
|
||
# Get the endpoint to Augurk | ||
$connectedService = Get-ServiceEndpoint -Name "$connectedServiceName" -Context $distributedTaskContext | ||
$augurkUri = $connectedService.Url | ||
|
||
# Make sure that the branch name doesn't contain a slash | ||
if ($branchName.Contains("/")) { | ||
# And if it does, just use the last section | ||
$branchName = Split-Path $branchName -Leaf | ||
} | ||
|
||
# Determine the command line arguments to pass to the tool | ||
$augurkExe = "$PSScriptRoot\tool\augurk.exe" | ||
$arguments = @("publish", "--featureFiles=$($featureFiles -join ',')", "--branchName=$branchName", "--groupName=$groupName", "--url=$augurkUri") | ||
if ($clearGroup) { | ||
$arguments += @("--clearGroup") | ||
} | ||
|
||
# Invoke the tool | ||
Write-Output "& $augurkExe $arguments" | ||
& $augurkExe $arguments | ||
|
||
Write-Verbose "Leaving script PublishFeaturesToAugurk.ps1" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions
79
integration/tfs-build-task/PublishFeaturesToAugurk/task.json
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,79 @@ | ||
{ | ||
"id": "304DF4EB-62E8-450C-9D79-8F186798F803", | ||
"name": "PublishFeaturesToAugurk", | ||
"friendlyName": "Publish Features To Augurk", | ||
"description": "Publishes Gherkin .feature files to Augurk.", | ||
"category": "Utility", | ||
"author": "Jonathan Mezach", | ||
"version": { | ||
"Major": 0, | ||
"Minor": 1, | ||
"Patch": 7 | ||
}, | ||
"instanceNameFormat": "Publish features from $(features) to Augurk", | ||
"groups": [ | ||
{ | ||
"name": "advanced", | ||
"displayName": "Advanced", | ||
"isExpanded": false | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"name": "features", | ||
"type": "filePath", | ||
"label": "Feature(s)", | ||
"defaultValue": "**\\*.feature", | ||
"required": true, | ||
"helpMarkDown": "Relative path from repo root of the feature file(s) to publish. Wildcards can be used. For example, `**\\*.feature` for all feature files in all sub folders." | ||
}, | ||
{ | ||
"name": "connectedServiceName", | ||
"type": "connectedService:Generic", | ||
"label": "Augurk Instance", | ||
"defaultValue": "", | ||
"required": true, | ||
"helpMarkDown": "Augurk instance to which the features should be published." | ||
}, | ||
{ | ||
"name": "branchName", | ||
"type": "string", | ||
"label": "Branch Name", | ||
"defaultValue": "", | ||
"required": true, | ||
"helpMarkDown": "Name of the branch under which the features should be published to Augurk." | ||
}, | ||
{ | ||
"name": "groupName", | ||
"type": "string", | ||
"label": "Group Name", | ||
"defaultValue": "", | ||
"required": true, | ||
"helpMarkDown": "Name of the group under which the features should be published to Augurk." | ||
}, | ||
{ | ||
"name": "clearGroup", | ||
"type": "boolean", | ||
"label": "Clear Group", | ||
"defaultValue": false, | ||
"required": true, | ||
"helpMarkDown": "Indicates whether the group should be cleared of existing features when new features are published." | ||
}, | ||
{ | ||
"name": "language", | ||
"type": "string", | ||
"label": "Language", | ||
"defaultValue": "en-US", | ||
"required": true, | ||
"helpMarkDown": "Language in which the feature files have been written. For example: `en-US` or `nl-NL`.", | ||
"groupName": "advanced" | ||
} | ||
], | ||
"execution": { | ||
"PowerShell": { | ||
"target": "$(currentDirectory)\\PublishFeaturesToAugurk.ps1", | ||
"argumentFormat": "", | ||
"workingDirectory": "$(currentDirectory)" | ||
} | ||
} | ||
} |
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
Binary file not shown.
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,11 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Microsoft.AspNet.WebApi.Client" version="5.1.1" targetFramework="net45" /> | ||
<package id="Microsoft.AspNet.WebApi.Core" version="5.1.1" targetFramework="net45" /> | ||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.1.1" targetFramework="net45" /> | ||
<package id="Microsoft.Owin" version="2.1.0" targetFramework="net45" /> | ||
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" /> | ||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" /> | ||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" /> | ||
<package id="Microsoft.AspNet.WebApi.Owin" version="5.2.3" targetFramework="net45" /> | ||
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" /> | ||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" /> | ||
<package id="Owin" version="1.0" targetFramework="net45" /> | ||
<package id="RavenDB.Client" version="3.0.3528" targetFramework="net45" /> | ||
<package id="RavenDB.Database" version="3.0.3528" targetFramework="net45" /> | ||
<package id="RavenDB.Client" version="3.0.3690" targetFramework="net45" /> | ||
<package id="RavenDB.Database" version="3.0.3690" targetFramework="net45" /> | ||
</packages> |
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,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<configSections> | ||
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" /> | ||
</configSections> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | ||
</startup> | ||
<specFlow> | ||
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --> | ||
</specFlow></configuration> |
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,118 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{3D0E1E13-76C3-4CB7-B864-0F3D93672144}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Augurk.CommandLine</RootNamespace> | ||
<AssemblyName>augurk</AssemblyName> | ||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<PublishUrl>publish\</PublishUrl> | ||
<Install>true</Install> | ||
<InstallFrom>Disk</InstallFrom> | ||
<UpdateEnabled>false</UpdateEnabled> | ||
<UpdateMode>Foreground</UpdateMode> | ||
<UpdateInterval>7</UpdateInterval> | ||
<UpdateIntervalUnits>Days</UpdateIntervalUnits> | ||
<UpdatePeriodically>false</UpdatePeriodically> | ||
<UpdateRequired>false</UpdateRequired> | ||
<MapFileExtensions>true</MapFileExtensions> | ||
<ApplicationRevision>0</ApplicationRevision> | ||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion> | ||
<IsWebBootstrapper>false</IsWebBootstrapper> | ||
<UseApplicationTrust>false</UseApplicationTrust> | ||
<BootstrapperEnabled>true</BootstrapperEnabled> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="TechTalk.SpecFlow, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\SpecFlow.1.9.0\lib\net35\TechTalk.SpecFlow.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="TechTalk.SpecFlow.Generator, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\SpecFlow.CustomPlugin.1.9.0\lib\net40\TechTalk.SpecFlow.Generator.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="TechTalk.SpecFlow.Parser, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\SpecFlow.CustomPlugin.1.9.0\lib\net40\TechTalk.SpecFlow.Parser.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="TechTalk.SpecFlow.Utils, Version=1.9.0.77, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL"> | ||
<HintPath>..\packages\SpecFlow.CustomPlugin.1.9.0\lib\net40\TechTalk.SpecFlow.Utils.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Commands\PublishCommand.cs" /> | ||
<Compile Include="Extensions\SpecFlowEntityExtensions.cs" /> | ||
<Compile Include="Options\GlobalOptions.cs" /> | ||
<Compile Include="Options\PublishOptions.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<BootstrapperPackage Include=".NETFramework,Version=v4.5"> | ||
<Visible>False</Visible> | ||
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName> | ||
<Install>true</Install> | ||
</BootstrapperPackage> | ||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> | ||
<Visible>False</Visible> | ||
<ProductName>.NET Framework 3.5 SP1</ProductName> | ||
<Install>false</Install> | ||
</BootstrapperPackage> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\Augurk.Entities\Augurk.Entities.csproj"> | ||
<Project>{8ea75685-a3a8-4852-b0a5-b067d4290382}</Project> | ||
<Name>Augurk.Entities</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
Oops, something went wrong.