fix undefined var warning
added pre check whether the build hase to be skipped
fix couchbase configs