label docker container with current XOS commit data

Change-Id: I9772400f805d3bab4c80b24db5dee056a9b68766
diff --git a/containers/xos/Dockerfile.devel b/containers/xos/Dockerfile.devel
index 83c108a..a7a0994 100644
--- a/containers/xos/Dockerfile.devel
+++ b/containers/xos/Dockerfile.devel
@@ -1,5 +1,11 @@
 FROM xosproject/xos-base
 
+ARG XOS_GIT_COMMIT_HASH=unknown
+ARG XOS_GIT_COMMIT_DATE=unknown
+
+LABEL XOS_GIT_COMMIT_HASH=$XOS_GIT_COMMIT_HASH
+LABEL XOS_GIT_COMMIT_DATE=$XOS_GIT_COMMIT_DATE
+
 # Include certificates from Openstack
 ADD containers/xos/local_certs.crt /usr/local/share/ca-certificates/local_certs.crt
 RUN update-ca-certificates
diff --git a/containers/xos/Makefile b/containers/xos/Makefile
index 1f856b7..bc869f7 100644
--- a/containers/xos/Makefile
+++ b/containers/xos/Makefile
@@ -20,6 +20,9 @@
 XOS_GIT_REPO       ?= git://github.com/open-cloud/xos.git
 XOS_GIT_BRANCH     ?= master
 
+XOS_GIT_COMMIT_HASH     ?= $(shell git log --pretty=format:'%H' -n 1 || echo -n "unknown" )
+XOS_GIT_COMMIT_DATE     ?= $(shell git log --pretty=format:'%ad' -n 1 || echo -n "unknown" )
+
 TOSCA_CONFIG_PATH  ?= /opt/xos/configurations/opencloud/opencloud.yaml
 
 base:
@@ -38,6 +41,8 @@
 
 devel:
 	sudo docker build --no-cache=${NO_DOCKER_CACHE} --rm \
+	--build-arg XOS_GIT_COMMIT_HASH="${XOS_GIT_COMMIT_HASH}" \
+	--build-arg XOS_GIT_COMMIT_DATE="${XOS_GIT_COMMIT_DATE}" \
 	-f Dockerfile.devel -t ${IMAGE_NAME} ../..
 
 test: