Quantcast
Channel: How to use Rabbit inside a gitlab-ci.yml file? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to use Rabbit inside a gitlab-ci.yml file?

$
0
0

I want to test with gitlab-ci.yml a rpc nameko server.

I can't succeed to make work the Rabitt inside .gitlab-ci.yml::

image: python:latestbefore_script:  - apt-get update -yq  - apt-get install -y python-dev python-pip tree  - curl -I http://guest:guest@rabbitmq:8080/api/overviewmytest:  artifacts:    paths:    - dist  script:  - pip install -r requirements.txt   - pip install .  - pytest --amqp-uri=amqp://guest:guest@rabbitmq:5672 --rabbit-ctl-uri=http://guest:guest@rabbitmq:15672 tests  # - python setup.py test  - python setup.py bdist_wheellook:  stage: deploy  script:  - ls -lah distservices:  - rabbitmq:3-management

The Rabbit start correctly::

2017-04-13T18:19:23.436309219Z 2017-04-13T18:19:23.436409026Z               RabbitMQ 3.6.9. Copyright (C) 2007-2016 Pivotal Software, Inc.2017-04-13T18:19:23.436432568Z   ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/2017-04-13T18:19:23.436451431Z   ##  ##2017-04-13T18:19:23.436468542Z   ##########  Logs: tty2017-04-13T18:19:23.436485607Z   ######  ##        tty2017-04-13T18:19:23.436501886Z   ##########2017-04-13T18:19:23.436519036Z               Starting broker...2017-04-13T18:19:23.440790736Z 2017-04-13T18:19:23.440809836Z =INFO REPORT==== 13-Apr-2017::18:19:23 ===2017-04-13T18:19:23.440819014Z Starting RabbitMQ 3.6.9 on Erlang 19.32017-04-13T18:19:23.440827601Z Copyright (C) 2007-2016 Pivotal Software, Inc.2017-04-13T18:19:23.440835737Z Licensed under the MPL.  See http://www.rabbitmq.com/2017-04-13T18:19:23.443408721Z 2017-04-13T18:19:23.443429311Z =INFO REPORT==== 13-Apr-2017::18:19:23 ===2017-04-13T18:19:23.443439837Z node           : rabbit@ea1a207b738e2017-04-13T18:19:23.443449307Z home dir       : /var/lib/rabbitmq2017-04-13T18:19:23.443460663Z config file(s) : /etc/rabbitmq/rabbitmq.config2017-04-13T18:19:23.443470393Z cookie hash    : h6vFB5LezZ4GR1nGuQOVSg==2017-04-13T18:19:23.443480053Z log            : tty2017-04-13T18:19:23.443489256Z sasl log       : tty2017-04-13T18:19:23.443498676Z database dir   : /var/lib/rabbitmq/mnesia/rabbit@ea1a207b738e2017-04-13T18:19:27.717290199Z 2017-04-13T18:19:27.717345348Z =INFO REPORT==== 13-Apr-2017::18:19:27 ===2017-04-13T18:19:27.717355143Z Memory limit set to 3202MB of 8005MB total.2017-04-13T18:19:27.726821043Z 2017-04-13T18:19:27.726841925Z =INFO REPORT==== 13-Apr-2017::18:19:27 ===2017-04-13T18:19:27.726850927Z Disk free limit set to 50MB2017-04-13T18:19:27.732864417Z 2017-04-13T18:19:27.732882507Z =INFO REPORT==== 13-Apr-2017::18:19:27 ===2017-04-13T18:19:27.732891347Z Limiting to approx 1048476 file handles (943626 sockets)2017-04-13T18:19:27.733030868Z 2017-04-13T18:19:27.733041770Z =INFO REPORT==== 13-Apr-2017::18:19:27 ===2017-04-13T18:19:27.733049763Z FHC read buffering:  OFF2017-04-13T18:19:27.733126168Z FHC write buffering: ON2017-04-13T18:19:27.793026622Z 2017-04-13T18:19:27.793043832Z =INFO REPORT==== 13-Apr-2017::18:19:27 ===2017-04-13T18:19:27.793052900Z Database directory at /var/lib/rabbitmq/mnesia/rabbit@ea1a207b738e is empty. Initialising from scratch...2017-04-13T18:19:27.800414211Z 2017-04-13T18:19:27.800429311Z =INFO REPORT==== 13-Apr-2017::18:19:27 ===2017-04-13T18:19:27.800438013Z     application: mnesia2017-04-13T18:19:27.800464988Z     exited: stopped2017-04-13T18:19:27.800473228Z     type: temporary2017-04-13T18:19:28.129404329Z 2017-04-13T18:19:28.129482072Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.129491680Z Waiting for Mnesia tables for 30000 ms, 9 retries left2017-04-13T18:19:28.153509130Z 2017-04-13T18:19:28.153526528Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.153535638Z Waiting for Mnesia tables for 30000 ms, 9 retries left2017-04-13T18:19:28.193558406Z 2017-04-13T18:19:28.193600316Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.193611144Z Waiting for Mnesia tables for 30000 ms, 9 retries left2017-04-13T18:19:28.194448672Z 2017-04-13T18:19:28.194464866Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.194475629Z Priority queues enabled, real BQ is rabbit_variable_queue2017-04-13T18:19:28.208882072Z 2017-04-13T18:19:28.208912016Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.208921824Z Starting rabbit_node_monitor2017-04-13T18:19:28.211145158Z 2017-04-13T18:19:28.211169236Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.211182089Z Management plugin: using rates mode 'basic'2017-04-13T18:19:28.224499311Z 2017-04-13T18:19:28.224527962Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.224538810Z msg_store_transient: using rabbit_msg_store_ets_index to provide index2017-04-13T18:19:28.226355958Z 2017-04-13T18:19:28.226376272Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.226385706Z msg_store_persistent: using rabbit_msg_store_ets_index to provide index2017-04-13T18:19:28.227832476Z 2017-04-13T18:19:28.227870221Z =WARNING REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.227891823Z msg_store_persistent: rebuilding indices from scratch2017-04-13T18:19:28.230832501Z 2017-04-13T18:19:28.230872729Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.230893941Z Adding vhost '/'2017-04-13T18:19:28.385440862Z 2017-04-13T18:19:28.385520360Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.385540022Z Creating user 'guest'2017-04-13T18:19:28.398092244Z 2017-04-13T18:19:28.398184254Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.398206496Z Setting user tags for user 'guest' to [administrator]2017-04-13T18:19:28.413704571Z 2017-04-13T18:19:28.413789806Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.413810378Z Setting permissions for 'guest' in '/' to '.*', '.*', '.*'2017-04-13T18:19:28.451109821Z 2017-04-13T18:19:28.451162892Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.451172185Z started TCP Listener on [::]:56722017-04-13T18:19:28.475429729Z 2017-04-13T18:19:28.475491074Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.475501172Z Management plugin started. Port: 156722017-04-13T18:19:28.475821397Z 2017-04-13T18:19:28.475835599Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.475844143Z Statistics database started.2017-04-13T18:19:28.487572236Z  completed with 6 plugins.2017-04-13T18:19:28.487797794Z 2017-04-13T18:19:28.487809763Z =INFO REPORT==== 13-Apr-2017::18:19:28 ===2017-04-13T18:19:28.487818426Z Server startup complete; 6 plugins started.2017-04-13T18:19:28.487826288Z  * rabbitmq_management2017-04-13T18:19:28.487833914Z  * rabbitmq_web_dispatch2017-04-13T18:19:28.487841610Z  * rabbitmq_management_agent2017-04-13T18:19:28.487861057Z  * amqp_client2017-04-13T18:19:28.487875546Z  * cowboy2017-04-13T18:19:28.487883514Z  * cowlib*********

But I get this error

$ pytest --amqp-uri=amqp://guest:guest@rabbitmq:5672 --rabbit-ctl-uri=http://guest:guest@rabbitmq:15672 tests============================= test session starts ==============================platform linux -- Python 3.6.1, pytest-3.0.7, py-1.4.33, pluggy-0.4.0...E           Exception: Connection error for the RabbitMQ management HTTP API at http://guest:guest@rabbitmq:15672/api/overview, is it enabled?...source:565: DeprecationWarning: invalid escape sequence \*ERROR: Job failed: exit code 1

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images