Created
January 10, 2018 08:56
-
-
Save M0ses/6937665a01786a283ea75726c369c5b2 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
diff --git a/lib/sle2docker/native_image.rb b/lib/sle2docker/native_image.rb | |
index 955895e..ffb8b5d 100644 | |
--- a/lib/sle2docker/native_image.rb | |
+++ b/lib/sle2docker/native_image.rb | |
@@ -48,10 +48,18 @@ module Sle2Docker | |
@metadata = parse_metadata_file("#{match['metadata_file']}.metadata") | |
@repository = @metadata['image']['name'] | |
@tag = @metadata['image']['tags'][0] | |
+ verify_tag | |
@build = match['build'] | |
@image_id = "#{@repository}:#{@tag}" | |
end | |
+ def verify_tag | |
+ @tag.empty? && | |
+ raise(DockerTagError, | |
+ "First tag in metadata file not a valid tag.\n" + | |
+ "Please check your kiwi configuration and set a valid tag.") | |
+ end | |
+ | |
def parse_metadata_file(metadata) | |
file = File.read( | |
File.join(NativeImage::IMAGES_DIR, metadata) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment