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

            if (!substituteInFilesEnabled)
            {
                return;
            }

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

            Substitute(deployment, filesToTarget);
        }
Esempio n. 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));
                }
            }
        }
Esempio n. 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));
                }
            }
        }
Esempio n. 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));
                }
            }
        }
Esempio n. 5
0
        public void SubstituteBasedSettingsInSuppliedVariables(RunningDeployment deployment)
        {
            var filesToTarget = variables.GetPaths(PackageVariables.SubstituteInFilesTargets);

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

            Substitute(currentDirectory, filesToTarget);
        }