private static void RunTests() { if (!Options.IsTestRunDisabled) { WriteHeading("TESTING IMAGES"); foreach (string command in RepoInfo.TestCommands) { string[] parts = command.Split(' '); ExecuteHelper.Execute( parts[0], command.Substring(parts[0].Length + 1), Options.IsDryRun); } } }
private static void BuildImages() { WriteHeading("BUILDING IMAGES"); foreach (ImageInfo imageInfo in RepoInfo.Images.Where(image => image.Platform != null)) { Console.WriteLine($"-- BUILDING: {imageInfo.Platform.Model.Dockerfile}"); if (!Options.IsSkipPullingEnabled && imageInfo.Platform.IsExternalFromImage) { // Ensure latest base image exists locally before building ExecuteHelper.ExecuteWithRetry("docker", $"pull {imageInfo.Platform.FromImage}", Options.IsDryRun); } ExecuteHelper.Execute( "docker", $"build -t {string.Join(" -t ", imageInfo.Tags)} {imageInfo.Platform.Model.Dockerfile}", Options.IsDryRun); } }