Install https://github.com/Microsoft/artifacts-credprovider
Add a nuget.config file to your project, in the same folder as your .csproj or .sln file. E.g.:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
| #!/bin/bash | |
| # Substitute variables here | |
| ORG_NAME="<ORG_NAME>" | |
| GITHUB_INSTANCE="<GITHUB_INSTANCE>" | |
| URL="https://${GITHUB_INSTANCE}/api/v3/orgs/${ORG_NAME}/repos" | |
| curl ${URL} | ruby -rjson -e 'JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["clone_url"]} ]}' |
| docker run -d \ | |
| -e POSTGRES_PASSWORD=SuperSecret \ | |
| -v ~/postgresql/13/data:/var/lib/postgresql/data \ # windows: -v d:/postgresql/13/data:/var/lib/postgresql/data | |
| -p 5432:5432 \ | |
| --name postgres \ | |
| postgres:13 | |
| docker run -p 5050:80 -d \ | |
| -e '[email protected]' \ | |
| -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \ |
| mkdir -p /home/ubuntu/couchdb/data | |
| docker run -d \ | |
| --restart unless-stopped \ | |
| -v /home/ubuntu/couchdb/data:/opt/couchdb/data \ | |
| -e COUCHDB_USER=admin \ | |
| -e COUCHDB_PASSWORD=strongPassword \ | |
| -p 5984:5984 \ | |
| --name couchdb \ | |
| couchdb:latest |
| <ItemGroup> | |
| <Protobuf Include="..\Protos\greet.proto" GrpcServices="Server" Link="Protos\greet.proto" /> | |
| </ItemGroup> |
| public static class ServiceExtensions | |
| { | |
| /// <summary> | |
| /// Creates a custom configuration for easier development of Azure Functions. | |
| /// When environment is not Development, it adds support for keyvault | |
| /// </summary> | |
| /// <param name="builder"></param> | |
| /// <returns></returns> | |
| public static IConfiguration GetCustomConfiguration(this IFunctionsHostBuilder builder) | |
| { |
| # check to see if secret exists in keyvault, otherwise throw error | |
| $SecretName = "HttpClientConfiguration--ApiKey" | |
| $doesExist=$(az keyvault secret show ` | |
| --vault-name $KeyVaultName ` | |
| --name $SecretName ` | |
| --query id -o tsv) | |
| if ($doesExist) { | |
| echo "Secret '$SecretName' found in vault '$KeyVaultName' OK" | |
| } else { | |
| echo "Expecting secret '$SecretName' to be in vault '$KeyVaultName'" |
| builder.Services.Configure(delegate(ServiceBusOptions options) | |
| { | |
| options.MessageHandlerOptions.AutoComplete = false; | |
| }); |
| # Set other app settings | |
| $values = [System.IO.File]::ReadAllText($appSettings) | |
| $appSettingsList = $values.Split([System.Environment]::NewLine) | |
| echo "setting app settings: $appSettingsList" | |
| az functionapp config appsettings set ` | |
| --name $functionAppName ` | |
| --resource-group $resourceGroup ` | |
| --settings $appSettingsList |
| #!/bin/bash | |
| set -euo pipefail | |
| IFS=$'\n\t' | |
| # -e: immediately exit if any command has a non-zero exit status | |
| # -o: prevents errors in a pipeline from being masked | |
| # IFS new value is less likely to cause confusing bugs when looping arrays or arguments (e.g. $@) | |
| function usage() | |
| { |
Install https://github.com/Microsoft/artifacts-credprovider
Add a nuget.config file to your project, in the same folder as your .csproj or .sln file. E.g.:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>