diff options
author | varac <varacanero@zeromail.org> | 2017-04-08 19:59:39 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2017-07-07 21:25:09 +0200 |
commit | d6c0e30e7758737e3fd16b90c3cc8f9d572f20ce (patch) | |
tree | 2a06616da203bb03d4e4ce0a7b1b7ed08b9cfd67 | |
parent | 6f15d418e85e34616ad7a448a06cba08c879ff47 (diff) |
[benchmarks] Fetch files from the future
-rw-r--r-- | .gitlab-ci.yml | 25 |
1 files 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 |