summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-04-06 17:53:20 +0200
committerKali Kaneko <kali@leap.se>2017-07-07 21:25:07 +0200
commit5590ada8ca19a6b9587d85ce88f6fe7afba136d6 (patch)
treeea33b369296e3813cf29200b12a6bedb81007369
parent5b4e5c3c44d7538a0f995408f959ceb9226ce54b (diff)
[benchmarks] Stay on current branch and not in detatched HEAD
-rw-r--r--.gitlab-ci.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4ab6a25d..bc885c83 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,6 +20,13 @@ cache:
before_script:
- echo "Running on ${HOST_HOSTNAME:=$(hostname)}"
+ # By default, gitlab-runner will checkout in a detached HEAD
+ # (see https://gitlab.com/gitlab-org/gitlab-ce/issues/19421)
+ # We want pytest-benchmark to report the proper branch name,
+ # so we make sure we stay at the current branch
+ - git checkout -B "$CI_BUILD_REF_NAME" "$CI_BUILD_REF"
+ - git status
+ - git show -s --pretty=fuller
.job_template: &job_definition
stage: package
@@ -70,6 +77,7 @@ benchmark:
script:
# We need some files on order to post the right benchmarking data to elasticsearch
- git checkout origin/master testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py
+ - sed -i 's/drebs\/pytest-benchmark.git@use-netrc-file/varac\/pytest-benchmark.git@unmerged_prs/' testing/tox.ini
- git status
- cd testing
- curl -s couchdb:5984