From d6c0e30e7758737e3fd16b90c3cc8f9d572f20ce Mon Sep 17 00:00:00 2001 From: varac Date: Sat, 8 Apr 2017 19:59:39 +0200 Subject: [benchmarks] Fetch files from the future --- .gitlab-ci.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed67257c..a47d1709 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,13 +20,6 @@ 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 @@ -75,11 +68,21 @@ benchmark: - couchdb allow_failure: true 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 + # 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" + # Gitlab will checkout current revision as master / origin/master + # We need some files from the "furure" in order to post the right + # benchmarking data to elasticsearch. + - git remote add leap https://leap.se/git/soledad + - git fetch leap + - git checkout leap/master testing/tox.ini testing/tests/benchmarks/conftest.py testing/tests/conftest.py + - sed -i 's/drebs.*$/varac\/pytest-benchmark.git@unmerged_prs/' testing/tox.ini - grep -A 9 'testenv:benchmark' testing/tox.ini - git status + - git show -s --pretty=fuller - cd testing - curl -s couchdb:5984 # You can provide a $NETRC variable containing the creds for your @@ -92,6 +95,8 @@ benchmark: # to an elasticsearch instance - echo "addopts=$PYTEST_OPTS" >> pytest.ini && chmod 600 pytest.ini - /usr/bin/unbuffer tox --recreate -e benchmark -- --couch-url http://couchdb:5984 | /usr/bin/ts -s + # Output locally saved benchmarks if they exist + - 'if [ -d .benchmarks ]; then find .benchmarks -type f -exec cat {} \; ; fi' build_docker_image: stage: build -- cgit v1.2.3