工具生成版本
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"applications": {
|
||||
"Hua.Abp.Demo.HttpApi.Host": {
|
||||
"type": "dotnet-project",
|
||||
"launchUrl": "https://localhost:44322",
|
||||
"path": "../../../src/Hua.Abp.Demo.HttpApi.Host/Hua.Abp.Demo.HttpApi.Host.csproj",
|
||||
"kubernetesService": ".*-httpapihost$",
|
||||
"healthCheckEndpoint": "/health-status",
|
||||
"healthUiEndpoint": "/health-ui",
|
||||
"execution": {
|
||||
"order": 4
|
||||
}
|
||||
},
|
||||
"Hua.Abp.Demo.Angular": {
|
||||
"type": "cli",
|
||||
"workingDirectory": "../../../angular",
|
||||
"startCommand": "./start.ps1",
|
||||
"launchUrl": "http://localhost:4200",
|
||||
"kubernetesService": ".*-angular$",
|
||||
"execution": {
|
||||
"order": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"containers": {
|
||||
"serviceName": "Demo-Containers",
|
||||
},
|
||||
"tasks":{
|
||||
"Initialize Solution":{
|
||||
"behaviour": 2,
|
||||
"startCommand": "./initialize-solution.ps1",
|
||||
"workingDirectory": "../../scripts",
|
||||
"shortDescription": "Installs required UI libraries, creates required certificates and seeds the database."
|
||||
},
|
||||
"Migrate Database":{
|
||||
"behaviour": 0,
|
||||
"startCommand": "./migrate-database.ps1",
|
||||
"workingDirectory": "../../scripts",
|
||||
"shortDescription": "Migrates the database to the latest version."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
|
||||
$jobs = @()
|
||||
|
||||
$jobs += Start-Job -Name "InstallLibs" -ScriptBlock {
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-Location (Join-Path $using:scriptRoot "../../")
|
||||
abp install-libs
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "abp install-libs exited with code $LASTEXITCODE"
|
||||
}
|
||||
}
|
||||
|
||||
$jobs += Start-Job -Name "DbMigrator" -ScriptBlock {
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-Location (Join-Path $using:scriptRoot "../../src/Hua.Abp.Demo.DbMigrator")
|
||||
dotnet run
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "dotnet run (DbMigrator) exited with code $LASTEXITCODE"
|
||||
}
|
||||
}
|
||||
|
||||
$jobs += Start-Job -Name "DevCert" -ScriptBlock {
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-Location (Join-Path $using:scriptRoot "../../src/Hua.Abp.Demo.HttpApi.Host")
|
||||
dotnet dev-certs https -v -ep openiddict.pfx -p a8dad6bd-08cf-40f9-baaf-873686b50b75
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "dotnet dev-certs exited with code $LASTEXITCODE"
|
||||
}
|
||||
}
|
||||
|
||||
Wait-Job $jobs | Out-Null
|
||||
|
||||
$failed = $jobs | Where-Object { $_.State -eq 'Failed' }
|
||||
$hasError = $failed.Count -gt 0
|
||||
|
||||
if ($hasError) {
|
||||
foreach ($job in $failed) {
|
||||
[Console]::Error.WriteLine("Job '$($job.Name)' FAILED")
|
||||
}
|
||||
|
||||
Remove-Job $jobs | Out-Null
|
||||
exit -1
|
||||
}
|
||||
|
||||
Remove-Job $jobs | Out-Null
|
||||
exit 0
|
||||
@@ -0,0 +1,30 @@
|
||||
$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
|
||||
$jobs = @()
|
||||
|
||||
$jobs += Start-Job -Name "DbMigrator" -ScriptBlock {
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-Location (Join-Path $using:scriptRoot "../../src/Hua.Abp.Demo.DbMigrator")
|
||||
dotnet run
|
||||
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "dotnet run (DbMigrator) exited with code $LASTEXITCODE"
|
||||
}
|
||||
}
|
||||
|
||||
Wait-Job $jobs | Out-Null
|
||||
|
||||
$failed = $jobs | Where-Object { $_.State -eq 'Failed' }
|
||||
$hasError = $failed.Count -gt 0
|
||||
|
||||
if ($hasError) {
|
||||
foreach ($job in $failed) {
|
||||
[Console]::Error.WriteLine("Job '$($job.Name)' FAILED")
|
||||
}
|
||||
|
||||
Remove-Job $jobs | Out-Null
|
||||
exit -1
|
||||
}
|
||||
|
||||
Remove-Job $jobs | Out-Null
|
||||
exit 0
|
||||
Reference in New Issue
Block a user