Consul Service

Is there support for Consul as a service running on CircleCI? I’d like to add something like this to my YML configuration file for my builds:

    - postgresql
    - consul

I am building a project that uses Spring Cloud with @EnableDiscoveryClient enabled on the startup sequences. In order for my tests to pass (or have my environment kick up), I need to get Consul enabled somewhere.

I am aware that I can do something like this to say “don’t bother with discovery in the Continuous Integration environment” (or do something like @Profile("!test") to disable during tests):

@Profile ("!ci")
public class ServiceDiscoveryConfiguration {

However, I want to test the custom health checks in the project that rely on this if at all possible. It’s not critical if it is not available, but it would be helpful for the tests that really dig into the underlying inner workings of the Spring framework.

You cannot really do this, and consul is not currently pre-installed.

However, you can install it yourself and start the service manually as a part of your build setup. A good place to put this would be in the machine section of your circle.yml.