Created
July 2, 2018 00:22
-
-
Save explorer14/cda9ec8fd18f03c20ba16a5f781920bc to your computer and use it in GitHub Desktop.
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
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