print out git references for trees
in order to be sure we understand the environment that's running in an upstream test, print out the git information for the tree. This will hopefully address questions of "which commit of tempest" is being used for particular tests. Change-Id: Ief4e8a17fd75945f02982d2adf8625fe927d823d
This commit is contained in:
parent
e802cc4514
commit
835db2fead
14
functions
14
functions
@ -548,12 +548,18 @@ function is_arch {
|
|||||||
# Uses global ``OFFLINE``
|
# Uses global ``OFFLINE``
|
||||||
# git_clone remote dest-dir branch
|
# git_clone remote dest-dir branch
|
||||||
function git_clone {
|
function git_clone {
|
||||||
[[ "$OFFLINE" = "True" ]] && return
|
|
||||||
|
|
||||||
GIT_REMOTE=$1
|
GIT_REMOTE=$1
|
||||||
GIT_DEST=$2
|
GIT_DEST=$2
|
||||||
GIT_REF=$3
|
GIT_REF=$3
|
||||||
|
|
||||||
|
if [[ "$OFFLINE" = "True" ]]; then
|
||||||
|
echo "Running in offline mode, clones already exist"
|
||||||
|
# print out the results so we know what change was used in the logs
|
||||||
|
cd $GIT_DEST
|
||||||
|
git show --oneline
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if echo $GIT_REF | egrep -q "^refs"; then
|
if echo $GIT_REF | egrep -q "^refs"; then
|
||||||
# If our branch name is a gerrit style refs/changes/...
|
# If our branch name is a gerrit style refs/changes/...
|
||||||
if [[ ! -d $GIT_DEST ]]; then
|
if [[ ! -d $GIT_DEST ]]; then
|
||||||
@ -595,6 +601,10 @@ function git_clone {
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# print out the results so we know what change was used in the logs
|
||||||
|
cd $GIT_DEST
|
||||||
|
git show --oneline
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user