Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 8bb70a1

Browse files
authored
Release Preparation (#663)
* update vulnerable package * update dependencies and get rid of unused * 1) find tests from pipeline step; 2) fix publishing artifacts * update publish task * not publishing web project Co-authored-by: Dmitrii Korolev <dmkorolev@microsoft.com>
1 parent fab3cbc commit 8bb70a1

File tree

6 files changed

+19
-36
lines changed

6 files changed

+19
-36
lines changed

.azure-pipelines/main.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,14 @@ stages:
6161
command: 'test'
6262
arguments: '--configuration $(configuration) --collect "Code coverage"'
6363
publishTestResults: true
64-
projects: 'tests/**/*.test.csproj'
64+
projects: 'tests/**/*Tests/*.csproj'
6565

66-
- pwsh: |
67-
Get-ChildItem -Path '$()' -Directory -Recurse | Where-Object { $_.FullName -match '\\bin|obj\\$(configuration)$' } | Write-Host
68-
displayName: Show Build Directories
69-
70-
- pwsh: |
71-
New-Item -Path '$(Build.Repository.LocalPath)\\src\\binaries\\$(configuration)' -ItemType Directory
72-
displayName: Create binaries folder for Release Artifacts
73-
74-
- task: PublishBuildArtifacts@1
75-
displayName: Publish Build Artifacts
66+
- task: DotNetCoreCLI@2
67+
displayName: 'Publish build artifacts'
7668
inputs:
77-
pathToPublish: 'src/binaries/$(configuration)'
78-
artifactName: build
69+
command: publish
70+
arguments: '--configuration $(configuration) --output $(Build.ArtifactStagingDirectory)'
71+
publishWebProjects: false
7972

8073
- stage: postbuild
8174
displayName: 'Post Build Checks'

src/ArmTemplates/ArmTemplates.csproj

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,12 @@
2424

2525
<ItemGroup>
2626
<PackageReference Include="CommandLineParser" Version="2.8.0" />
27-
<PackageReference Include="Microsoft.Azure.Management.ApiManagement" Version="4.0.6-preview" />
28-
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.9.0-preview" />
29-
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.18.0" />
30-
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.1" />
27+
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.1" />
3128
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
32-
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
3329
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
3430
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
35-
<PackageReference Include="System.Diagnostics.Process" Version="4.3.0" />
36-
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
37-
<PackageReference Include="YamlDotNet" Version="5.3.0" />
31+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
32+
<PackageReference Include="YamlDotNet" Version="11.2.1" />
3833
</ItemGroup>
3934

4035
</Project>

src/ArmTemplates/Extractor/EntityExtractors/GroupExtractor.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Common.Templates.Groups;
99
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Extractor.EntityExtractors.Abstractions;
1010
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Extractor.Models;
11-
using Microsoft.Azure.Management.Authorization.Models;
1211
using Microsoft.Extensions.Logging;
1312

1413
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Extractor.EntityExtractors

src/ArmTemplates/Program.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ await parserResult.MapResult(
4646
await creatorCommandApplication.ExecuteCommandAsync(creatorConfig);
4747
},
4848

49-
async errors =>
50-
{
49+
errors => {
5150
applicationLogger.Information("Azure API Management DevOps Resource toolkit finished.");
5251

5352
if (!errors.IsNullOrEmpty())
@@ -63,8 +62,7 @@ await parserResult.MapResult(
6362
{
6463
case ErrorType.VersionRequestedError:
6564
case ErrorType.HelpRequestedError:
66-
return;
67-
65+
return Task.CompletedTask;
6866
case ErrorType.HelpVerbRequestedError:
6967
applicationLogger.Error("No verb found. Use \"help\" command to view all supported commands.");
7068
break;
@@ -84,10 +82,11 @@ await parserResult.MapResult(
8482
var errorMessage = (i < errorMessages.Count) ? errorMessages[i] : string.Empty;
8583

8684
applicationLogger.Error("[{0}] {1}", errorList[i].Tag, errorMessage);
87-
}
85+
}
8886
}
89-
}
90-
);
87+
88+
return Task.CompletedTask;
89+
});
9190
}
9291

9392
public static IServiceProvider CreateServiceProvider(ILogger logger)

tests/ArmTemplates.Tests/ArmTemplates.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616

1717
<ItemGroup>
1818
<PackageReference Include="FluentAssertions" Version="6.5.1" />
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
20-
<PackageReference Include="Moq" Version="4.16.1" />
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
20+
<PackageReference Include="Moq" Version="4.17.2" />
21+
<PackageReference Include="YamlDotNet" Version="11.2.1" />
2122
<PackageReference Include="xunit" Version="2.4.1" />
2223
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
2324
<PrivateAssets>all</PrivateAssets>
2425
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2526
</PackageReference>
26-
<PackageReference Include="YamlDotNet" Version="8.1.1" />
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<PackageReference Include="coverlet.msbuild" Version="2.5.0">
30+
<PackageReference Include="coverlet.msbuild" Version="3.1.2">
3131
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
3232
<PrivateAssets>all</PrivateAssets>
3333
</PackageReference>

tests/ArmTemplates.Tests/Moqs/ApiClients/MockApiOperationClient.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
// </copyright>
55
// --------------------------------------------------------------------------
66

7-
using System;
87
using System.Collections.Generic;
9-
using System.Text;
108
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Common.API.Clients.Abstractions;
119
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Common.Constants;
1210
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Common.Templates.ApiOperations;
1311
using Microsoft.Azure.Management.ApiManagement.ArmTemplates.Extractor.Models;
14-
using Microsoft.Azure.Management.Compute.Fluent.Models;
1512
using Moq;
1613

1714
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates.Tests.Moqs.ApiClients

0 commit comments

Comments
 (0)