Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Task("Publish")
.IsDependentOn("Test")
.Does(()=>
{
Information("Publishing LoanRequestRetriever...");
var settingsRetriever = new DotNetCorePublishSettings
{
Configuration = "Release",
OutputDirectory = $"./artifacts/{lrrAppName}",
NoRestore = true
};
DotNetCorePublish("./LoanRequestRetriever/LoanRequestRetriever.csproj", settingsRetriever);
// open the config file
var lrrConfig = File($"./artifacts/{lrrAppName}/{lrrAppName}.exe.config");
// apply the actual dashboard settings
XmlPoke(lrrConfig,
"configuration/appSettings/add[@key='AzureWebJobsDashboard']/@value",
EnvironmentVariable("AzureWebJobsDashboard"));
// apply the actual azure storage settings
XmlPoke(lrrConfig,
"configuration/appSettings/add[@key='AzureWebJobsStorage']/@value",
EnvironmentVariable("AzureWebJobsDashboard"));
// set the schedule time for a timer triggered web job
XmlPoke(lrrConfig,
"configuration/appSettings/add[@key='CronExp']/@value",
EnvironmentVariable("CronExp"));
// Set the Splunk HEC host for logging
XmlPoke(lrrConfig,
"configuration/appSettings/add[@key='SplunkHost']/@value", splunkHost);
// Set the token that will be used with Splunk logging API
XmlPoke(lrrConfig,
"configuration/appSettings/add[@key='LRRToken']/@value", lrrToken);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment