From 81e438cc4101345c6ca3d92420250795b7517866 Mon Sep 17 00:00:00 2001 From: Varac Date: Tue, 18 Jul 2017 17:18:11 +0200 Subject: 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. --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3