Hello Atlassian Community!
My team has a continuous integration pipeline that includes some RabbitMQ tests.
Our bitbucket-pipelines.yml file looks like this:
image: python:3.6.8
pipelines:
default:
- step:
name: Run Tests
caches:
- pip
script:
- pip install -r requirements.txt
- apt-get update
- apt-get install -y rabbitmq-server
- rabbitmq-server -detached
- sleep 2
- rabbitmq-plugins enable rabbitmq_management
- sleep 2
- rabbitmqctl stop
- sleep 2
- rabbitmq-server -detached
- python tests.py
Around 50% of the time we get the following error:
<span><br>The following plugins have been enabled:<br></span><span>mochiweb<br></span><span>webmachine<br></span><span>rabbitmq_web_dispatch<br></span><span>amqp_client<br></span><span>rabbitmq_management_agent<br></span><span>rabbitmq_management</span><span><br><br>Applying plugin configuration to rabbit@90a65858-035c-4b74-be6b-a0e43bb508d1... failed.<br></span><span>Error: noproc</span><span>+ rabbitmq-plugins enable rabbitmq_management</span>
Re-running the pipeline generally "fixes" the problem. But this is eating away at our build minutes, and is quite frustrating to constantly re-run failed pipelines.
We added some `sleep` commands in there to try and slow things down, but thats obviously not working as intended, because we keep getting the "Error: noproc"
I'm hopeful that we are just "holding it wrong" but after lots of googling and experimentation its not clear to me what were doing wrong.
Thanks in advance for any help/guidance you can give us.
Please let me know if I can add any additional info that might be helpful.
Thanks!