Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated az pipeline #521

Merged
merged 12 commits into from
Jan 25, 2024
65 changes: 64 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,57 @@ jobs:
]
ServiceEndpointUrl: 'https://api.esrp.microsoft.com/api/v1'

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@3
mizrael marked this conversation as resolved.
Show resolved Hide resolved
displayName: 'ESRP sign Microsoft.PowerPlatform.PowerApps.Persistence.dll'
inputs:
ConnectedServiceName: 'ESRPCodeSigningConnection'
FolderPath: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/Microsoft.PowerPlatform.PowerApps.Persistence/'
Pattern: '*.dll'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"keyCode": "CP-233863-SN",
"operationSetCode": "StrongNameSign",
"parameters": [ ],
"toolName": "sign",
"toolVersion": "1.0"
},
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "Microsoft"
},
{
"parameterName": "OpusInfo",
"parameterValue": "http://www.microsoft.com"
},
{
"parameterName": "Append",
"parameterValue": "/as"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd \"SHA256\""
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "sign",
"toolVersion": "1.0"
}
]
ServiceEndpointUrl: 'https://api.esrp.microsoft.com/api/v1'

- task: DotNetCoreCLI@2
displayName: 'Pack'
inputs:
Expand Down Expand Up @@ -147,17 +198,29 @@ jobs:
ServiceEndpointUrl: 'https://api.esrp.microsoft.com/api/v1'

- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'Generation Task'
displayName: 'PAModel Generation Task'
inputs:
BuildDropPath: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/PAModel/'

- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'Persistence Generation Task'
inputs:
BuildDropPath: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/Microsoft.PowerPlatform.PowerApps.Persistence/'

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/PAModel/'
ArtifactName: 'Generation Task'
publishLocation: 'Container'
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/Microsoft.PowerPlatform.PowerApps.Persistence/'
ArtifactName: 'Persistence Generation Task'
publishLocation: 'Container'
condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'))

- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/pkg/PackResult'
Expand Down
36 changes: 36 additions & 0 deletions src/PASopa_pack.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 12.00
mizrael marked this conversation as resolved.
Show resolved Hide resolved
# Visual Studio Version 17
VisualStudioVersion = 17.9.34407.89
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerPlatform.Formulas.Tools", "PAModel\Microsoft.PowerPlatform.Formulas.Tools.csproj", "{48316D0E-4A8A-461C-9C56-9CAE8F2E208F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{794D8C68-BF6F-49C8-BCA5-AA52D8F45EF4}"
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerPlatform.PowerApps.Persistence", "Microsoft.PowerPlatform.PowerApps.Persistence\Microsoft.PowerPlatform.PowerApps.Persistence.csproj", "{906B4EA5-F287-4D0E-A511-0D89B2DD9C14}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{48316D0E-4A8A-461C-9C56-9CAE8F2E208F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48316D0E-4A8A-461C-9C56-9CAE8F2E208F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48316D0E-4A8A-461C-9C56-9CAE8F2E208F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48316D0E-4A8A-461C-9C56-9CAE8F2E208F}.Release|Any CPU.Build.0 = Release|Any CPU
{906B4EA5-F287-4D0E-A511-0D89B2DD9C14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{906B4EA5-F287-4D0E-A511-0D89B2DD9C14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{906B4EA5-F287-4D0E-A511-0D89B2DD9C14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{906B4EA5-F287-4D0E-A511-0D89B2DD9C14}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C936F8B1-DE7A-4401-95D5-5E199210F960}
EndGlobalSection
EndGlobal
12 changes: 6 additions & 6 deletions targets/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class Program

static void Main(string[] args)
{

string RootDir = "", gitHash = "";
bool gitExists = true;
try
try
{
RootDir = Read("git", "rev-parse --show-toplevel", noEcho: true).Trim();
gitHash = Read("git", "rev-parse HEAD", noEcho: true).Trim();
Expand All @@ -51,8 +51,8 @@ static void Main(string[] args)

string PAModelDir = Path.Combine(SrcDir, "PAModel");
var solution = Path.Combine(SrcDir, "PASopa.sln");
var project = Path.Combine(PAModelDir, "Microsoft.PowerPlatform.Formulas.Tools.csproj");

var packSolution = Path.Combine(SrcDir, "PASopa_pack.sln");

Target("squeaky-clean",
() =>
Expand Down Expand Up @@ -83,7 +83,7 @@ static void Main(string[] args)
DependsOn("restore", "build"));

Target("pack",
() => RunDotnet("pack", $"{EscapePath(project)} --configuration {options.Configuration} --output {EscapePath(Path.Combine(PkgDir, "PackResult"))} --no-build -p:Packing=true", gitExists, LogDir));
() => RunDotnet("pack", $"{EscapePath(packSolution)} --configuration {options.Configuration} --output {EscapePath(Path.Combine(PkgDir, "PackResult"))} --no-build -p:Packing=true", gitExists, LogDir));

Target("ci",
DependsOn("squeaky-clean", "rebuild", "test"));
Expand All @@ -105,7 +105,7 @@ static void Main(string[] args)
static void RunDotnet(string verb, string verbArgs, bool gitExists, string LogDir)
{
var gitDef = "";
if (gitExists)
if (gitExists)
gitDef = "-p:GitExists=true";
var optionsLogPath = Path.Combine(LogDir, $"{verb}-{options.Configuration}");
var logSettings = $"/clp:verbosity=minimal /flp:Verbosity=normal;LogFile={EscapePath(optionsLogPath + ".log")} /flp3:PerformanceSummary;Verbosity=diag;LogFile={EscapePath(optionsLogPath + ".diagnostics.log")}";
Expand Down
Loading