This file contains hidden or 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
| $rawOutput = $bicepExpression | | |
| bicep console 2>&1 | | |
| Out-String | |
| `` |
This file contains hidden or 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
| $bicepExpression = @" | |
| func isValidEnvironment(env string) bool => contains(['dev','test','prod'], env) | |
| isValidEnvironment('dev') | |
| "@ |
This file contains hidden or 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
| $bicepFunction = "func isValidEnvironment(env string) bool => contains(['dev','test','prod'], env)" |
This file contains hidden or 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
| { | |
| "description": "Tests for custom isValidEnvironment function", | |
| "tests": [ | |
| { | |
| "name": "Dev environment is valid env", | |
| "bicepFile": "pathtoyourbicepfile.bicep", | |
| "functionCall": "isValidEnvironment('dev')", | |
| "expected": "true" | |
| }, | |
| { |
This file contains hidden or 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
| func isValidEnvironment(env string) bool => contains(['dev', 'test', 'prod'], env) |
This file contains hidden or 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
| - task: DotNetCoreCLI@2 | |
| displayName: 'Restore NuGet Packages' | |
| inputs: | |
| command: 'restore' | |
| projects: 'DemoAppWithPrivateNugetFeed/DemoAppWithPrivateNugetFeed.csproj' | |
| feedsToUse: 'config' | |
| nugetConfigPath: 'DemoAppWithPrivateNugetFeed/nuget.config' | |
| - task: DotNetCoreCLI@2 | |
| displayName: 'Basic Publish DemoAppsWithPrivateNugetFeed' |
This file contains hidden or 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
| - task: DotNetCoreCLI@2 | |
| displayName: 'Advanced Publish TestAPI' | |
| inputs: | |
| projects: 'TestAPI/TestAPI.csproj' | |
| command: 'publish' | |
| publishWebProjects: false | |
| arguments: >- | |
| -p ContainerRepository="testapiAlpine" | |
| -p ContainerImageTags="\"1.0.0;latest\"" | |
| -p Version="1.0.0.0" |
This file contains hidden or 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
| - task: DotNetCoreCLI@2 | |
| displayName: 'Basic Publish TestAPI' | |
| inputs: | |
| projects: 'TestAPI/TestAPI.csproj' | |
| command: 'publish' | |
| publishWebProjects: false | |
| arguments: '-p ContainerRegistry=myblogcontainerizedemo.azurecr.io' | |
| zipAfterPublish: false |
This file contains hidden or 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
| - task: Docker@2 | |
| inputs: | |
| containerRegistry: 'MyDemoACR' | |
| command: 'login' |
This file contains hidden or 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
| <PropertyGroup> | |
| ... | |
| <ContainerRepository>{name}</ContainerRepository> | |
| <ContainerBaseImage>mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0</ContainerBaseImage> | |
| </PropertyGroup> |
NewerOlder