diff --git a/.gitmodules b/.gitmodules
index c21308d6..43148325 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,7 +1,4 @@
[submodule "CodeGen"]
path = CodeGen
url = https://github.com/Synergex/CodeGen.git
- branch = hcnet6
-[submodule "Terminal.Gui"]
- path = Terminal.Gui
- url = https://github.com/gui-cs/Terminal.Gui.git
+ branch = hc_version_upgrade
diff --git a/CodeGen b/CodeGen
index deabb3fe..6b2d6994 160000
--- a/CodeGen
+++ b/CodeGen
@@ -1 +1 @@
-Subproject commit deabb3feb0e662dee98f12fa86e18a87b418db77
+Subproject commit 6b2d69944e27c02cb27be8a71f35d2c481e89ea2
diff --git a/GroupByShaperExpression.cs b/GroupByShaperExpression.cs
deleted file mode 100644
index 456208b6..00000000
--- a/GroupByShaperExpression.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace Microsoft.EntityFrameworkCore.Query;
-
-///
-///
-/// An expression that represents creation of a grouping element in .
-///
-///
-/// This type is typically used by database providers (and other extensions). It is generally
-/// not used in application code.
-///
-///
-///
-/// See Implementation of database providers and extensions
-/// and How EF Core queries work for more information and examples.
-///
-public class GroupByShaperExpression : Expression, IPrintableExpression
-{
- ///
- /// Creates a new instance of the class.
- ///
- /// An expression representing key selector for the grouping result.
- /// An expression representing subquery for enumerable over the grouping result.
- public GroupByShaperExpression(
- Expression keySelector,
- ShapedQueryExpression groupingEnumerable)
- {
- KeySelector = keySelector;
- GroupingEnumerable = groupingEnumerable;
- }
-
- ///
- /// The expression representing the key selector for this grouping result.
- ///
- public virtual Expression KeySelector { get; }
-
- ///
- /// The expression representing the subquery for the enumerable over this grouping result.
- ///
- public virtual ShapedQueryExpression GroupingEnumerable { get; }
-
- ///
- public override Type Type
- => typeof(IGrouping<,>).MakeGenericType(KeySelector.Type, GroupingEnumerable.ShaperExpression.Type);
-
- ///
- public sealed override ExpressionType NodeType
- => ExpressionType.Extension;
-
- ///
- protected override Expression VisitChildren(ExpressionVisitor visitor)
- {
- var keySelector = visitor.Visit(KeySelector);
- var groupingEnumerable = (ShapedQueryExpression)visitor.Visit(GroupingEnumerable);
-
- return Update(keySelector, groupingEnumerable);
- }
-
- ///
- /// Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will
- /// return this expression.
- ///
- /// The property of the result.
- /// The property of the result.
- /// This expression if no children changed, or an expression with the updated children.
- public virtual GroupByShaperExpression Update(Expression keySelector, ShapedQueryExpression groupingEnumerable)
- => keySelector != KeySelector || groupingEnumerable != GroupingEnumerable
- ? new GroupByShaperExpression(keySelector, groupingEnumerable)
- : this;
-
- ///
- public virtual void Print(ExpressionPrinter expressionPrinter)
- {
- expressionPrinter.AppendLine($"{nameof(GroupByShaperExpression)}:");
- expressionPrinter.Append("KeySelector: ");
- expressionPrinter.Visit(KeySelector);
- expressionPrinter.AppendLine(", ");
- expressionPrinter.Append("GroupingEnumerable:");
- expressionPrinter.Visit(GroupingEnumerable);
- expressionPrinter.AppendLine();
- }
-}
diff --git a/Harmony.AspNetCore/Harmony.AspNetCore.synproj b/Harmony.AspNetCore/Harmony.AspNetCore.synproj
index f7d8e5ef..89a0d6f1 100644
--- a/Harmony.AspNetCore/Harmony.AspNetCore.synproj
+++ b/Harmony.AspNetCore/Harmony.AspNetCore.synproj
@@ -41,10 +41,10 @@
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
5.0.0
diff --git a/Harmony.Core.AspNetCore.nuspec b/Harmony.Core.AspNetCore.nuspec
index dacc1c59..2946e676 100644
--- a/Harmony.Core.AspNetCore.nuspec
+++ b/Harmony.Core.AspNetCore.nuspec
@@ -11,7 +11,7 @@
-
+
diff --git a/Harmony.Core.Codegen.nuspec b/Harmony.Core.Codegen.nuspec
index 0f29a236..7b759e6e 100644
--- a/Harmony.Core.Codegen.nuspec
+++ b/Harmony.Core.Codegen.nuspec
@@ -13,9 +13,9 @@
-
-
-
+
+
+
diff --git a/Harmony.Core.EF.nuspec b/Harmony.Core.EF.nuspec
index 893cb8ca..ac9c8428 100644
--- a/Harmony.Core.EF.nuspec
+++ b/Harmony.Core.EF.nuspec
@@ -15,7 +15,7 @@
-
+
diff --git a/Harmony.Core.OData.nuspec b/Harmony.Core.OData.nuspec
index 05113ab0..5d95d502 100644
--- a/Harmony.Core.OData.nuspec
+++ b/Harmony.Core.OData.nuspec
@@ -16,7 +16,7 @@
-
+
diff --git a/Harmony.Core.nuspec b/Harmony.Core.nuspec
index 758185ea..7f6f22f5 100644
--- a/Harmony.Core.nuspec
+++ b/Harmony.Core.nuspec
@@ -9,7 +9,7 @@
HarmonyCore package that provides base runtime functionality
https://www.github.com/Synergex/HarmonyCore
-
+
diff --git a/Harmony.OData/Harmony.OData.synproj b/Harmony.OData/Harmony.OData.synproj
index 9993f18d..e2b123ed 100644
--- a/Harmony.OData/Harmony.OData.synproj
+++ b/Harmony.OData/Harmony.OData.synproj
@@ -52,10 +52,10 @@
9.0.6
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
5.0.0
diff --git a/HarmonyCore.CliTool/HarmonyCore.CliTool.csproj b/HarmonyCore.CliTool/HarmonyCore.CliTool.csproj
index d118524f..a9be703c 100644
--- a/HarmonyCore.CliTool/HarmonyCore.CliTool.csproj
+++ b/HarmonyCore.CliTool/HarmonyCore.CliTool.csproj
@@ -8,6 +8,9 @@
Harmony.Core.CliTool
6.0.148
6.0.148
+
+ AnyCPU
@@ -30,7 +33,7 @@
-
+
diff --git a/HarmonyCore.NetCore/HarmonyCore.NetCore.synproj b/HarmonyCore.NetCore/HarmonyCore.NetCore.synproj
index 596287e5..b6876887 100644
--- a/HarmonyCore.NetCore/HarmonyCore.NetCore.synproj
+++ b/HarmonyCore.NetCore/HarmonyCore.NetCore.synproj
@@ -14,10 +14,10 @@
10.0.0
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
diff --git a/HarmonyCore.Test.Repository/HarmonyCore.Test.Repository.synproj b/HarmonyCore.Test.Repository/HarmonyCore.Test.Repository.synproj
index bfb78d5d..3dd2ca1d 100644
--- a/HarmonyCore.Test.Repository/HarmonyCore.Test.Repository.synproj
+++ b/HarmonyCore.Test.Repository/HarmonyCore.Test.Repository.synproj
@@ -36,11 +36,11 @@
-
+
This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
+
\ No newline at end of file
diff --git a/HarmonyCore.Test/HarmonyCore.Test.synproj b/HarmonyCore.Test/HarmonyCore.Test.synproj
index b9e7eafe..898e0cff 100644
--- a/HarmonyCore.Test/HarmonyCore.Test.synproj
+++ b/HarmonyCore.Test/HarmonyCore.Test.synproj
@@ -46,10 +46,10 @@
3.6.1
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
5.0.0
diff --git a/HarmonyCore/HarmonyCore.synproj b/HarmonyCore/HarmonyCore.synproj
index 2f36d15a..2e11304c 100644
--- a/HarmonyCore/HarmonyCore.synproj
+++ b/HarmonyCore/HarmonyCore.synproj
@@ -77,11 +77,16 @@
2.22.23
+
+
+ 2.5.301
+
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
5.0.0
diff --git a/HarmonyCoreEF/HarmonyCoreEF.csproj b/HarmonyCoreEF/HarmonyCoreEF.csproj
index d57b7a12..97e2ed08 100644
--- a/HarmonyCoreEF/HarmonyCoreEF.csproj
+++ b/HarmonyCoreEF/HarmonyCoreEF.csproj
@@ -45,7 +45,7 @@
-
+
diff --git a/NuGet.config b/NuGet.config
new file mode 100644
index 00000000..e05e2d87
--- /dev/null
+++ b/NuGet.config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/Services.Controllers/Services.Controllers.synproj b/Services.Controllers/Services.Controllers.synproj
index 72386050..75d96970 100644
--- a/Services.Controllers/Services.Controllers.synproj
+++ b/Services.Controllers/Services.Controllers.synproj
@@ -49,10 +49,10 @@
9.0.6
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
diff --git a/Services.Host/Services.Host.synproj b/Services.Host/Services.Host.synproj
index 79b7f679..21631f66 100644
--- a/Services.Host/Services.Host.synproj
+++ b/Services.Host/Services.Host.synproj
@@ -44,10 +44,10 @@
5.1.2
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
1.6.10
diff --git a/Services.Isolated/Services.Isolated.synproj b/Services.Isolated/Services.Isolated.synproj
index fca0c54e..f03afa79 100644
--- a/Services.Isolated/Services.Isolated.synproj
+++ b/Services.Isolated/Services.Isolated.synproj
@@ -22,10 +22,10 @@
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
diff --git a/Services.Models/Services.Models.synproj b/Services.Models/Services.Models.synproj
index 31ccdaa4..eef5babd 100644
--- a/Services.Models/Services.Models.synproj
+++ b/Services.Models/Services.Models.synproj
@@ -27,10 +27,10 @@
10.0.5
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
diff --git a/Services.Test.GenerateValues/GenerateTestValues.dbl b/Services.Test.GenerateValues/GenerateTestValues.dbl
index ba25febb..341f875f 100644
--- a/Services.Test.GenerateValues/GenerateTestValues.dbl
+++ b/Services.Test.GenerateValues/GenerateTestValues.dbl
@@ -60,7 +60,7 @@ namespace Services.Test.GenerateValues
private mTestcarowner3FileSpec, string, "DAT:testcarowner3.ism"
partial method GetCustomFileSpec, void
- required inout aFileSpec, string
+ required in aFileSpec, string
endmethod
public method SerializeValues, void
diff --git a/Services.Test.GenerateValues/Services.Test.GenerateValues.synproj b/Services.Test.GenerateValues/Services.Test.GenerateValues.synproj
index 9c449ff5..b4afaaab 100644
--- a/Services.Test.GenerateValues/Services.Test.GenerateValues.synproj
+++ b/Services.Test.GenerateValues/Services.Test.GenerateValues.synproj
@@ -22,10 +22,10 @@
17.11.1
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
diff --git a/Services.Test/Services.Test.synproj b/Services.Test/Services.Test.synproj
index d9b4e747..c7cb3e26 100644
--- a/Services.Test/Services.Test.synproj
+++ b/Services.Test/Services.Test.synproj
@@ -152,11 +152,16 @@ rem xcopy /I /Y $(SolutionDir)SampleData $(OutDir)SampleData
2.22.23
+
+
+ 2.5.301
+
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
1.6.10
diff --git a/Services.Test/UnitTestEnvironment.dbl b/Services.Test/UnitTestEnvironment.dbl
index 6eac48ce..c2699ba1 100644
--- a/Services.Test/UnitTestEnvironment.dbl
+++ b/Services.Test/UnitTestEnvironment.dbl
@@ -51,26 +51,12 @@ namespace Services.Test
if(string.IsNullOrEmpty(wwwroot) && Directory.Exists(wwwroot)) then
begin
;;Create a test host for the Web API services
- _host = Host.CreateDefaultBuilder()
- & .ConfigureWebHostDefaults(lambda(webBuilder)
- & begin
- & webBuilder.UseTestServer()
- & webBuilder.UseStartup()
- & end)
- & .Start()
+ _host = Host.CreateDefaultBuilder().ConfigureWebHostDefaults(lambda(webBuilder) { webBuilder.UseTestServer().UseStartup() }).Start()
end
else
begin
;;Create a test host for the Web API services
- _host = Host.CreateDefaultBuilder()
- & .ConfigureWebHostDefaults(lambda(webBuilder)
- & begin
- & webBuilder.UseTestServer()
- & webBuilder.UseContentRoot(AppContext.BaseDirectory)
- & webBuilder.UseWebRoot(wwwroot)
- & webBuilder.UseStartup()
- & end)
- & .Start()
+ _host = Host.CreateDefaultBuilder().ConfigureWebHostDefaults(lambda(webBuilder) { webBuilder.UseTestServer().UseContentRoot(AppContext.BaseDirectory).UseWebRoot(wwwroot).UseStartup() }).Start()
end
Server = _host.GetTestServer()
diff --git a/Services/Services.synproj b/Services/Services.synproj
index 45da6d4a..845425db 100644
--- a/Services/Services.synproj
+++ b/Services/Services.synproj
@@ -67,10 +67,10 @@
9.0.6
- 25.10.2527
+ 26.5.1464
- 12.4.1.1003
+ 12.4.1.1005
10.0.0
diff --git a/Services/Startup.dbl b/Services/Startup.dbl
index 4db5080b..ef6566ae 100644
--- a/Services/Startup.dbl
+++ b/Services/Startup.dbl
@@ -402,13 +402,10 @@ namespace Services
;;Enable serving static files
- data staticFilesProvider, @FileExtensionContentTypeProvider
+ data staticFilesProvider, @FileExtensionContentTypeProvider, new FileExtensionContentTypeProvider()
AddCustomMimeTypes(staticFilesProvider)
app.UseDefaultFiles()
- if (staticFilesProvider == ^null) then
- app.UseStaticFiles()
- else
- app.UseStaticFiles(new StaticFileOptions() { ContentTypeProvider = staticFilesProvider })
+ app.UseStaticFiles(new StaticFileOptions() { ContentTypeProvider = staticFilesProvider })
app.UsePathBase(new PathString("/odata/v1"))
@@ -495,12 +492,11 @@ namespace Services
;;; Declare the AddCustomMimeTypes partial method.
;;; Developers can use this to add support for custom mime types to the kestrel server
;;;
- ;;; Returns an instance of FileExtensionContentTypeProvider
+ ;;; Provider to add custom mime type mappings to
partial method AddCustomMimeTypes, void
- required out provider, @FileExtensionContentTypeProvider
+ required in provider, @FileExtensionContentTypeProvider
;An example of how to implement this partial method:
;proc
- ; provider = new FileExtensionContentTypeProvider()
; provider.Mappings.Add(".apk","application/vnd.android.package-archive")
endmethod
diff --git a/Templates/GenerateTestValues.tpl b/Templates/GenerateTestValues.tpl
index c11d60f6..3d67a2c4 100644
--- a/Templates/GenerateTestValues.tpl
+++ b/Templates/GenerateTestValues.tpl
@@ -41,7 +41,7 @@ namespace
partial method GetCustomFileSpec, void
- required inout aFileSpec, string
+ required in aFileSpec, string
endmethod
public method SerializeValues, void
diff --git a/Templates/ODataStartup.tpl b/Templates/ODataStartup.tpl
index 0531b93e..f9db26e4 100644
--- a/Templates/ODataStartup.tpl
+++ b/Templates/ODataStartup.tpl
@@ -597,13 +597,10 @@ namespace
;;Enable serving static files
- data staticFilesProvider, @FileExtensionContentTypeProvider
+ data staticFilesProvider, @FileExtensionContentTypeProvider, new FileExtensionContentTypeProvider()
AddCustomMimeTypes(staticFilesProvider)
app.UseDefaultFiles()
- if (staticFilesProvider == ^null) then
- app.UseStaticFiles()
- else
- app.UseStaticFiles(new StaticFileOptions() { ContentTypeProvider = staticFilesProvider })
+ app.UseStaticFiles(new StaticFileOptions() { ContentTypeProvider = staticFilesProvider })
app.UsePathBase(new PathString("//v1"))
@@ -694,12 +691,11 @@ namespace
;;; Declare the AddCustomMimeTypes partial method.
;;; Developers can use this to add support for custom mime types to the kestrel server
;;;
- ;;; Returns an instance of FileExtensionContentTypeProvider
+ ;;; Provider to add custom mime type mappings to
partial method AddCustomMimeTypes, void
- required out provider, @FileExtensionContentTypeProvider
+ required in provider, @FileExtensionContentTypeProvider
;An example of how to implement this partial method:
;proc
- ; provider = new FileExtensionContentTypeProvider()
; provider.Mappings.Add(".apk","application/vnd.android.package-archive")
endmethod
diff --git a/Templates/ODataUnitTestEnvironment.tpl b/Templates/ODataUnitTestEnvironment.tpl
index 3e8b5dbb..edb04b88 100644
--- a/Templates/ODataUnitTestEnvironment.tpl
+++ b/Templates/ODataUnitTestEnvironment.tpl
@@ -112,26 +112,12 @@ namespace
if(string.IsNullOrEmpty(wwwroot) && Directory.Exists(wwwroot)) then
begin
;;Create a test host for the Web API services
- _host = Host.CreateDefaultBuilder()
- & .ConfigureWebHostDefaults(lambda(webBuilder)
- & begin
- & webBuilder.UseTestServer()
- & webBuilder.UseStartup()
- & end)
- & .Start()
+ _host = Host.CreateDefaultBuilder().ConfigureWebHostDefaults(lambda(webBuilder) { webBuilder.UseTestServer().UseStartup() }).Start()
end
else
begin
;;Create a test host for the Web API services
- _host = Host.CreateDefaultBuilder()
- & .ConfigureWebHostDefaults(lambda(webBuilder)
- & begin
- & webBuilder.UseTestServer()
- & webBuilder.UseContentRoot(AppContext.BaseDirectory)
- & webBuilder.UseWebRoot(wwwroot)
- & webBuilder.UseStartup()
- & end)
- & .Start()
+ _host = Host.CreateDefaultBuilder().ConfigureWebHostDefaults(lambda(webBuilder) { webBuilder.UseTestServer().UseContentRoot(AppContext.BaseDirectory).UseWebRoot(wwwroot).UseStartup() }).Start()
end
Server = _host.GetTestServer()
diff --git a/TraditionalBridge.Models/TraditionalBridge.Models.synproj b/TraditionalBridge.Models/TraditionalBridge.Models.synproj
index 8b0858c6..5dbeeeb0 100644
--- a/TraditionalBridge.Models/TraditionalBridge.Models.synproj
+++ b/TraditionalBridge.Models/TraditionalBridge.Models.synproj
@@ -30,7 +30,7 @@
10.0.5
- 22.11.1340
+ 26.5.1464
12.2.1.1003
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index b6faecc1..40825d89 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -4,7 +4,11 @@
# https://aka.ms/yaml
name: 10.0.$(Rev:r)
-resources:
+# Temporary test-pipeline branch: manual runs only.
+trigger: none
+pr: none
+
+resources:
repositories:
- repository: HarmonyCoreSamples
type: github
@@ -35,10 +39,9 @@ stages:
workspace:
clean: all
pool:
- name: HarmonyCore
+ name: $(BuildPool)
demands:
- - Agent.OS -equals Windows_NT # force Windows agents for all build legs
- - msbuild # MSBuild@1 injects this demand
+ - agent.name -equals $(WinAgentName) # Windows build machine (Docker host for the Linux agent container)
strategy:
maxParallel: 4
matrix:
@@ -232,7 +235,8 @@ stages:
versioningScheme: 'byBuildNumber'
- task: NuGetCommand@2
- condition: and(eq(variables['Platform'], 'x64'), eq(variables['Configuration'], 'Release'))
+ # temporarily disabled on the test branch - do not publish packages from test runs
+ condition: false
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/Harmony.*.nupkg'
@@ -243,8 +247,125 @@ stages:
displayName: 'Publish nuget packages'
artifact: 'NugetPackages$(Configuration)$(Platform)'
- - job: TestJob
+ # Recreate the Linux build agent container on the Windows Docker host.
+ - job: RemoveContainer
dependsOn: BuildJob
+ pool:
+ name: $(BuildPool)
+ demands:
+ - agent.name -equals $(WinAgentName)
+ steps:
+ - checkout: none
+
+ - task: PowerShell@2
+ displayName: "Remove old hcimage container/image"
+ inputs:
+ targetType: inline
+ script: |
+ $containers = docker ps -a -q --filter ancestor=hcimage
+ if ($containers) {
+ $containers | ForEach-Object { docker stop $_ }
+ $containers | ForEach-Object { docker rm $_ }
+ }
+
+ $images = docker images -a -q --filter "reference=hcimage"
+ if ($images) {
+ docker image rm hcimage
+ }
+
+ docker image prune -f | Out-Null
+ docker images
+ docker ps -a
+
+ - job: CreateContainer
+ dependsOn: RemoveContainer
+ condition: succeeded('RemoveContainer')
+ variables:
+ - group: "PAT for agent pool"
+ pool:
+ name: $(BuildPool)
+ demands:
+ - agent.name -equals $(WinAgentName)
+ steps:
+ - checkout: self
+ sparseCheckoutDirectories: 'buildDefinitions'
+ clean: true
+ path: docker
+
+ - task: DownloadSecureFile@1
+ name: autoInstall
+ displayName: "Get install support files"
+ inputs:
+ secureFile: 'linux.auto.install'
+
+ - task: PowerShell@2
+ displayName: "Stage build context"
+ env:
+ SYSTEM_ACCESSTOKEN: $(System.AccessToken)
+ SDE_ARTIFACTS_TOKEN: $(SdeArtifactsToken)
+ inputs:
+ targetType: inline
+ script: |
+ Copy-Item "$(autoInstall.secureFilePath)" linux.auto.install -Force
+
+ $token = $env:SDE_ARTIFACTS_TOKEN
+ if (-not $token -or $token.StartsWith('$(')) {
+ $token = $env:SYSTEM_ACCESSTOKEN
+ }
+ $headers = @{ Authorization = "Bearer $token" }
+ Invoke-WebRequest -Uri "$(SdeArchiveUrl)" -Headers $headers -OutFile sde-archive.a
+ $size = (Get-Item sde-archive.a).Length
+ Write-Host "Downloaded archive ($size bytes)"
+ if ($size -lt 10MB) {
+ Write-Error "Download suspiciously small."
+ exit 1
+ }
+ workingDirectory: $(Agent.BuildDirectory)/docker/buildDefinitions
+
+ - task: PowerShell@2
+ displayName: "Build hcimage"
+ inputs:
+ targetType: inline
+ script: |
+ # change line endings for Dockerfile and shell scripts
+ (Get-Content -Raw Dockerfile) -replace "`r" | Set-Content -NoNewline -Encoding utf8 Dockerfile
+ (Get-Content -Raw startagent.sh) -replace "`r" | Set-Content -NoNewline -Encoding utf8 startagent.sh
+ (Get-Content -Raw linux.auto.install) -replace "`r" | Set-Content -NoNewline -Encoding utf8 linux.auto.install
+ docker build --progress=plain --build-arg LICENSE_SERVER="$(SdeLicenseServer)" -t hcimage .
+ workingDirectory: $(Agent.BuildDirectory)/docker/buildDefinitions
+
+ - task: PowerShell@2
+ displayName: "Create hccontainer"
+ inputs:
+ targetType: inline
+ script: |
+ docker run -dit `
+ -e AZP_URL="$(System.CollectionUri)" `
+ -e AZP_TOKEN="$(PAT_AGENT_POOL)" `
+ -e AZP_POOL="$(BuildPool)" `
+ -e AZP_AGENT_NAME="$(LinuxAgentName)" `
+ --name "hccontainer" hcimage
+
+ $containerStatus = docker inspect --format='{{.State.Status}}' hccontainer
+ if ($containerStatus -eq "running") {
+ Write-Host "Container is running."
+ } else {
+ Write-Error "Container is not running. Current status: $containerStatus."
+ exit 1
+ }
+ workingDirectory: $(Agent.BuildDirectory)/docker/buildDefinitions
+
+ - task: PowerShell@2
+ displayName: "Wait for agent initialization"
+ inputs:
+ targetType: inline
+ script: |
+ Start-Sleep -Seconds 60
+
+ - job: TestJob
+ dependsOn:
+ - BuildJob
+ - CreateContainer
workspace:
clean: all
strategy:
@@ -253,17 +374,15 @@ stages:
Release_x64:
Configuration: Release
Platform: x64
- AgentPool: HarmonyCore
- AgentOS: Windows_NT
+ AgentName: $(WinAgentName)
Release_linux:
- Configuration: Release
- Platform: linux64
- AgentPool: HarmonyCore
- AgentOS: Linux
+ Configuration: Release
+ Platform: linux64
+ AgentName: $(LinuxAgentName)
pool:
- name: $(AgentPool)
+ name: $(BuildPool)
demands:
- - Agent.OS -equals $(AgentOS)
+ - agent.name -equals $(AgentName)
steps:
- checkout: none
@@ -341,7 +460,9 @@ stages:
workspace:
clean: all
pool:
- name: HarmonyCore
+ name: $(BuildPool)
+ demands:
+ - agent.name -equals $(WinAgentName)
strategy:
maxParallel: 4
matrix:
diff --git a/buildDefinitions/Dockerfile b/buildDefinitions/Dockerfile
new file mode 100644
index 00000000..5f7ec24c
--- /dev/null
+++ b/buildDefinitions/Dockerfile
@@ -0,0 +1,48 @@
+FROM rockylinux:9
+
+ARG LICENSE_SERVER
+
+ENV TZ=America/Los_Angeles \
+ SHELL=/bin/bash \
+ LANG=C.UTF-8 \
+ LC_ALL=C.UTF-8 \
+ DOTNET_CLI_TELEMETRY_OPTOUT=1
+
+RUN set -eux; \
+ dnf -y --refresh update; \
+ dnf -y install dnf-plugins-core ca-certificates tar gzip git jq unzip; \
+ dnf -y config-manager --set-enabled crb || true; \
+ # .NET SDK 10 (Rocky 9 AppStream)
+ dnf -y install dotnet-sdk-10.0; \
+ dnf clean all; \
+ rm -rf /var/cache/dnf
+
+# --- Synergy/DE Linux (x64) runtime --------------------------------------------
+# Build context is staged by the pipeline. Requires BuildKit for the bind mount.
+COPY ./linux.auto.install /opt/synergex/linux.auto.install
+RUN --mount=type=bind,source=sde-archive.a,target=/tmp/sde/sde-archive.a \
+ set -ex; \
+ test -n "$LICENSE_SERVER"; \
+ dnf -y install cpio libnsl ncurses-libs; \
+ mkdir -p /azp; \
+ cd /opt/synergex; \
+ cp /tmp/sde/sde-archive.a ./428SDE.a; \
+ sed -i 's/\r$//' linux.auto.install; \
+ chmod +x linux.auto.install; \
+ ./linux.auto.install -n "$LICENSE_SERVER" -f -c; \
+ rm -f 428SDE.a; \
+ . /opt/synergex/synergyde/setsde; \
+ lmu -nf "$LICENSE_SERVER"; \
+ printf '. /opt/synergex/synergyde/setsde\n' > /azp/setsde
+# ------------------------------------------------------------------------------
+
+RUN dotnet --info && git --version && jq --version
+
+ENV TARGETARCH="linux-x64"
+WORKDIR /azp
+COPY ./startagent.sh ./
+RUN chmod +x ./startagent.sh
+
+ENV AGENT_ALLOW_RUNASROOT="true"
+
+ENTRYPOINT ./startagent.sh
diff --git a/buildDefinitions/startagent.sh b/buildDefinitions/startagent.sh
new file mode 100644
index 00000000..9be8e699
--- /dev/null
+++ b/buildDefinitions/startagent.sh
@@ -0,0 +1,94 @@
+#!/bin/bash
+set -e
+
+if [ -z "${AZP_URL}" ]; then
+ echo 1>&2 "error: missing AZP_URL environment variable"
+ exit 1
+fi
+
+if [ -z "${AZP_TOKEN_FILE}" ]; then
+ if [ -z "${AZP_TOKEN}" ]; then
+ echo 1>&2 "error: missing AZP_TOKEN environment variable"
+ exit 1
+ fi
+
+ AZP_TOKEN_FILE="/azp/.token"
+ echo -n "${AZP_TOKEN}" > "${AZP_TOKEN_FILE}"
+fi
+
+unset AZP_TOKEN
+
+if [ -n "${AZP_WORK}" ]; then
+ mkdir -p "${AZP_WORK}"
+fi
+
+cleanup() {
+ trap "" EXIT
+
+ if [ -e ./config.sh ]; then
+ print_header "Cleanup. Removing Azure Pipelines agent..."
+
+ # If the agent has some running jobs, the configuration removal process will fail.
+ # So, give it some time to finish the job.
+ while true; do
+ ./config.sh remove --unattended --auth "PAT" --token $(cat "${AZP_TOKEN_FILE}") && break
+
+ echo "Retrying in 30 seconds..."
+ sleep 30
+ done
+ fi
+}
+
+print_header() {
+ lightcyan="\033[1;36m"
+ nocolor="\033[0m"
+ echo -e "\n${lightcyan}$1${nocolor}\n"
+}
+
+# Let the agent ignore the token env variables
+export VSO_AGENT_IGNORE="AZP_TOKEN,AZP_TOKEN_FILE"
+
+print_header "1. Determining matching Azure Pipelines agent..."
+
+AZP_AGENT_PACKAGES=$(curl -LsS \
+ -u user:$(cat "${AZP_TOKEN_FILE}") \
+ -H "Accept:application/json;" \
+ "${AZP_URL}/_apis/distributedtask/packages/agent?platform=${TARGETARCH}&top=1")
+
+AZP_AGENT_PACKAGE_LATEST_URL=$(echo "${AZP_AGENT_PACKAGES}" | jq -r ".value[0].downloadUrl")
+
+if [ -z "${AZP_AGENT_PACKAGE_LATEST_URL}" -o "${AZP_AGENT_PACKAGE_LATEST_URL}" == "null" ]; then
+ echo 1>&2 "error: could not determine a matching Azure Pipelines agent"
+ echo 1>&2 "check that account "${AZP_URL}" is correct and the token is valid for that account"
+ exit 1
+fi
+
+print_header "2. Downloading and extracting Azure Pipelines agent..."
+
+curl -LsS "${AZP_AGENT_PACKAGE_LATEST_URL}" | tar -xz & wait $!
+
+source ./env.sh
+
+trap "cleanup; exit 0" EXIT
+trap "cleanup; exit 130" INT
+trap "cleanup; exit 143" TERM
+
+print_header "3. Configuring Azure Pipelines agent..."
+
+./config.sh --unattended \
+ --agent "${AZP_AGENT_NAME:-$(hostname)}" \
+ --url "${AZP_URL}" \
+ --auth "PAT" \
+ --token $(cat "${AZP_TOKEN_FILE}") \
+ --pool "${AZP_POOL:-Default}" \
+ --work "${AZP_WORK:-_work}" \
+ --replace \
+ --acceptTeeEula & wait $!
+
+print_header "4. Running Azure Pipelines agent..."
+
+chmod +x ./run.sh
+
+# To be aware of TERM and INT signals call ./run.sh
+# Running it with the --once flag at the end will shut down the agent after the build is executed
+./run.sh "$@" & wait $!
diff --git a/cli-tool-versions.json b/cli-tool-versions.json
index 8463fa44..5d9aa114 100644
--- a/cli-tool-versions.json
+++ b/cli-tool-versions.json
@@ -133,15 +133,15 @@
"HCVersion": "10.0.1",
"TemplatesVersionPrefix": "net10-release-v10",
"TargetFramework": "net10.0",
- "BuildPackageVersion": "25.10.2527",
+ "BuildPackageVersion": "26.5.1464",
"HCRegenRequiredVersions": [ "3.1.156", "3.1.999", "8.0.74" ],
"NugetVersions": {
"Harmony.Core": "10.0.1",
"Harmony.Core.EF": "10.0.1",
"Harmony.Core.OData": "10.0.1",
"Harmony.Core.AspNetCore": "10.0.1",
- "Synergex.SynergyDE.synrnt": "12.4.1.1003",
- "Synergex.SynergyDE.Build": "25.10.2527",
+ "Synergex.SynergyDE.synrnt": "12.4.1.1005",
+ "Synergex.SynergyDE.Build": "26.5.1464",
"Microsoft.AspNetCore.Mvc.NewtonsoftJson": "10.0.0",
"Microsoft.AspNetCore.Mvc.Testing": "10.0.0",
"Microsoft.Extensions.DependencyInjection": "10.0.0",