Skip to content

Commit

Permalink
Merge pull request #1889 from vicancy/release/1.23
Browse files Browse the repository at this point in the history
Release 1.23
  • Loading branch information
vicancy authored Jan 9, 2024
2 parents 2d86721 + 85ca39e commit 32602dd
Show file tree
Hide file tree
Showing 7 changed files with 188 additions and 10 deletions.
178 changes: 178 additions & 0 deletions .azure/pipelines/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
- name: BuildConfiguration
value: Release
- name: BuildNumber
value: $[counter('versioncounter', 11128)]
- name: Codeql.Enabled
value: true
- name: IsTargetMultiFramework
value: true
- name: LocalFeed
value: $(UserProfile)\localfeed
- name: MSBuildProperties
value: Configuration=$(BuildConfiguration);BuildNumber=$(BuildNumber);VersionSuffix=$(VersionSuffix);IsTargetMultiFramework=$(IsTargetMultiFramework);SignType=$(SignType)
- name: SignType
value: real
- name: TeamName
value: Azure SignalR Team
- name: VersionSuffix
value: preview1-$(BuildNumber)
parameters:
- name: isFinalBuild
type: boolean
default: false
- name: releaseEmulator
type: boolean
default: false
- name: releaseSDKCore
type: boolean
default: false
- name: releaseServerlessProtocol
type: boolean
default: false
resources:
repositories:
- repository: self
type: git
ref: refs/heads/dev
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
trigger:
branches:
include:
- dev
paths:
include:
- src
batch: true
pr: none
extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
parameters:
pool:
os: windows
name: MSEngSS-MicroBuild2022-1ES
customBuildTags:
- MigrationTooling-mseng-VSJava-8484-Tool
sdl:
eslint:
enabled: false
stages:
- stage: Stage
jobs:
- job: Phase_1
displayName: Phase 1
cancelTimeoutInMinutes: 1
templateContext:
outputs:
- output: pipelineArtifact
artifactName: Artifact
targetPath: artifacts
displayName: Publish nupkg to VSTS
- output: nuget
displayName: Push packages to azure-signalr-dev feed
nuGetFeedType: external
packagesToPush: artifacts/**/*.nupkg;artifacts/**/*.snupkg
packageParentPath: artifacts
publishFeedCredentials: azure-signalr-dev
steps:
- checkout: self
clean: true
submodules: true
fetchDepth: 1
fetchTags: false
persistCredentials: true
- ${{ if eq(parameters.isFinalBuild, true) }}:
- bash: |
echo "##vso[task.setvariable variable=VersionSuffix]rtm"
echo $(VersionSuffix) # outputs VersionSuffix
displayName: Set VersionSuffix to rtm if it is final build
- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@3
displayName: Install Signing Plugin
condition: and(succeeded(), in(variables.SignType, 'real', 'test')) 
inputs:
signType: $(SignType)
zipSources: false
feedSource: https://pkgs.dev.azure.com/mseng/_packaging/MicroBuildToolset/nuget/v3/index.json
- task: UseDotNet@2
displayName: Add 6.x
inputs:
version: 6.x
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: Add 7.x
inputs:
version: 7.x
performMultiLevelLookup: true
- ${{ if or( eq(parameters.isFinalBuild, false), eq(parameters.releaseSDKCore, true)) }}:
- task: DotNetCoreCLI@2
displayName: dotnet build AzureSignalR.sln
inputs:
projects: AzureSignalR.sln
arguments: /p:$(MSBuildProperties)
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:
command: test
arguments: /p:$(MSBuildProperties)
- task: DotNetCoreCLI@2
displayName: dotnet pack SDK Core
inputs:
command: pack
searchPatternPack: src/Microsoft*/*.csproj;!src\Microsoft.Azure.SignalR.Emulator\Microsoft.Azure.SignalR.Emulator.csproj;!src\Microsoft.Azure.SignalR.Serverless.Protocols\Microsoft.Azure.SignalR.Serverless.Protocols.csproj
outputDir: artifacts
includesymbols: true
buildProperties: $(MSBuildProperties);SymbolPackageFormat=snupkg
verbosityPack: Normal
- ${{ if or( eq(parameters.isFinalBuild, false), eq(parameters.releaseEmulator, true)) }}:
- task: DotNetCoreCLI@2
displayName: dotnet pack emulator when only dev or release emulator
inputs:
command: pack
searchPatternPack: src/Microsoft.Azure.SignalR.Emulator/Microsoft.Azure.SignalR.Emulator.csproj
outputDir: artifacts
includesymbols: true
buildProperties: $(MSBuildProperties);SymbolPackageFormat=snupkg
verbosityPack: Normal
- ${{ if or( eq(parameters.isFinalBuild, false), eq(parameters.releaseServerlessProtocol, true)) }}:
- task: DotNetCoreCLI@2
displayName: "dotnet pack serverless protocol when only dev or release "
inputs:
command: pack
searchPatternPack: src/Microsoft.Azure.SignalR.Serverless.Protocols/Microsoft.Azure.SignalR.Serverless.Protocols.csproj
outputDir: artifacts
includesymbols: true
buildProperties: $(MSBuildProperties);SymbolPackageFormat=snupkg
verbosityPack: Normal
- task: CmdLine@2
displayName: Clean Local Feed
inputs:
script: if exist $(LocalFeed)\ del /s /q $(LocalFeed)
- task: NuGetCommand@2
displayName: Initialize Local Feed
inputs:
command: custom
arguments: init artifacts $(LocalFeed)
- task: MSBuild@1
displayName: Test Restoring Packages
inputs:
solution: build/package-test.3.proj
msbuildArchitecture: x64
msbuildArguments: /p:$(MSBuildProperties) /p:UseLocalFeed=true /p:LocalFeed=$(LocalFeed) /t:Restore
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: "Manifest Generator "
inputs:
BuildDropPath: artifacts
- ${{ if eq(parameters.isFinalBuild, true) }}:
- task: AzureFileCopy@4
displayName: SDK Partner Release AzCopy
inputs:
SourcePath: artifacts/*
ConnectedServiceNameARM: azuresdkpartnerdrops
Destination: AzureBlob
StorageAccountRM: azuresdkpartnerdrops
ContainerName: drops
BlobPrefix: azure-signalr/dotnet/$(BuildNumber)
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Microsoft.Azure.SignalR.Management.Tests
public class DependencyInjectionExtensionFacts
{
private const string Url = "https://abc";
private const string AccessKey = "nOu3jXsHnsO5urMumc87M9skQbUWuQ+PE5IvSUEic8w=";
private const string AccessKey = "fake_key";
private static readonly string TestConnectionString = $"Endpoint={Url};AccessKey={AccessKey};Version=1.0;";

private readonly ITestOutputHelper _outputHelper;
Expand Down Expand Up @@ -254,7 +254,7 @@ public async Task ProxyApplyToTransientModeTestAsync()
var serviceManager = new ServiceManagerBuilder().WithOptions(o =>
{
// use http schema to avoid SSL handshake
o.ConnectionString = "Endpoint=http://abc;AccessKey=nOu3jXsHnsO5urMumc87M9skQbUWuQ+PE5IvSUEic8w=;Version=1.0;";
o.ConnectionString = "Endpoint=http://abc;AccessKey=fake_key;Version=1.0;";
o.Proxy = new WebProxy(app.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.First());
}).BuildServiceManager();
Assert.True(await serviceManager.IsServiceHealthy(default));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace Microsoft.Azure.SignalR.Management.Tests
{
public class NegotiateProcessorFacts
{
private const string AccessKey = "nOu3jXsHnsO5urMumc87M9skQbUWuQ+PE5IvSUEic8w=";
private const string AccessKey = "fake_key";
private const string HubName = "signalrBench";
private const string UserId = "UserA";
private static readonly TimeSpan _tokenLifeTime = TimeSpan.FromSeconds(99);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.Azure.SignalR.Management.Tests
public class RestApiProviderFacts
{
private const string _endpoint = "https://abc";
private const string _accessKey = "nOu3jXsHnsO5urMumc87M9skQbUWuQ+PE5IvSUEic8w=";
private const string _accessKey = "fake_key";

private static readonly string _connectionString = $"Endpoint={_endpoint};AccessKey={_accessKey};Version=1.0;";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace Microsoft.Azure.SignalR.Management.Tests
public class ServiceManagerFacts
{
private const string Endpoint = "https://abc";
private const string AccessKey = "nOu3jXsHnsO5urMumc87M9skQbUWuQ+PE5IvSUEic8w=";
private const string AccessKey = "fake_key";
private const string HubName = "signalrBench";
private const string UserId = "UserA";
private const string UserAgent = "userAgent";
Expand Down
8 changes: 4 additions & 4 deletions test/Microsoft.Azure.SignalR.Tests/NegotiateHandlerFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public class NegotiateHandlerFacts
private const string CustomClaimType = "custom.claim";
private const string CustomUserId = "customUserId";
private const string DefaultUserId = "nameId";
private const string DefaultConnectionString = "Endpoint=https://localhost;AccessKey=nOu3jXsHnsO5urMumc87M9skQbUWuQ+PE5IvSUEic8w=;ClientEndpoint=http://redirect";
private const string ConnectionString2 = "Endpoint=http://localhost2;AccessKey=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789;";
private const string ConnectionString3 = "Endpoint=http://localhost3;AccessKey=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789;";
private const string ConnectionString4 = "Endpoint=http://localhost4;AccessKey=ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789;";
private const string DefaultConnectionString = "Endpoint=https://localhost;AccessKey=fake_key;ClientEndpoint=http://redirect";
private const string ConnectionString2 = "Endpoint=http://localhost2;AccessKey=fake_key;";
private const string ConnectionString3 = "Endpoint=http://localhost3;AccessKey=fake_key;";
private const string ConnectionString4 = "Endpoint=http://localhost4;AccessKey=fake_key;";

private static readonly JwtSecurityTokenHandler JwtSecurityTokenHandler = new JwtSecurityTokenHandler();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Microsoft.Azure.SignalR.Tests
public class ServiceEndpointProviderFacts
{
private const string Endpoint = "https://myendpoint";
private const string AccessKey = "nOu3jXsHnsO5urMumc87M9skQbUWuQ+PE5IvSUEic8w=";
private const string AccessKey = "fake_key";
private static readonly string HubName = nameof(TestHub).ToLower();
private static readonly string AppName = "testapp";

Expand Down

0 comments on commit 32602dd

Please sign in to comment.