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:
+ rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@90a65858-035c-4b74-be6b-a0e43bb508d1... failed.Error: noproc
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!
Hi @john_mccabe
Have you thought about creating a docker image with the configuration you need and publishing it into docker hub? It would save you some time spend installing and configuring stuff.
Regarding the error you see, I would say you have to talk to rabbitmq people. They probably help you to find a way to check when the server will be ready to be used, so you can avoid the intermittent failures.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.