diff options
author | varac <varacanero@zeromail.org> | 2017-03-22 11:24:42 +0100 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-03-31 21:54:28 +0200 |
commit | 358c4dfbc2e4845b08a7ac75dcf43bbd8d4e8a05 (patch) | |
tree | a83927a2507c87b344ea535a019a68cc17af075c /.gitlab-ci.yml | |
parent | 6067f8c001d524d29ccc4287a5f2efec90fa5004 (diff) |
Post benchmark results to elastticsearchbenchmark_elasticsearch
In order to do this from CI, please create a secret variable
(at i.e. https://0xacab.org/varac/soledad/settings/ci_cd)
called PYTEST_OPTS and use this example:
--benchmark-autosave --benchmark-storage="elasticsearch+https://USER:PASSWORD@moose.leap.se:9200"
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee57c51c..da908634 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - code-check - tests + - benchmark # Cache tox envs between builds cache: @@ -22,3 +23,25 @@ tests: script: - cd testing - tox -- --couch-url http://couchdb:5984 + +benchmark: + stage: benchmark + image: leapcode/soledad:latest + tags: + - benchmark + services: + - couchdb + allow_failure: true + script: + - cd testing + - curl -s couchdb:5984 + # You can provide a $NETRC variable containing the creds for your + # elasticsearch instance so it's protected from being leaked in the + # CI console + # We can't get it working inside docker for unknown reasons. + #- echo "$NETRC" > /root/.netrc && chmod 600 /root/.netrc + # + # Add $PYTEST_OPTS to pytest.ini to allow posting benchmark tests + # to an elasticsearch instance + - echo "addopts=$PYTEST_OPTS" >> pytest.ini && chmod 600 pytest.ini + - tox --recreate -e benchmark -- --couch-url http://couchdb:5984 |