CORD-1732 Fix publish of images managed by ImageBuilder

Change-Id: Id95481973f183615188874c283467ddfe60e5978
diff --git a/Makefile b/Makefile
index 36c7906..2b35556 100644
--- a/Makefile
+++ b/Makefile
@@ -125,6 +125,7 @@
 clean-images:
 	rm -f $(M)/docker-images $(M)/local-docker-images $(M)/core-image $(M)/local-core-image $(M)/build-maas-images $(M)/build-onos-apps
 
+
 clean-genconfig:
 	rm -f $(CONFIG_FILES)
 
@@ -210,7 +211,7 @@
 	touch $@
 
 $(M)/publish-maas-images: | $(M)/maas-prime $(M)/build-maas-images
-	$(SSH_BUILD) "cd $(BUILD_CORD_DIR)/build/maas; make MAKE_CONFIG=../$(MAKEFILE_CONFIG) publish" $(LOGCMD)
+	$(SSH_BUILD) "cd $(BUILD_CORD_DIR)/build/maas; rm -f consul.publish; make MAKE_CONFIG=../$(MAKEFILE_CONFIG) publish" $(LOGCMD)
 	touch $@
 
 $(M)/deploy-maas: | $(M)/publish-maas-images $(M)/cord-config $(M)/copy-config
diff --git a/scripts/imagebuilder.py b/scripts/imagebuilder.py
index 4e13622..1c94f88 100755
--- a/scripts/imagebuilder.py
+++ b/scripts/imagebuilder.py
@@ -1141,6 +1141,7 @@
             self.pulled.append({
                     "id": pulled_image['Id'],
                     "tags": pulled_image['RepoTags'],
+                    "base": image.name.split(":")[0],
                 })
 
             self.tag_image(image)
@@ -1243,6 +1244,7 @@
                     "push_name": image.raw_name,
                     "build_log": bl_path,
                     "duration": duration.total_seconds(),
+                    "base": image.name.split(":")[0],
                 })
 
             self.tag_image(image)