예제 #1
0
        private static void FillOctopusParamsFromEnv(this OctopusParams octopusParams)
        {
            var apikey = Environment.GetEnvironmentVariable("OCTOPUS_APIKEY");

            if (!string.IsNullOrWhiteSpace(apikey) && string.IsNullOrWhiteSpace(octopusParams.ApiKey))
            {
                octopusParams.ApiKey = apikey;
            }

            var server = Environment.GetEnvironmentVariable("OCTOPUS_SERVERURL");

            if (!string.IsNullOrWhiteSpace(server) && string.IsNullOrWhiteSpace(octopusParams.ServerUrl))
            {
                octopusParams.ServerUrl = server;
            }
        }
예제 #2
0
 public static void FillOctopusParams(this OctopusParams octopusParams)
 {
     FillOctopusParamsFromEnv(octopusParams);
 }