summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarac <varac@leap.se>2017-07-18 17:18:11 +0200
committerdrebs <drebs@leap.se>2017-07-18 14:34:47 -0300
commit81e438cc4101345c6ca3d92420250795b7517866 (patch)
tree9795e0b09bc78e269e1c93fd990ce6e69a354c91
parent49484d93ba4183af460e592bb163153a92ba8571 (diff)
Fix commit_info.branch var
Gitlab by default will checkout a detatched HEAD so in order to collect the branch name it's running the CI for we need to checkout the branch name and reset to current commit sha.
-rw-r--r--.gitlab-ci.yml1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2b4994c1..83551e32 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -67,6 +67,7 @@ benchmark:
services:
- couchdb
script:
+ - git checkout -B "$CI_COMMIT_REF_NAME" "$CI_COMMIT_SHA"
- '[ -n "${BENCHMARK_ALL_COMMITS}" ] && git checkout origin/master scripts/benchmark/setup-all-commits-env.sh'
- '[ -n "${BENCHMARK_ALL_COMMITS}" ] && ./scripts/benchmark/setup-all-commits-env.sh'
- cd testing