-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1636261
commit 6b53052
Showing
5 changed files
with
161 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build and deploy .NET Core application to Web App BerryJuice20240725020110 | ||
on: | ||
push: | ||
branches: | ||
- Shirasagi/Infrastructure/AddPostgresqlDependency | ||
env: | ||
AZURE_WEBAPP_NAME: BerryJuice20240725020110 | ||
AZURE_WEBAPP_PACKAGE_PATH: src\BerryJuice\published | ||
CONFIGURATION: Release | ||
DOTNET_CORE_VERSION: 8.0.x | ||
WORKING_DIRECTORY: src\BerryJuice | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup .NET SDK | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_CORE_VERSION }} | ||
- name: Restore | ||
run: dotnet restore "${{ env.WORKING_DIRECTORY }}" | ||
- name: Build | ||
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore | ||
- name: Test | ||
run: dotnet test "${{ env.WORKING_DIRECTORY }}" --no-build | ||
- name: Publish | ||
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}" | ||
- name: Publish Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: webapp | ||
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} | ||
deploy: | ||
runs-on: windows-latest | ||
needs: build | ||
steps: | ||
- name: Download artifact from build job | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: webapp | ||
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} | ||
- name: Deploy to Azure WebApp | ||
uses: azure/webapps-deploy@v2 | ||
with: | ||
app-name: ${{ env.AZURE_WEBAPP_NAME }} | ||
publish-profile: ${{ secrets.BerryJuice20240725020110_E884 }} | ||
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
src/BerryJuice/Properties/ServiceDependencies/local/mssql1.arm.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"resourceGroupName": { | ||
"type": "string", | ||
"defaultValue": "BerryJuice20240725020110ResourceGroup", | ||
"metadata": { | ||
"_parameterType": "resourceGroup", | ||
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking." | ||
} | ||
}, | ||
"resourceGroupLocation": { | ||
"type": "string", | ||
"defaultValue": "eastus", | ||
"metadata": { | ||
"_parameterType": "location", | ||
"description": "Location of the resource group. Resource groups could have different location than resources." | ||
} | ||
}, | ||
"resourceLocation": { | ||
"type": "string", | ||
"defaultValue": "[parameters('resourceGroupLocation')]", | ||
"metadata": { | ||
"_parameterType": "location", | ||
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there." | ||
} | ||
} | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Resources/resourceGroups", | ||
"name": "[parameters('resourceGroupName')]", | ||
"location": "[parameters('resourceGroupLocation')]", | ||
"apiVersion": "2019-10-01" | ||
}, | ||
{ | ||
"type": "Microsoft.Resources/deployments", | ||
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat('berryjuice', subscription().subscriptionId)))]", | ||
"resourceGroup": "[parameters('resourceGroupName')]", | ||
"apiVersion": "2019-10-01", | ||
"dependsOn": [ | ||
"[parameters('resourceGroupName')]" | ||
], | ||
"properties": { | ||
"mode": "Incremental", | ||
"template": { | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"resources": [ | ||
{ | ||
"kind": "v12.0", | ||
"location": "[parameters('resourceLocation')]", | ||
"name": "sastcsharp", | ||
"type": "Microsoft.Sql/servers", | ||
"apiVersion": "2017-10-01-preview" | ||
}, | ||
{ | ||
"sku": { | ||
"name": "GP_S_Gen5", | ||
"tier": "GeneralPurpose", | ||
"family": "Gen5", | ||
"capacity": 1 | ||
}, | ||
"kind": "v12.0,user,vcore,serverless,freelimit", | ||
"location": "[parameters('resourceLocation')]", | ||
"name": "sastcsharp/berryjuice", | ||
"type": "Microsoft.Sql/servers/databases", | ||
"apiVersion": "2017-10-01-preview", | ||
"dependsOn": [ | ||
"sastcsharp" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"metadata": { | ||
"_dependencyType": "mssql.azure" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,9 @@ | |
"applicationUrl": "http://localhost:5271", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"BERRYJUICE_USE_BLAZOR": "true" | ||
"BERRYJUICE_USE_BLAZOR": "true", | ||
"VaultUri": "https://berryjuicevault.vault.azure.net/", | ||
"AZURE_USERNAME": "[email protected]" | ||
} | ||
}, | ||
"https": { | ||
|
@@ -19,7 +21,9 @@ | |
"applicationUrl": "https://localhost:5272;http://localhost:5271", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"BERRYJUICE_USE_BLAZOR": "true" | ||
"BERRYJUICE_USE_BLAZOR": "true", | ||
"VaultUri": "https://berryjuicevault.vault.azure.net/", | ||
"AZURE_USERNAME": "[email protected]" | ||
} | ||
}, | ||
"http (WebAPI Only)": { | ||
|
@@ -30,7 +34,9 @@ | |
"applicationUrl": "http://localhost:5271", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"BERRYJUICE_USE_BLAZOR": "false" | ||
"BERRYJUICE_USE_BLAZOR": "false", | ||
"VaultUri": "https://berryjuicevault.vault.azure.net/", | ||
"AZURE_USERNAME": "[email protected]" | ||
} | ||
}, | ||
"https (WebAPI Only)": { | ||
|
@@ -41,7 +47,9 @@ | |
"applicationUrl": "https://localhost:5272;http://localhost:5271", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"BERRYJUICE_USE_BLAZOR": "false" | ||
"BERRYJUICE_USE_BLAZOR": "false", | ||
"VaultUri": "https://berryjuicevault.vault.azure.net/", | ||
"AZURE_USERNAME": "[email protected]" | ||
} | ||
}, | ||
"Container (Dockerfile)": { | ||
|
@@ -50,7 +58,9 @@ | |
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", | ||
"environmentVariables": { | ||
"ASPNETCORE_HTTPS_PORTS": "5272", | ||
"ASPNETCORE_HTTP_PORTS": "5271" | ||
"ASPNETCORE_HTTP_PORTS": "5271", | ||
"VaultUri": "https://berryjuicevault.vault.azure.net/", | ||
"AZURE_USERNAME": "[email protected]" | ||
}, | ||
"publishAllPorts": true, | ||
"useSSL": true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
{ | ||
"dependencies": { | ||
"mssql1": { | ||
"type": "mssql", | ||
"connectionId": "ConnectionStrings:CSharpGroupAzure" | ||
}, | ||
"secrets2": { | ||
"type": "secrets", | ||
"connectionId": null | ||
}, | ||
"postgresql1": { | ||
"type": "postgresql", | ||
"connectionId": "Berryjuice_PostgresConnection" | ||
"ignored": "true", | ||
"type": "postgresql" | ||
}, | ||
"secrets1": { | ||
"ignored": "true", | ||
"type": "secrets.keyVault" | ||
} | ||
} | ||
} |