enable profile and race detection builds

Change-Id: I043d3a55d2d918d485d7bf286392078a147bcb33
diff --git a/Makefile b/Makefile
index 3fd497b..d8d09d1 100644
--- a/Makefile
+++ b/Makefile
@@ -79,9 +79,12 @@
 build: docker-build ## Alias for 'docker build'
 
 docker-build: local-protos local-lib-go ## Build openolt adapter docker image (set BUILD_PROFILED=true to also build the profiled image)
-	docker build $(DOCKER_BUILD_ARGS) --target ${DOCKER_TARGET} -t ${ADAPTER_IMAGENAME} -f docker/Dockerfile.openolt .
+	docker build $(DOCKER_BUILD_ARGS) --target=${DOCKER_TARGET} --build-arg CGO_PARAMETER=0 -t ${ADAPTER_IMAGENAME} -f docker/Dockerfile.openolt .
 ifdef BUILD_PROFILED
-	docker build $(DOCKER_BUILD_ARGS) --target ${DOCKER_TARGET} --build-arg EXTRA_GO_BUILD_TAGS="-tags profile" -t ${ADAPTER_IMAGENAME}-profile -f docker/Dockerfile.openolt .
+	docker build $(DOCKER_BUILD_ARGS) --target=dev --build-arg CGO_PARAMETER=1 --build-arg EXTRA_GO_BUILD_TAGS="-tags profile" -t ${ADAPTER_IMAGENAME}-profile -f docker/Dockerfile.openolt .
+endif
+ifdef BUILD_RACE
+	docker build $(DOCKER_BUILD_ARGS) --target=dev --build-arg CGO_PARAMETER=1 --build-arg EXTRA_GO_BUILD_TAGS="-race" -t ${ADAPTER_IMAGENAME}-rd -f docker/Dockerfile.openolt .
 endif
 
 docker-push: ## Push the docker images to an external repository
@@ -89,6 +92,9 @@
 ifdef BUILD_PROFILED
 	docker push ${ADAPTER_IMAGENAME}-profile
 endif
+ifdef BUILD_RACE
+	docker push ${ADAPTER_IMAGENAME}-rd
+endif
 
 docker-kind-load: ## Load docker images into a KinD cluster
 	@if [ "`kind get clusters | grep voltha-$(TYPE)`" = '' ]; then echo "no voltha-$(TYPE) cluster found" && exit 1; fi
diff --git a/VERSION b/VERSION
index 15a2799..bea438e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.3.0
+3.3.1
diff --git a/docker/Dockerfile.openolt b/docker/Dockerfile.openolt
index 36a0283..18822f2 100644
--- a/docker/Dockerfile.openolt
+++ b/docker/Dockerfile.openolt
@@ -26,6 +26,8 @@
 
 ARG EXTRA_GO_BUILD_TAGS=""
 
+ARG CGO_PARAMETER=0
+
 ARG org_label_schema_version=unknown
 ARG org_label_schema_vcs_url=unknown
 ARG org_label_schema_vcs_ref=unknown
@@ -36,7 +38,7 @@
 # Build
 SHELL ["/bin/ash", "-o", "pipefail", "-c"]
 RUN \
-CGO_ENABLED=0 go build $EXTRA_GO_BUILD_TAGS -mod=vendor -o /app/openolt \
+CGO_ENABLED=$CGO_PARAMETER go build $EXTRA_GO_BUILD_TAGS -mod=vendor -o /app/openolt \
 -ldflags \
 "-X github.com/opencord/voltha-lib-go/v4/pkg/version.version=$org_label_schema_version \
 -X github.com/opencord/voltha-lib-go/v4/pkg/version.vcsRef=$org_label_schema_vcs_ref \