(chore): update utils layout and dapr deps
This commit is contained in:
parent
13e31855f6
commit
7e72f76f61
2
.gitignore
vendored
2
.gitignore
vendored
@ -264,3 +264,5 @@ __pycache__/
|
|||||||
|
|
||||||
**/*docker-compose/LetsEncryptServer/acme
|
**/*docker-compose/LetsEncryptServer/acme
|
||||||
**/*docker-compose/LetsEncryptServer/cache
|
**/*docker-compose/LetsEncryptServer/cache
|
||||||
|
#Custom
|
||||||
|
![Uu]tils/**
|
||||||
|
|||||||
@ -5,12 +5,13 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## [Unreleased]
|
## [2.0.1] - 2026-06-28
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Migrated repository automation from `utils/` to `src/` (maksit-repoutils layout). Configure release and test flows in `src/engines/*/scriptSettings.json`.
|
- Restored repository automation under `utils/` (aligned with maksit-core and maksit-repoutils). Configure release and test flows in `utils/engines/*/scriptSettings.json`.
|
||||||
|
- Updated dependencies to Dapr `1.18.4`, `MaksIT.Core` `1.6.8`, and `MaksIT.Results` `2.0.3`.
|
||||||
|
|
||||||
## v2.0.0 - 2026-02-22
|
## [2.0.0] - 2026-02-22
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Dedicated test project (`MaksIT.Dapr.Tests`) with coverage for publisher and state-store service behavior.
|
- Dedicated test project (`MaksIT.Dapr.Tests`) with coverage for publisher and state-store service behavior.
|
||||||
|
|||||||
@ -72,24 +72,28 @@ This project follows [Semantic Versioning](https://semver.org/):
|
|||||||
|
|
||||||
## Utility Scripts
|
## Utility Scripts
|
||||||
|
|
||||||
Automation lives under `src/` (synced from [maksit-repoutils](https://github.com/MAKS-IT-COM/maksit-repoutils) via `Update-RepoUtils`). Product-specific settings are in each engine’s `scriptSettings.json`.
|
Automation lives under `utils/` (synced from [maksit-repoutils](https://github.com/MAKS-IT-COM/maksit-repoutils) via `Update-RepoUtils`). Product-specific settings are in each engine’s `scriptSettings.json`.
|
||||||
|
|
||||||
### Run tests and coverage badges
|
### Run tests and coverage badges
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
pwsh -File .\src\engines\test\Invoke-TestEngine.ps1
|
pwsh -File .\utils\engines\test\Invoke-TestEngine.ps1
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration: `src/engines/test/scriptSettings.json`
|
Or double-click `utils\Invoke-TestEngine.bat`.
|
||||||
|
|
||||||
|
Configuration: `utils/engines/test/scriptSettings.json`
|
||||||
|
|
||||||
### Release package
|
### Release package
|
||||||
|
|
||||||
Builds, tests, packs, and publishes to NuGet and GitHub release flows.
|
Builds, tests, packs, and publishes to NuGet and GitHub release flows.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
pwsh -File .\src\engines\release\Invoke-ReleasePackage.ps1
|
pwsh -File .\utils\engines\release\Invoke-ReleasePackage.ps1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or double-click `utils\Invoke-ReleasePackage.bat`.
|
||||||
|
|
||||||
Prerequisites:
|
Prerequisites:
|
||||||
|
|
||||||
- Docker Desktop (for Linux test validation)
|
- Docker Desktop (for Linux test validation)
|
||||||
@ -97,23 +101,25 @@ Prerequisites:
|
|||||||
- environment variable `NUGET_MAKS_IT`
|
- environment variable `NUGET_MAKS_IT`
|
||||||
- environment variable `GITHUB_MAKS_IT_COM`
|
- environment variable `GITHUB_MAKS_IT_COM`
|
||||||
|
|
||||||
Configuration: `src/engines/release/scriptSettings.json`
|
Configuration: `utils/engines/release/scriptSettings.json`
|
||||||
|
|
||||||
### Update repo utilities
|
### Update repo utilities
|
||||||
|
|
||||||
Refreshes `src/` from maksit-repoutils while preserving local `scriptSettings.json` files.
|
Refreshes `utils/` from maksit-repoutils while preserving local `scriptSettings.json` files.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
pwsh -File .\src\tools\Update-RepoUtils\Update-RepoUtils.ps1
|
pwsh -File .\utils\tools\Update-RepoUtils\Update-RepoUtils.ps1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Or double-click `utils\Update-RepoUtils.bat`.
|
||||||
|
|
||||||
### Force amend tagged commit
|
### Force amend tagged commit
|
||||||
|
|
||||||
Amends the latest tagged commit and force-pushes updated branch and tag.
|
Amends the latest tagged commit and force-pushes updated branch and tag.
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
pwsh -File .\src\tools\Force-AmendTaggedCommit\Force-AmendTaggedCommit.ps1
|
pwsh -File .\utils\tools\Force-AmendTaggedCommit\Force-AmendTaggedCommit.ps1
|
||||||
pwsh -File .\src\tools\Force-AmendTaggedCommit\Force-AmendTaggedCommit.ps1 -DryRun
|
pwsh -File .\utils\tools\Force-AmendTaggedCommit\Force-AmendTaggedCommit.ps1 -DryRun
|
||||||
```
|
```
|
||||||
|
|
||||||
Warning: this rewrites git history.
|
Warning: this rewrites git history.
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.6.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.7.0" />
|
||||||
<PackageReference Include="Moq" Version="4.*" />
|
<PackageReference Include="Moq" Version="4.*" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.*" />
|
||||||
<PackageReference Include="xunit.v3" Version="3.*" />
|
<PackageReference Include="xunit.v3" Version="3.*" />
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<!-- NuGet package metadata -->
|
<!-- NuGet package metadata -->
|
||||||
<PackageId>MaksIT.Dapr</PackageId>
|
<PackageId>MaksIT.Dapr</PackageId>
|
||||||
<Version>2.0.0</Version>
|
<Version>2.0.1</Version>
|
||||||
<Authors>Maksym Sadovnychyy</Authors>
|
<Authors>Maksym Sadovnychyy</Authors>
|
||||||
<Company>MAKS-IT</Company>
|
<Company>MAKS-IT</Company>
|
||||||
<Product>MaksIT.Dapr</Product>
|
<Product>MaksIT.Dapr</Product>
|
||||||
@ -21,11 +21,11 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Dapr.Actors.AspNetCore" Version="1.17.9" />
|
<PackageReference Include="Dapr.Actors.AspNetCore" Version="1.18.4" />
|
||||||
<PackageReference Include="Dapr.AspNetCore" Version="1.17.9" />
|
<PackageReference Include="Dapr.AspNetCore" Version="1.18.4" />
|
||||||
<PackageReference Include="Dapr.Workflow" Version="1.17.9" />
|
<PackageReference Include="Dapr.Workflow" Version="1.18.4" />
|
||||||
<PackageReference Include="MaksIT.Core" Version="1.6.7" />
|
<PackageReference Include="MaksIT.Core" Version="1.6.8" />
|
||||||
<PackageReference Include="MaksIT.Results" Version="2.0.2" />
|
<PackageReference Include="MaksIT.Results" Version="2.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
80
utils/engines/release/Invoke-ReleasePackage.ps1
Normal file
80
utils/engines/release/Invoke-ReleasePackage.ps1
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
#requires -Version 7.0
|
||||||
|
#requires -PSEdition Core
|
||||||
|
|
||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Plugin-driven release engine entry script.
|
||||||
|
#>
|
||||||
|
|
||||||
|
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
$srcDir = (Resolve-Path (Join-Path $scriptDir '..\..')).Path
|
||||||
|
|
||||||
|
. (Join-Path $srcDir 'modules/Engine/Import-EngineModules.ps1')
|
||||||
|
Import-EngineModules -Engine Release
|
||||||
|
|
||||||
|
$settings = Get-ScriptSettings -ScriptDir $scriptDir
|
||||||
|
$configuredPlugins = Get-ConfiguredPlugins -Settings $settings
|
||||||
|
|
||||||
|
Write-Log -Level 'STEP' -Message '=================================================='
|
||||||
|
Write-Log -Level 'STEP' -Message 'RELEASE ENGINE'
|
||||||
|
Write-Log -Level 'STEP' -Message '=================================================='
|
||||||
|
|
||||||
|
$plugins = $configuredPlugins
|
||||||
|
$engineContext = New-EngineContext -Plugins $plugins -ScriptDir $scriptDir -SrcDir $srcDir -Settings $settings
|
||||||
|
Write-Log -Level 'OK' -Message 'All pre-flight checks passed!'
|
||||||
|
$sharedPluginSettings = $engineContext
|
||||||
|
|
||||||
|
$releaseStageInitialized = $false
|
||||||
|
$releaseHadPluginFailures = $false
|
||||||
|
|
||||||
|
if ($plugins.Count -eq 0) {
|
||||||
|
Write-Log -Level 'WARN' -Message 'No plugins configured in scriptSettings.json.'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for ($pluginIndex = 0; $pluginIndex -lt $plugins.Count; $pluginIndex++) {
|
||||||
|
$plugin = $plugins[$pluginIndex]
|
||||||
|
|
||||||
|
if ((Test-IsPublishPlugin -Plugin $plugin) -and -not $releaseStageInitialized) {
|
||||||
|
if (Test-PluginRunnable -Plugin $plugin -SharedSettings $sharedPluginSettings -EngineDirectory $scriptDir -WriteLogs:$false) {
|
||||||
|
$remainingPlugins = @($plugins[$pluginIndex..($plugins.Count - 1)])
|
||||||
|
Initialize-ReleaseStageContext -RemainingPlugins $remainingPlugins -SharedSettings $sharedPluginSettings -ArtifactsDirectory $engineContext.artifactsDirectory -Version $engineContext.version
|
||||||
|
$releaseStageInitialized = $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$pluginSucceeded = Invoke-ConfiguredPlugin -Plugin $plugin -SharedSettings $sharedPluginSettings -EngineDirectory $scriptDir -ContinueOnError:$false
|
||||||
|
if (-not $pluginSucceeded) {
|
||||||
|
$releaseHadPluginFailures = $true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $releaseStageInitialized) {
|
||||||
|
$noReleasePluginsLogLevel = if ($engineContext.isNonReleaseBranch) { 'INFO' } else { 'WARN' }
|
||||||
|
Write-Log -Level $noReleasePluginsLogLevel -Message 'No release-stage initialization ran (no enabled publish plugins reached, or none runnable).'
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Log -Level 'OK' -Message '=================================================='
|
||||||
|
if ($releaseHadPluginFailures) {
|
||||||
|
Write-Log -Level 'ERROR' -Message 'RELEASE FAILED'
|
||||||
|
}
|
||||||
|
elseif ($engineContext.PSObject.Properties.Name -contains 'skipPublishPlugins' -and $engineContext.skipPublishPlugins) {
|
||||||
|
Write-Log -Level 'OK' -Message 'RUN COMPLETE (publish skipped by ReleasePublishGuard)'
|
||||||
|
}
|
||||||
|
elseif ($engineContext.isNonReleaseBranch) {
|
||||||
|
Write-Log -Level 'OK' -Message 'NON-RELEASE RUN COMPLETE'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Log -Level 'OK' -Message 'RELEASE COMPLETE'
|
||||||
|
}
|
||||||
|
Write-Log -Level 'OK' -Message '=================================================='
|
||||||
|
|
||||||
|
if ($engineContext.isNonReleaseBranch -and -not ($engineContext.PSObject.Properties.Name -contains 'skipPublishPlugins' -and $engineContext.skipPublishPlugins)) {
|
||||||
|
$preferredReleaseBranch = Get-PreferredReleaseBranch -EngineContext $engineContext
|
||||||
|
Write-Log -Level 'INFO' -Message "For publish, use an allowed branch (see ReleasePublishGuard.branches), e.g. '$preferredReleaseBranch', and satisfy the guard requirements."
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($releaseHadPluginFailures) {
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
1
utils/engines/release/custom/.gitkeep
Normal file
1
utils/engines/release/custom/.gitkeep
Normal file
@ -0,0 +1 @@
|
|||||||
|
|
||||||
133
utils/engines/release/scriptSettings.json
Normal file
133
utils/engines/release/scriptSettings.json
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft-07/schema",
|
||||||
|
"title": "Release Package Script Settings",
|
||||||
|
"description": "Invoke-ReleasePackage.ps1 plugin settings for maksit-dapr.",
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "DotNetReleaseVersion",
|
||||||
|
"stageLabel": "build",
|
||||||
|
"enabled": true,
|
||||||
|
"projectFiles": [
|
||||||
|
"..\\..\\..\\src\\MaksIT.Dapr\\MaksIT.Dapr.csproj"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DotNetTest",
|
||||||
|
"stageLabel": "test",
|
||||||
|
"enabled": true,
|
||||||
|
"project": "..\\..\\..\\src\\MaksIT.Dapr.Tests",
|
||||||
|
"resultsDir": "..\\..\\..\\testResults"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "QualityGate",
|
||||||
|
"stageLabel": "qualityGate",
|
||||||
|
"enabled": true,
|
||||||
|
"coverageThreshold": 0,
|
||||||
|
"failOnVulnerabilities": true,
|
||||||
|
"projectFiles": [
|
||||||
|
"..\\..\\..\\src\\MaksIT.Dapr\\MaksIT.Dapr.csproj"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DotNetPack",
|
||||||
|
"stageLabel": "build",
|
||||||
|
"enabled": true,
|
||||||
|
"projectFiles": [
|
||||||
|
"..\\..\\..\\src\\MaksIT.Dapr\\MaksIT.Dapr.csproj"
|
||||||
|
],
|
||||||
|
"artifactsDir": "..\\..\\..\\release"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DotNetCreateArchive",
|
||||||
|
"stageLabel": "build",
|
||||||
|
"enabled": true,
|
||||||
|
"zipNamePattern": "maksit.dapr-{version}.zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ReleasePublishGuard",
|
||||||
|
"stageLabel": "release",
|
||||||
|
"enabled": true,
|
||||||
|
"branches": [
|
||||||
|
"main"
|
||||||
|
],
|
||||||
|
"requireExactTagOnHead": true,
|
||||||
|
"tagVersionMustMatchDotNetRelease": true,
|
||||||
|
"whenRequirementsNotMet": "skip",
|
||||||
|
"requireCleanWorkingTree": false,
|
||||||
|
"ensureTagOnRemote": true,
|
||||||
|
"remoteName": "origin"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHub",
|
||||||
|
"stageLabel": "release",
|
||||||
|
"enabled": true,
|
||||||
|
"githubToken": "GITHUB_MAKS_IT_COM",
|
||||||
|
"repository": "https://github.com/MAKS-IT-COM/maksit-core-dapr",
|
||||||
|
"releaseNotesFile": "..\\..\\..\\CHANGELOG.md",
|
||||||
|
"releaseTitlePattern": "Release {version}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DotNetNuGet",
|
||||||
|
"stageLabel": "release",
|
||||||
|
"enabled": true,
|
||||||
|
"nugetApiKey": "NUGET_MAKS_IT",
|
||||||
|
"source": "https://api.nuget.org/v3/index.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NpmReleaseVersion",
|
||||||
|
"stageLabel": "build",
|
||||||
|
"enabled": false,
|
||||||
|
"packageJsonPath": "..\\..\\..\\src\\package.json",
|
||||||
|
"syncWorkspaceVersions": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NpmBuild",
|
||||||
|
"stageLabel": "build",
|
||||||
|
"enabled": false,
|
||||||
|
"workspaceRoot": "..\\..\\..\\src",
|
||||||
|
"useCi": true,
|
||||||
|
"buildScript": "build"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NpmPublish",
|
||||||
|
"stageLabel": "release",
|
||||||
|
"enabled": false,
|
||||||
|
"npmApiKey": "NPMJS_MAKS_IT",
|
||||||
|
"registry": "https://registry.npmjs.org",
|
||||||
|
"access": "public",
|
||||||
|
"workspaceRoot": "..\\..\\..\\src",
|
||||||
|
"publishOrder": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DotNetDockerPush",
|
||||||
|
"stageLabel": "release",
|
||||||
|
"enabled": false,
|
||||||
|
"registryUrl": "cr.maks-it.com",
|
||||||
|
"credentialsEnvVar": "CR_MAKS_IT",
|
||||||
|
"projectName": "my-service",
|
||||||
|
"contextPath": "..\\..\\..\\src",
|
||||||
|
"pushLatest": true,
|
||||||
|
"images": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DotNetHelmPush",
|
||||||
|
"stageLabel": "release",
|
||||||
|
"enabled": false,
|
||||||
|
"chartPath": "..\\..\\..\\helm\\my-service",
|
||||||
|
"ociRepository": "oci://cr.maks-it.com/charts",
|
||||||
|
"credentialsEnvVar": "CR_MAKS_IT",
|
||||||
|
"pushLatest": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DotNetCleanupArtifacts",
|
||||||
|
"stageLabel": "release",
|
||||||
|
"enabled": true,
|
||||||
|
"includePatterns": [
|
||||||
|
"*"
|
||||||
|
],
|
||||||
|
"excludePatterns": [
|
||||||
|
"*.zip"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -11,7 +11,7 @@
|
|||||||
"stageLabel": "test",
|
"stageLabel": "test",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"projects": [
|
"projects": [
|
||||||
"..\\..\\MaksIT.Dapr.Tests"
|
"..\\..\\..\\src\\MaksIT.Dapr.Tests"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Loading…
Reference in New Issue
Block a user