generated from arcus-azure/arcus.github.template
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set isolated project option as default az func worker (#750)
* feat: set isolated project option as default az func worker * Update docker-integration-tests.yml * Update docker-integration-tests.yml * pr-fix: add 'using' for 'SensorReading' example model
- Loading branch information
1 parent
b6d34d5
commit d2bf712
Showing
19 changed files
with
129 additions
and
156 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
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
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
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
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
40 changes: 40 additions & 0 deletions
40
src/Arcus.Templates.Tests.Integration/AzureFunctions/AzureFunctionsProjectOptions.cs
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,40 @@ | ||
using System; | ||
using Arcus.Templates.Tests.Integration.Fixture; | ||
|
||
namespace Arcus.Templates.Tests.Integration.AzureFunctions | ||
{ | ||
/// <summary> | ||
/// Represents an simple set of options used in the Azure Functions project templates. | ||
/// </summary> | ||
public class AzureFunctionsProjectOptions : ProjectOptions | ||
{ | ||
/// <summary> | ||
/// Gets the Azure Functions worker type the project should target. | ||
/// </summary> | ||
public FunctionsWorker FunctionsWorker { get; protected set; } = FunctionsWorker.Isolated; | ||
|
||
/// <summary> | ||
/// Sets the Azure Functions worker type of the project template. | ||
/// </summary> | ||
/// <param name="workerType">The functions worker type.</param> | ||
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <paramref name="workerType"/> is outside the bounds of the enumeration.</exception> | ||
protected void SetFunctionsWorker(FunctionsWorker workerType) | ||
{ | ||
string workerTyperArgument = DetermineFunctionsWorkerArgument(workerType); | ||
AddOption($"--functions-worker {workerTyperArgument}"); | ||
|
||
FunctionsWorker = workerType; | ||
} | ||
|
||
private static string DetermineFunctionsWorkerArgument(FunctionsWorker workerType) | ||
{ | ||
switch (workerType) | ||
{ | ||
case FunctionsWorker.InProcess: return "inProcess"; | ||
case FunctionsWorker.Isolated: return "isolated"; | ||
default: | ||
throw new ArgumentOutOfRangeException(nameof(workerType), workerType, "Unknown functions worker type"); | ||
} | ||
} | ||
} | ||
} |
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
7 changes: 3 additions & 4 deletions
7
...ntegration/AzureFunctions/Databricks/JobMetrics/AzureFunctionsDatabricksProjectOptions.cs
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
Oops, something went wrong.