-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from miles-no/feat(terraform)/azure-function
feat(terraform): azure function and service plan
- Loading branch information
Showing
23 changed files
with
629 additions
and
24 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
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,36 @@ | ||
name: Deploy DotNet project to Azure Function App | ||
|
||
on: | ||
[push] | ||
|
||
env: | ||
AZURE_FUNCTIONAPP_NAME: 'dev-aquaplatform-func' # set this to your function app name on Azure | ||
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'src/DataGeneratorFunction' # set this to the path to your function app project, defaults to the repository root | ||
DOTNET_VERSION: '8.0.x' # set this to the dotnet version to use (e.g. '2.1.x', '3.1.x', '5.0.x') | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: windows-latest | ||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: 'Resolve Project Dependencies Using Dotnet' | ||
shell: pwsh | ||
run: | | ||
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | ||
dotnet publish --configuration Release --output ./output | ||
popd | ||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: fa | ||
with: | ||
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }} | ||
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output' | ||
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} |
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,6 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-azuretools.vscode-azurefunctions", | ||
"ms-dotnettools.csharp" | ||
] | ||
} |
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,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Attach to .NET Functions", | ||
"type": "coreclr", | ||
"request": "attach", | ||
"processId": "${command:azureFunctions.pickProcess}" | ||
} | ||
] | ||
} |
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,8 @@ | ||
{ | ||
"azureFunctions.deploySubpath": "src/DataGeneratorFunction/bin/Release/net8.0/publish", | ||
"azureFunctions.projectLanguage": "C#", | ||
"azureFunctions.projectRuntime": "~4", | ||
"debug.internalConsoleOptions": "neverOpen", | ||
"azureFunctions.preDeployTask": "publish (functions)", | ||
"azureFunctions.projectSubpath": "src/DataGeneratorFunction" | ||
} |
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,81 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "clean (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"clean", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"problemMatcher": "$msCompile", | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/DataGeneratorFunction" | ||
} | ||
}, | ||
{ | ||
"label": "build (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"build", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"dependsOn": "clean (functions)", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": "$msCompile", | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/DataGeneratorFunction" | ||
} | ||
}, | ||
{ | ||
"label": "clean release (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"clean", | ||
"--configuration", | ||
"Release", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"problemMatcher": "$msCompile", | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/DataGeneratorFunction" | ||
} | ||
}, | ||
{ | ||
"label": "publish (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"publish", | ||
"--configuration", | ||
"Release", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"dependsOn": "clean release (functions)", | ||
"problemMatcher": "$msCompile", | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/DataGeneratorFunction" | ||
} | ||
}, | ||
{ | ||
"type": "func", | ||
"dependsOn": "build (functions)", | ||
"options": { | ||
"cwd": "${workspaceFolder}/src/DataGeneratorFunction" | ||
}, | ||
"command": "host start", | ||
"isBackground": true, | ||
"problemMatcher": "$func-dotnet-watch" | ||
} | ||
] | ||
} |
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,30 +1,32 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.5.002.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{A6ED9EDF-D599-47B8-A6B2-2844E3FEBF9C}" | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AquaApi", "src\AquaApi\AquaApi.csproj", "{35950192-252F-44A8-B710-63E470A67118}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AquaApi", "api\AquaApi\AquaApi.csproj", "{35950192-252F-44A8-B710-63E470A67118}" | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataGeneratorFunction", "src\DataGeneratorFunction\DataGeneratorFunction.csproj", "{3FFDA260-76E7-4E96-9F97-5B80E30FF2F2}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{35950192-252F-44A8-B710-63E470A67118}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{35950192-252F-44A8-B710-63E470A67118}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{35950192-252F-44A8-B710-63E470A67118}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{35950192-252F-44A8-B710-63E470A67118}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{35950192-252F-44A8-B710-63E470A67118} = {A6ED9EDF-D599-47B8-A6B2-2844E3FEBF9C} | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {00A64A12-39CC-40EA-996D-79EA6539A35B} | ||
EndGlobalSection | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{35950192-252F-44A8-B710-63E470A67118}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{35950192-252F-44A8-B710-63E470A67118}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{35950192-252F-44A8-B710-63E470A67118}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{35950192-252F-44A8-B710-63E470A67118}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{3FFDA260-76E7-4E96-9F97-5B80E30FF2F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3FFDA260-76E7-4E96-9F97-5B80E30FF2F2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3FFDA260-76E7-4E96-9F97-5B80E30FF2F2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3FFDA260-76E7-4E96-9F97-5B80E30FF2F2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {00A64A12-39CC-40EA-996D-79EA6539A35B} | ||
EndGlobalSection | ||
EndGlobal |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.