aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2015-10-28 17:46:08 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2015-10-28 17:46:08 +0100
commit1a145e36361420713f1497291e79ff3f65d80cc5 (patch)
tree39e2d43061aa8987fd7daf225859270982f481a2 /docker
parent26186a36912b4dba85d777953447a189a415b8a7 (diff)
Reversed: Added reset to rally commit ID in prepare_env.sh
I did not realized it was correct, however there was a small bug. The rally repo git reset command is done after the if-else clause. Change-Id: Ia6f61ae3a3d09a5148cfbea7c47cf317fd949c11 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/prepare_env.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh
index 493f2f88..454ba4e3 100755
--- a/docker/prepare_env.sh
+++ b/docker/prepare_env.sh
@@ -108,10 +108,7 @@ if [ $offline == false ]; then
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
+ # We leave the reset command for later.
info "Updating vIMS test repository...."
cd ${VIMS_REPO_DIR}
@@ -129,7 +126,9 @@ if [ $offline == false ]; then
fi
# We do this regardless if its online or offline mode.
+# Assumption: the docker image contains a newer rally repo than the given commit.
if [ ${RALLY_COMMIT} != "latest" ]; then
+ cd ${RALLY_REPO_DIR}
info "Rally repo: given commit is ${RALLY_COMMIT}. Reseting..."
git reset --hard ${RALLY_COMMIT}
fi