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>
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}
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