public void SubstituteBasedSettingsInSuppliedVariables(RunningDeployment deployment)
        {
            var substituteInFilesEnabled = variables.GetFlag(PackageVariables.SubstituteInFilesEnabled);

            if (!substituteInFilesEnabled)
            {
                return;
            }

            var filesToTarget = variables.GetPaths(PackageVariables.SubstituteInFilesTargets);

            Substitute(deployment, filesToTarget);
        }
Beispiel #2
0
        /// <summary>
        /// Any values files explicitly specified by the user will also have variable substitution applied
        /// </summary>
        IEnumerable <string> ExplicitlySpecifiedValuesFiles()
        {
            var packageReferenceNames = variables.GetIndexes(PackageVariables.PackageCollection);

            foreach (var packageReferenceName in packageReferenceNames)
            {
                var paths = variables.GetPaths(SpecialVariables.Helm.Packages.ValuesFilePath(packageReferenceName));

                foreach (var path in paths)
                {
                    yield return(Path.Combine(PackageDirectory(packageReferenceName), path));
                }
            }
        }
Beispiel #3
0
        private IEnumerable <string> FileTargetFactory()
        {
            var packageReferenceNames = variables.GetIndexes(PackageVariables.PackageCollection);

            foreach (var packageReferenceName in packageReferenceNames)
            {
                var sanitizedPackageReferenceName = fileSystem.RemoveInvalidFileNameChars(packageReferenceName);
                var paths = variables.GetPaths(SpecialVariables.Helm.Packages.ValuesFilePath(packageReferenceName));

                foreach (var path in paths)
                {
                    yield return(Path.Combine(sanitizedPackageReferenceName, path));
                }
            }
        }
Beispiel #4
0
        IEnumerable <string> FileTargetFactory()
        {
            var packageReferenceNames = variables.GetIndexes(PackageVariables.PackageCollection);

            foreach (var packageReferenceName in packageReferenceNames)
            {
                var packageRoot = packageReferenceName;
                if (string.IsNullOrEmpty(packageReferenceName))
                {
                    packageRoot = variables.Get(PackageVariables.IndexedPackageId(packageReferenceName));
                }
                var sanitizedPackageReferenceName = fileSystem.RemoveInvalidFileNameChars(packageRoot ?? String.Empty);

                yield return(Path.Combine(sanitizedPackageReferenceName, "values.yaml"));

                var paths = variables.GetPaths(SpecialVariables.Helm.Packages.ValuesFilePath(packageReferenceName));

                foreach (var path in paths)
                {
                    yield return(Path.Combine(sanitizedPackageReferenceName, path));
                }
            }
        }
Beispiel #5
0
        public void SubstituteBasedSettingsInSuppliedVariables(RunningDeployment deployment)
        {
            var filesToTarget = variables.GetPaths(PackageVariables.SubstituteInFilesTargets);

            Substitute(deployment, filesToTarget);
        }
Beispiel #6
0
 public void ReplaceVariables(string currentDirectory)
 {
     ReplaceVariables(currentDirectory, variables.GetPaths(ActionVariables.StructuredConfigurationVariablesTargets));
 }
Beispiel #7
0
        public void SubstituteBasedSettingsInSuppliedVariables(string currentDirectory)
        {
            var filesToTarget = variables.GetPaths(PackageVariables.SubstituteInFilesTargets);

            Substitute(currentDirectory, filesToTarget);
        }