Skip to content

Commit

Permalink
Update for tap 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
macsux committed Mar 31, 2023
1 parent 6a35656 commit 27cbab2
Showing 1 changed file with 61 additions and 55 deletions.
116 changes: 61 additions & 55 deletions accelerator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ accelerator:
label: Config Server
dataType: boolean
description: Enable config server integration
inputType: toggle
inputType: checkbox
defaultValue: true
required: true
- name: enableSecurity
label: Enable Security
dataType: boolean
description: Enable security via JWT resource server
inputType: toggle
inputType: checkbox
defaultValue: true
required: true
engine:
Expand Down Expand Up @@ -145,17 +145,17 @@ engine:
substitutions:
- text: |2-
<!--#if configserver -->
<PackageReference Include="Steeltoe.Extensions.Configuration.ConfigServerCore" Version="3.1.3" />
<PackageReference Include="Steeltoe.Extensions.Configuration.ConfigServerCore" Version="$(SteeltoeVersion)" />
<!--#endif -->
with: "''"
condition: '!(#configserver)'
- type: ReplaceText
substitutions:
- text: |2-
<!--#if configserver -->
<PackageReference Include="Steeltoe.Extensions.Configuration.ConfigServerCore" Version="3.1.3" />
<PackageReference Include="Steeltoe.Extensions.Configuration.ConfigServerCore" Version="$(SteeltoeVersion)" />
<!--#endif -->
with: "' <PackageReference Include=\"Steeltoe.Extensions.Configuration.ConfigServerCore\" Version=\"3.1.3\" />'"
with: "' <PackageReference Include=\"Steeltoe.Extensions.Configuration.ConfigServerCore\" Version=\"$(SteeltoeVersion)\" />'"
condition: '#configserver'
- include:
- config/application-Development.yaml
Expand Down Expand Up @@ -412,6 +412,32 @@ engine:
Bearer:
Authority: https://login.run.pcfone.io'
condition: '#enableSecurity'
- include:
- src/MyProjectGroup.DotnetAccelerator/bin/.buildsync/config/solution-defaults.yaml
chain:
- type: ReplaceText
substitutions:
- text: |-
#if enableSecurity
Authentication:
Bearer:
Authority: https://accounts.google.com
#endif
with: "''"
condition: '!(#enableSecurity)'
- type: ReplaceText
substitutions:
- text: |-
#if enableSecurity
Authentication:
Bearer:
Authority: https://accounts.google.com
#endif
with: |-
'Authentication:
Bearer:
Authority: https://accounts.google.com'
condition: '#enableSecurity'
- include:
- src/MyProjectGroup.DotnetAccelerator/Properties/launchSettings.json
chain:
Expand All @@ -426,7 +452,7 @@ engine:
"applicationUrl": "https://localhost:5001;http://localhost:5000;http://localhost:8090",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"PROFILES:ACTIVE": "LocalPostgreSQL"
"SPRING:PROFILES:ACTIVE": "LocalPostgreSQL"
}
},
//#endif
Expand All @@ -443,7 +469,7 @@ engine:
"applicationUrl": "https://localhost:5001;http://localhost:5000;http://localhost:8090",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"PROFILES:ACTIVE": "LocalPostgreSQL"
"SPRING:PROFILES:ACTIVE": "LocalPostgreSQL"
}
},
//#endif
Expand All @@ -455,7 +481,7 @@ engine:
"applicationUrl": "https://localhost:5001;http://localhost:5000;http://localhost:8090",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"PROFILES:ACTIVE": "LocalPostgreSQL"
"SPRING:PROFILES:ACTIVE": "LocalPostgreSQL"
}
},'
condition: '#postgresql'
Expand All @@ -470,7 +496,7 @@ engine:
"applicationUrl": "https://localhost:5001;http://localhost:5000;http://localhost:8090",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"PROFILES:ACTIVE": "LocalMySQL"
"SPRING:PROFILES:ACTIVE": "LocalMySQL"
}
},
//#endif
Expand All @@ -487,7 +513,7 @@ engine:
"applicationUrl": "https://localhost:5001;http://localhost:5000;http://localhost:8090",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"PROFILES:ACTIVE": "LocalMySQL"
"SPRING:PROFILES:ACTIVE": "LocalMySQL"
}
},
//#endif
Expand All @@ -499,20 +525,20 @@ engine:
"applicationUrl": "https://localhost:5001;http://localhost:5000;http://localhost:8090",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"PROFILES:ACTIVE": "LocalMySQL"
"SPRING:PROFILES:ACTIVE": "LocalMySQL"
}
},'
condition: '#mysql'
- include:
- src/MyProjectGroup.DotnetAccelerator/bin/.buildsync/config/solution-defaults.yaml
- src/MyProjectGroup.DotnetAccelerator/bin/Debug/net6.0/config/solution-defaults.Development.yaml
chain:
- type: ReplaceText
substitutions:
- text: |-
#if enableSecurity
Authentication:
Bearer:
Authority: https://accounts.google.com
Authority: https://login.run.pcfone.io
#endif
with: "''"
condition: '!(#enableSecurity)'
Expand All @@ -522,12 +548,12 @@ engine:
#if enableSecurity
Authentication:
Bearer:
Authority: https://accounts.google.com
Authority: https://login.run.pcfone.io
#endif
with: |-
'Authentication:
Bearer:
Authority: https://accounts.google.com'
Authority: https://login.run.pcfone.io'
condition: '#enableSecurity'
- include:
- src/MyProjectGroup.Common/Persistence/DbType.cs
Expand Down Expand Up @@ -565,41 +591,15 @@ engine:
with: "' MySQL,'"
condition: '#mysql'
- include:
- src/MyProjectGroup.Common/Security/KnownAuthorizationPolicy.cs
chain:
- type: ReplaceText
substitutions:
- text: |-
#if enableSecurity
public const string AirportRead = "airport.read";
public const string WeatherRead = "airport.read";
public const string WeatherWrite = "airport.read";
#endif
with: "''"
condition: '!(#enableSecurity)'
- type: ReplaceText
substitutions:
- text: |-
#if enableSecurity
public const string AirportRead = "airport.read";
public const string WeatherRead = "airport.read";
public const string WeatherWrite = "airport.read";
#endif
with: |-
' public const string AirportRead = "airport.read";
public const string WeatherRead = "airport.read";
public const string WeatherWrite = "airport.read";'
condition: '#enableSecurity'
- include:
- src/MyProjectGroup.DotnetAccelerator/bin/Debug/net6.0/config/solution-defaults.Development.yaml
- src/MyProjectGroup.DotnetAccelerator/bin/Debug/net6.0/config/solution-defaults.yaml
chain:
- type: ReplaceText
substitutions:
- text: |-
#if enableSecurity
Authentication:
Bearer:
Authority: https://login.run.pcfone.io
Authority: https://accounts.google.com
#endif
with: "''"
condition: '!(#enableSecurity)'
Expand All @@ -609,38 +609,38 @@ engine:
#if enableSecurity
Authentication:
Bearer:
Authority: https://login.run.pcfone.io
Authority: https://accounts.google.com
#endif
with: |-
'Authentication:
Bearer:
Authority: https://login.run.pcfone.io'
Authority: https://accounts.google.com'
condition: '#enableSecurity'
- include:
- src/MyProjectGroup.DotnetAccelerator/bin/Debug/net6.0/config/solution-defaults.yaml
- src/MyProjectGroup.Common/Security/KnownAuthorizationPolicy.cs
chain:
- type: ReplaceText
substitutions:
- text: |-
#if enableSecurity
Authentication:
Bearer:
Authority: https://accounts.google.com
public const string AirportRead = "airport.read";
public const string WeatherRead = "airport.read";
public const string WeatherWrite = "airport.read";
#endif
with: "''"
condition: '!(#enableSecurity)'
- type: ReplaceText
substitutions:
- text: |-
#if enableSecurity
Authentication:
Bearer:
Authority: https://accounts.google.com
public const string AirportRead = "airport.read";
public const string WeatherRead = "airport.read";
public const string WeatherWrite = "airport.read";
#endif
with: |-
'Authentication:
Bearer:
Authority: https://accounts.google.com'
' public const string AirportRead = "airport.read";
public const string WeatherRead = "airport.read";
public const string WeatherWrite = "airport.read";'
condition: '#enableSecurity'
- include:
- tests/DotnetAcceleratorTests/bin/Debug/net6.0/config/solution-defaults.Development.yaml
Expand Down Expand Up @@ -833,6 +833,9 @@ engine:
- type: RewritePath
regex: DotnetAccelerator.sln
rewriteTo: "'' + #artifactId + '.sln'"
- type: RewritePath
regex: src/MyProjectGroup.Common/Application.cs
rewriteTo: "'src/' + #namespace + '.Common/Application.cs'"
- type: RewritePath
regex: src/MyProjectGroup.Common/BootstrapLoggerFactory.cs
rewriteTo: "'src/' + #namespace + '.Common/BootstrapLoggerFactory.cs'"
Expand Down Expand Up @@ -890,6 +893,9 @@ engine:
- type: RewritePath
regex: src/MyProjectGroup.Common/Swagger/SwaggerGenOptionsExtensions.cs
rewriteTo: "'src/' + #namespace + '.Common/Swagger/SwaggerGenOptionsExtensions.cs'"
- type: RewritePath
regex: src/MyProjectGroup.Common/WebApplicationBuilderExtensions.cs
rewriteTo: "'src/' + #namespace + '.Common/WebApplicationBuilderExtensions.cs'"
- type: RewritePath
regex: src/MyProjectGroup.DotnetAccelerator/Dockerfile
rewriteTo: "'src/' + #namespace + '.' + #artifactId + '/Dockerfile'"
Expand Down

0 comments on commit 27cbab2

Please sign in to comment.