summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-04-06 17:53:20 +0200
committerdrebs <drebs@leap.se>2017-07-03 14:19:52 -0300
commitbd05b26fc8426c0d2f586ae20b36874538362312 (patch)
tree098e7ba341b8c650238ed5335affdc0db428a2e0
parentac87ecdf9d22f986ccd403df4ea1b1d4e044b4d0 (diff)
[test] 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