Move build and deployment scripts
This commit moves various build scripts, Docker-related files, Kubernetes deployment configurations, and migration scripts.
This commit is contained in:
parent
d308ea6a63
commit
426b9bcde3
2
.github/workflows/packages.yml
vendored
2
.github/workflows/packages.yml
vendored
|
|
@ -79,7 +79,7 @@ jobs:
|
|||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: dotnet sonarscanner begin /k:"elsa-workflows_elsa-core" /o:"elsa-workflows" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.exclusions=**/obj/**,**/*.dll,build/**,samples/**,src/apps/** /d:"sonar.verbose=true" /d:sonar.cs.opencover.reportsPaths=**/testresults/**/coverage.opencover.xml
|
||||
- name: Compile+Test+Pack
|
||||
run: ./build.sh Compile+Test+Pack --version ${VERSION} --analyseCode true
|
||||
run: ./scripts/nuke/build.sh Compile+Test+Pack --version ${VERSION} --analyseCode true
|
||||
- name: End SonarCloud analysis
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
|
|
|||
2
.github/workflows/pr.yml
vendored
2
.github/workflows/pr.yml
vendored
|
|
@ -30,4 +30,4 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: 'Run: Compile, Test, Pack'
|
||||
run: ./build.cmd Compile Test Pack
|
||||
run: ./scripts/nuke/build.cmd Compile Test Pack
|
||||
|
|
|
|||
37
Elsa.sln
37
Elsa.sln
|
|
@ -15,10 +15,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution", "solution", "{7D
|
|||
ProjectSection(SolutionItems) = preProject
|
||||
.editorconfig = .editorconfig
|
||||
.gitignore = .gitignore
|
||||
build-and-run-all-in-one-web-docker.sh = build-and-run-all-in-one-web-docker.sh
|
||||
Directory.Build.props = Directory.Build.props
|
||||
Directory.Packages.props = Directory.Packages.props
|
||||
docker-compose.yml = docker-compose.yml
|
||||
icon.png = icon.png
|
||||
NuGet.Config = NuGet.Config
|
||||
README.md = README.md
|
||||
|
|
@ -283,7 +281,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pipelines", "pipelines", "{
|
|||
.github\workflows\elsa-server.yml = .github\workflows\elsa-server.yml
|
||||
.github\workflows\elsa-studio.yml = .github\workflows\elsa-studio.yml
|
||||
.github\workflows\packages.yml = .github\workflows\packages.yml
|
||||
build.sh = build.sh
|
||||
.github\workflows\bounty.yml = .github\workflows\bounty.yml
|
||||
.github\workflows\pr.yml = .github\workflows\pr.yml
|
||||
EndProjectSection
|
||||
|
|
@ -298,14 +295,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.Samples.AspNet.Heartbe
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.MassTransit.AzureServiceBus", "src\modules\Elsa.MassTransit.AzureServiceBus\Elsa.MassTransit.AzureServiceBus.csproj", "{AFEB799E-82C3-4D02-9D5C-766BB8DEF004}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "migrations", "migrations", "{C80C8231-D35C-4ACC-9ED6-9F3DB221535E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
migrations\README.md = migrations\README.md
|
||||
migrations\efcore-3.1.sh = migrations\efcore-3.1.sh
|
||||
migrations\efcore-3.2.sh = migrations\efcore-3.2.sh
|
||||
migrations\efcore-3.0.sh = migrations\efcore-3.0.sh
|
||||
migrations\efcore-3.3.sh = migrations\efcore-3.3.sh
|
||||
EndProjectSection
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{C80C8231-D35C-4ACC-9ED6-9F3DB221535E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Elsa.Alterations.IntegrationTests", "test\integration\Elsa.Alterations.IntegrationTests\Elsa.Alterations.IntegrationTests.csproj", "{F50336DA-42D1-4DD1-A107-67AFEB8A33EE}"
|
||||
EndProject
|
||||
|
|
@ -377,34 +367,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.ProtoActor.Core", "src
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Caching.Distributed.ProtoActor", "src\modules\Elsa.Caching.Distributed.ProtoActor\Elsa.Caching.Distributed.ProtoActor.csproj", "{47FBCB04-0C2D-453C-BE2F-7052CAC22524}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deployment", "deployment", "{B32DB9B2-AD6C-48A5-8682-4373CB045185}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "k8s", "k8s", "{B32DB9B2-AD6C-48A5-8682-4373CB045185}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "elsa-server", "elsa-server", "{454652D5-E1BB-4D4B-9B21-9CEFC900C4FB}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
deployment\elsa-server\deployment.yaml = deployment\elsa-server\deployment.yaml
|
||||
deployment\elsa-server\service.yaml = deployment\elsa-server\service.yaml
|
||||
deployment\elsa-server\service-account.yml = deployment\elsa-server\service-account.yml
|
||||
deployment\elsa-server\role.yaml = deployment\elsa-server\role.yaml
|
||||
deployment\elsa-server\role-binding.yaml = deployment\elsa-server\role-binding.yaml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "postgres", "postgres", "{31089E79-694B-4F45-97AF-86D34A7B231E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
deployment\postgres\deployment.yaml = deployment\postgres\deployment.yaml
|
||||
deployment\postgres\config-map.yaml = deployment\postgres\config-map.yaml
|
||||
deployment\postgres\service.yml = deployment\postgres\service.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plant-uml", "plant-uml", "{6DDB9ECF-D454-4894-A262-A6BB3026E61E}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
deployment\plant-uml\deployment.yaml = deployment\plant-uml\deployment.yaml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "trace-lens", "trace-lens", "{16B570BC-E293-4A19-B20E-5C97BAF8476B}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
deployment\trace-lens\deployment.yaml = deployment\trace-lens\deployment.yaml
|
||||
deployment\trace-lens\service.yaml = deployment\trace-lens\service.yaml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "integrations", "integrations", "{EBD0CF78-C5D7-4B4B-94C9-C5D8C20B6F59}"
|
||||
EndProject
|
||||
|
|
@ -424,6 +395,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Agents.Management", "s
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Elsa.Agents.Persistence", "src\modules\Elsa.Agents.Persistence\Elsa.Agents.Persistence.csproj", "{6FE60BB4-DE6A-485C-A38A-1317C56AF2DA}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuke", "nuke", "{6B921B30-0396-406E-9238-03ED6AC839EC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -1145,6 +1118,8 @@ Global
|
|||
{F620D7DC-B58D-4BD0-81A2-E88A2C1E4833} = {50470834-4CD8-479A-8B58-0A1869BA5D37}
|
||||
{9BF476B6-24BA-4312-9DFF-9082B1577046} = {50470834-4CD8-479A-8B58-0A1869BA5D37}
|
||||
{6FE60BB4-DE6A-485C-A38A-1317C56AF2DA} = {50470834-4CD8-479A-8B58-0A1869BA5D37}
|
||||
{B32DB9B2-AD6C-48A5-8682-4373CB045185} = {C80C8231-D35C-4ACC-9ED6-9F3DB221535E}
|
||||
{6B921B30-0396-406E-9238-03ED6AC839EC} = {C80C8231-D35C-4ACC-9ED6-9F3DB221535E}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D4B5CEAA-7D70-4FCB-A68E-B03FBE5E0E5E}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<RootNamespace/>
|
||||
<NoWarn>CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006</NoWarn>
|
||||
<NukeRootDirectory>..</NukeRootDirectory>
|
||||
<NukeScriptDirectory>..</NukeScriptDirectory>
|
||||
<NukeScriptDirectory>../scripts/nuke/</NukeScriptDirectory>
|
||||
<NukeTelemetryVersion>1</NukeTelemetryVersion>
|
||||
<NukeExcludeLogs>true</NukeExcludeLogs>
|
||||
<NukeExcludeDirectoryBuild>true</NukeExcludeDirectoryBuild>
|
||||
|
|
|
|||
|
|
@ -1,41 +1,42 @@
|
|||
using Elsa.Samples.AspNet.Onboarding.Web.Data;
|
||||
using Elsa.Samples.AspNet.Onboarding.Web.Entities;
|
||||
using Elsa.Samples.AspNet.Onboarding.Web.Models;
|
||||
using Elsa.Samples.AspNet.Onboarding.Web.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Elsa.Samples.AspNet.Onboarding.Web.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/webhooks")]
|
||||
public class WebhookController : Controller
|
||||
public class WebhookController(OnboardingDbContext dbContext, ElsaClient elsaClient) : Controller
|
||||
{
|
||||
private readonly OnboardingDbContext _dbContext;
|
||||
|
||||
public WebhookController(OnboardingDbContext dbContext)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
}
|
||||
|
||||
[HttpPost("run-task")]
|
||||
public async Task<IActionResult> RunTask(WebhookEvent webhookEvent)
|
||||
public async Task<IActionResult> RunTask(WebhookEvent webhookEvent, CancellationToken cancellationToken)
|
||||
{
|
||||
var payload = webhookEvent.Payload;
|
||||
var taskPayload = payload.TaskPayload;
|
||||
var employee = taskPayload.Employee;
|
||||
|
||||
var task = new OnboardingTask
|
||||
var result = new
|
||||
{
|
||||
ProcessId = payload.WorkflowInstanceId,
|
||||
ExternalId = payload.TaskId,
|
||||
Name = payload.TaskName,
|
||||
Description = taskPayload.Description,
|
||||
EmployeeEmail = employee.Email,
|
||||
EmployeeName = employee.Name,
|
||||
CreatedAt = DateTimeOffset.Now
|
||||
Magic = Random.Shared.NextDouble()
|
||||
};
|
||||
await elsaClient.ReportTaskCompletedAsync(webhookEvent.Payload.TaskId, result, cancellationToken);
|
||||
|
||||
await _dbContext.Tasks.AddAsync(task);
|
||||
await _dbContext.SaveChangesAsync();
|
||||
// var employee = taskPayload.Employee;
|
||||
//
|
||||
// var task = new OnboardingTask
|
||||
// {
|
||||
// ProcessId = payload.WorkflowInstanceId,
|
||||
// ExternalId = payload.TaskId,
|
||||
// Name = payload.TaskName,
|
||||
// Description = taskPayload.Description,
|
||||
// EmployeeEmail = employee.Email,
|
||||
// EmployeeName = employee.Name,
|
||||
// CreatedAt = DateTimeOffset.Now
|
||||
// };
|
||||
//
|
||||
// await dbContext.Tasks.AddAsync(task);
|
||||
// await dbContext.SaveChangesAsync();
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue