Skip to content

Commit 3322414

Browse files
committed
Merge branch 'release/1.0.0'
2 parents 0863c63 + 245c5d8 commit 3322414

17 files changed

+258
-60
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ Click on the build server and repository links to see the build definition or so
3636

3737
- [Documentation](https://cake-contrib.github.io/Cake.AzureDevOps)
3838

39-
## Chat Room
39+
## Discussion
4040

41-
Come join in the conversation about this addin in our Gitter Chat Room.
41+
For questions and to discuss ideas & feature requests, use the [GitHub discussions on the Cake GitHub repository](https://github.com/cake-build/cake/discussions), under the [Extension Q&A](https://github.com/cake-build/cake/discussions/categories/extension-q-a) category.
4242

43-
[![Join the chat at https://gitter.im/cake-contrib/Lobby](https://badges.gitter.im/cake-contrib/Lobby.svg)](https://gitter.im/cake-contrib/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
43+
[![Join in the discussion on the Cake repository](https://img.shields.io/badge/GitHub-Discussions-green?logo=github)](https://github.com/cake-build/cake/discussions)
4444

4545
## Contributing
4646

docs/input/_Bottom.cshtml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
<div class="github-button">
22
<a href="https://github.com/cake-contrib/Cake.AzureDevOps" target="_blank"><i class="fa fa-github"></i> GitHub</a>
33
</div>
4-
<script>
5-
((window.gitter = {}).chat = {}).options = {
6-
room: 'cake-contrib/Lobby'
7-
};
8-
</script>
9-
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
4+
<div class="github-button">
5+
<a href="https://github.com/cake-build/cake/discussions" target="_blank"><i class="fa fa-comment"></i> Discussions</a>
6+
</div>
107

118
<script type="text/javascript" src="@Context.GetLink("/assets/js/anchor.min.js")"></script>
129
<script type="text/javascript" src="@Context.GetLink("/assets/js/clipboard.min.js")"></script>

recipe.cake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Environment.SetVariableNames();
44

55
BuildParameters.SetParameters(
6-
context: Context,
6+
context: Context,
77
buildSystem: BuildSystem,
88
sourceDirectoryPath: "./src",
99
title: "Cake.AzureDevOps",
@@ -19,7 +19,7 @@ BuildParameters.PrintParameters(Context);
1919
ToolSettings.SetToolSettings(
2020
context: Context,
2121
dupFinderExcludePattern: new string[] { BuildParameters.RootDirectoryPath + "/src/Cake.AzureDevOps.Tests/**/*.cs" },
22-
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[*.Tests]* -[Shouldly]*",
22+
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Common]* -[*.Tests]* -[Cake.Testing]* -[Moq]* -[Shouldly]* -[DiffEngine]* -[EmptyFiles]*",
2323
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
2424
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");
2525

src/Cake.AzureDevOps.Tests/Cake.AzureDevOps.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
18-
<PackageReference Include="Cake.Core" Version="0.33.0" />
19-
<PackageReference Include="Cake.Testing" Version="0.33.0" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
18+
<PackageReference Include="Cake.Core" Version="1.0.0" />
19+
<PackageReference Include="Cake.Testing" Version="1.0.0" />
2020
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.143.2" />
21-
<PackageReference Include="Moq" Version="4.14.7" />
22-
<PackageReference Include="Shouldly" Version="3.0.2" />
21+
<PackageReference Include="Moq" Version="4.16.1" />
22+
<PackageReference Include="Shouldly" Version="4.0.3" />
2323
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
2424
<PackageReference Include="xunit" Version="2.4.1" />
2525
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />

src/Cake.AzureDevOps.Tests/Repos/PullRequest/CommentThread/AzureDevOpsPullRequestCommentThreadTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@ public void Should_Get_Valid_Properties()
345345
prop1.ShouldNotBeEmpty();
346346
prop1.ShouldBe("way");
347347

348-
prop2.ShouldNotBeNull();
349348
prop2.ShouldBeOfType<int>();
350349
prop2.ShouldBe(2);
351350

src/Cake.AzureDevOps/AzureDevOpsAliases.Pipelines.cs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,5 +399,42 @@ public static IEnumerable<AzureDevOpsTestRun> AzureDevOpsBuildTestRuns(
399399
new AzureDevOpsBuild(context.Log, settings, new BuildClientFactory(), new TestManagementClientFactory())
400400
.GetTestRuns();
401401
}
402+
403+
/// <summary>
404+
/// Gets Azure Pipelines build definitions for the specified settings.
405+
/// </summary>
406+
/// <param name="context">The context.</param>
407+
/// <param name="settings">Settings for getting the build definitions.</param>
408+
/// <example>
409+
/// <para>Get build definitions running on Azure DevOps Server:</para>
410+
/// <code>
411+
/// <![CDATA[
412+
/// var buildSettings =
413+
/// new AzureDevOpsBuildsSettings(
414+
/// new Uri("http://myserver:8080/defaultcollection"),
415+
/// "MyProject",
416+
/// AzureDevOpsAuthenticationNtlm());
417+
///
418+
/// var buildDefinitions =
419+
/// AzureDevOpsBuildDefinitions(
420+
/// buildSettings);
421+
/// ]]>
422+
/// </code>
423+
/// </example>
424+
/// <returns>The build definitions or an empty list of build definitions.</returns>
425+
[CakeMethodAlias]
426+
[CakeAliasCategory("Azure Pipelines")]
427+
[CakeNamespaceImport("Cake.AzureDevOps.Pipelines")]
428+
public static IEnumerable<AzureDevOpsBuildDefinition> AzureDevOpsBuildDefinitions(
429+
this ICakeContext context,
430+
AzureDevOpsBuildsSettings settings)
431+
{
432+
context.NotNull(nameof(context));
433+
settings.NotNull(nameof(settings));
434+
435+
return AzureDevOpsBuildsDefinitionHelper.GetAzureDevOpsBuildDefinitions(
436+
context.Log,
437+
settings);
438+
}
402439
}
403440
}

src/Cake.AzureDevOps/Cake.AzureDevOps.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<PropertyGroup>
88
<DebugType>full</DebugType>
99
<DebugSymbols>true</DebugSymbols>
10+
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1011
<CodeAnalysisRuleSet>..\Cake.AzureDevOps.ruleset</CodeAnalysisRuleSet>
1112
</PropertyGroup>
1213

@@ -15,13 +16,13 @@
1516
<Description>Addin for the Cake build automation system for working with Azure DevOps.</Description>
1617
<Authors>Pascal Berger</Authors>
1718
<Copyright>Copyright © Pascal Berger</Copyright>
18-
<PackageTags>Cake Script Azure-DevOps Azure-DevOps-Server</PackageTags>
19+
<PackageTags>cake cake-addin azure-devops azure-devops-server</PackageTags>
1920
<PackageIcon>icon.png</PackageIcon>
2021
<PackageProjectUrl>http://cake-contrib.github.io/Cake.AzureDevOps/</PackageProjectUrl>
2122
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2223
<RepositoryType>git</RepositoryType>
2324
<RepositoryUrl>https://github.com/cake-contrib/Cake.AzureDevOps.git</RepositoryUrl>
24-
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.AzureDevOps/releases/tag/0.5.1</PackageReleaseNotes>
25+
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.AzureDevOps/releases/tag/1.0.0</PackageReleaseNotes>
2526
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
2627
<IncludeBuildOutput>false</IncludeBuildOutput>
2728
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
@@ -36,8 +37,12 @@
3637
</PropertyGroup>
3738

3839
<ItemGroup>
39-
<PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
40-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />
40+
<PackageReference Include="Cake.Common" Version="1.0.0" PrivateAssets="All" />
41+
<PackageReference Include="Cake.Core" Version="1.0.0" PrivateAssets="All" />
42+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3">
43+
<PrivateAssets>all</PrivateAssets>
44+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
45+
</PackageReference>
4146
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
4247
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.143.2" PrivateAssets="All" />
4348
<PackageReference Include="Microsoft.VisualStudio.Services.InteractiveClient" Version="16.143.2" PrivateAssets="All" />

src/Cake.AzureDevOps/Pipelines/ArtifactResourceExtensions.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
namespace Cake.AzureDevOps.Pipelines
22
{
3+
using System;
4+
using Cake.Common.Build.AzurePipelines.Data;
35
using Microsoft.TeamFoundation.Build.WebApi;
46

57
/// <summary>
@@ -16,12 +18,17 @@ public static AzureDevOpsArtifactResource ToAzureDevOpsArtifactResource(this Art
1618
{
1719
artifactResource.NotNull(nameof(artifactResource));
1820

21+
if (!Enum.TryParse(artifactResource.Type, out AzurePipelinesArtifactType type))
22+
{
23+
throw new Exception($"Unexpected value for artifact type '{artifactResource.Type}'");
24+
}
25+
1926
return
2027
new AzureDevOpsArtifactResource
2128
{
2229
Data = artifactResource.Data,
2330
DownloadUrl = artifactResource.DownloadUrl,
24-
Type = artifactResource.Type,
31+
Type = type,
2532
Url = artifactResource.Url,
2633
Properties = artifactResource.Properties,
2734
};

src/Cake.AzureDevOps/Pipelines/AzureDevOpsArtifactResource.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace Cake.AzureDevOps.Pipelines
22
{
33
using System.Collections.Generic;
4+
using Cake.Common.Build.AzurePipelines.Data;
45

56
/// <summary>
67
/// Represents a resource associated with a <see cref="AzureDevOpsBuildArtifact" />.
@@ -20,7 +21,7 @@ public class AzureDevOpsArtifactResource
2021
/// <summary>
2122
/// Gets the type of the resource.
2223
/// </summary>
23-
public string Type { get; internal set; }
24+
public AzurePipelinesArtifactType Type { get; internal set; }
2425

2526
/// <summary>
2627
/// Gets the full http link to the resource.

src/Cake.AzureDevOps/Pipelines/AzureDevOpsBuild.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,23 +441,23 @@ public IEnumerable<AzureDevOpsBuildArtifact> GetArtifacts()
441441
/// <list type="table">
442442
/// <listheader>
443443
/// <term>Type</term>
444-
/// <description>Description</description>
444+
/// <term>Description</term>
445445
/// </listheader>
446446
/// <item>
447447
/// <term>FilePath</term>
448-
/// <description>File path type</description>
448+
/// <term>File path type</term>
449449
/// </item>
450450
/// <item>
451451
/// <term>GitRef</term>
452-
/// <description>Git reference type</description>
452+
/// <term>Git reference type</term>
453453
/// </item>
454454
/// <item>
455455
/// <term>TFVCLabel</term>
456-
/// <description>TFVC label type</description>
456+
/// <term>TFVC label type</term>
457457
/// </item>
458458
/// <item>
459459
/// <term>VersionControl</term>
460-
/// <description>Version control path type</description>
460+
/// <term>Version control path type</term>
461461
/// </item>
462462
/// </list>
463463
/// </param>

0 commit comments

Comments
 (0)