-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrated merge process to Power Automate (#18)
* Development solution changes now published on import * Authentication via client secret with staging environment * Fixed issue that caused merging flow to not trigger * Migrated to flow, added solution version entity, replaced notes with file fields * Updated documentation * Updated sample script to perform a squash merge
- Loading branch information
Showing
101 changed files
with
3,479 additions
and
3,751 deletions.
There are no files selected for viewing
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
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
64 changes: 64 additions & 0 deletions
64
common/DevelopmentHub.Model/Requests/OAuthClientCredentialsGrantRequest.cs
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,64 @@ | ||
namespace DevelopmentHub.Model.Requests | ||
{ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
/// <summary> | ||
/// Data contract for an OAuth password grant request. | ||
/// </summary> | ||
[DataContract] | ||
public class OAuthClientCredentialsGrantRequest | ||
{ | ||
/// <summary> | ||
/// The OAuth grant type associated with this request. | ||
/// </summary> | ||
[IgnoreDataMember] | ||
public const string GrantType = "client_credentials"; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="OAuthClientCredentialsGrantRequest"/> class. | ||
/// </summary> | ||
public OAuthClientCredentialsGrantRequest() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="OAuthClientCredentialsGrantRequest"/> class. | ||
/// </summary> | ||
/// <param name="clientId">The client ID.</param> | ||
/// <param name="tenantId">The tenant ID.</param> | ||
/// <param name="resource">The resource.</param> | ||
/// <param name="clientSecret">The client secret.</param> | ||
public OAuthClientCredentialsGrantRequest(Guid clientId, Guid tenantId, Uri resource, string clientSecret) | ||
{ | ||
this.ClientId = clientId; | ||
this.TenantId = tenantId; | ||
this.Resource = resource; | ||
this.ClientSecret = clientSecret; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the application's client ID. | ||
/// </summary> | ||
[DataMember] | ||
public Guid ClientId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the application's tenant ID. | ||
/// </summary> | ||
[DataMember] | ||
public Guid TenantId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the resource to request access to. | ||
/// </summary> | ||
[DataMember] | ||
public Uri Resource { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the client secret. | ||
/// </summary> | ||
[DataMember] | ||
public string ClientSecret { get; set; } | ||
} | ||
} |
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
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,34 +1,15 @@ | ||
name: $(solution) - $(commitMessage) - $(triggeredBy) | ||
name: $(solution) $(commitMessage) | ||
pool: | ||
vmImage: windows-latest | ||
trigger: none | ||
steps: | ||
- checkout: self | ||
persistCredentials: true | ||
- powershell: >- | ||
$env:GIT_REDIRECT_STDERR = '2>&1'; | ||
git config --global user.email $env:TRIGGEREDBYEMAIL; | ||
git config --global user.name $env:TRIGGEREDBY; | ||
git checkout master; | ||
if ($env:SOURCEBRANCH) | ||
{ | ||
git merge origin/$env:SOURCEBRANCH --no-commit; | ||
} | ||
Invoke-Expression "&$(Build.SourcesDirectory)\build.ps1 -Target ExtractSolutionFromDevelopmentHub -ScriptArgs `"--solution=$env:SOLUTION`",`"--unmanagedNoteId=$env:UNMANAGEDNOTEID`",`"--managedNoteId=$env:MANAGEDNOTEDID`" -Verbosity Diagnostic"; | ||
git add .; | ||
git reset -- NuGet.config; | ||
$commitMessage = $env:COMMITMESSAGE; | ||
if ($env:WORKITEMID) | ||
{ | ||
$commitMessage += " #$env:WORKITEMID"; | ||
} | ||
git commit -m $commitMessage; | ||
git push origin; | ||
displayName: Extract and commit solution | ||
env: | ||
CAKE_DYNAMICS_PASSWORD: $(dynamicsPassword) | ||
CAKE_DYNAMICS_USERNAME: $(dynamicsUsername) | ||
- task: PowerShell@2 | ||
inputs: | ||
workingDirectory: $(Build.SourcesDirectory) | ||
filePath: 'scripts/Merge-SolutionVersion.ps1' | ||
arguments: '-ClientId "$(Client ID)" -TenantId "$(Tenant ID)" -ClientSecret (ConvertTo-SecureString "$(Client Secret)" -AsPlainText -Force) -SolutionVersionId "$(solutionVersionId)" -Solution "$(solution)" -CommitUserEmailAddress "$(triggeredByEmail)" -CommitUserName "$(triggeredBy)" -CommitMessage "$(commitMessage)" -SourceBranch "$(sourceBranch)" -WorkItemId "$(workItemId)"' | ||
displayName: Extract and commit | ||
variables: | ||
- group: Cake | ||
- name: workItemId | ||
value: "" | ||
- group: Development Hub |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.