Added reset to rally commit ID in prepare_env.sh 85/2885/2
authorjose.lausuch <jose.lausuch@ericsson.com>
Wed, 28 Oct 2015 15:41:17 +0000 (16:41 +0100)
committerjose.lausuch <jose.lausuch@ericsson.com>
Wed, 28 Oct 2015 15:43:48 +0000 (16:43 +0100)
Change-Id: I0d662409bfde353c8efd2fa3fd8cacf9c849428b
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
docker/prepare_env.sh

index 6c77e81..493f2f8 100755 (executable)
@@ -102,8 +102,16 @@ if [ $offline == false ]; then
 
     info "Updating Rally repository...."
     cd ${RALLY_REPO_DIR}
+    if [ ${RALLY_BRANCH} != "master" ]; then
+        info "Rally repo: checkout ${RALLY_BRANCH} branch..."
+        git checkout ${RALLY_BRANCH}
+    fi
     info "Rally repo: pulling to latest..."
     git pull
+    if [ ${RALLY_COMMIT} != "latest" ]; then
+        info "Rally repo: given commit is ${RALLY_COMMIT}. Reseting..."
+        git reset --hard ${RALLY_COMMIT}
+    fi
 
     info "Updating vIMS test repository...."
     cd ${VIMS_REPO_DIR}