Skip to content

Accept a command to check the availability of a service #53

@fbecart

Description

@fbecart

Žinoma already makes it possible to set services as dependencies for other targets. This can be useful if, for instance, some integration tests require a database to be set up before they can run.

The issue is that Žinoma does not ensure the service has actually started. Žinoma assumes the service is ready as soon as the process starting the service is running.

We could greatly improve this situation by making it possible to specify an up command checking the service availability. After executing the service run command, Žinoma would query repeatedly this up command until it exits with 0. Then only would Žinoma consider this service started and run the targets that depend on it.

Example of configuration:

targets:
  server:
    service:
     run: npm run start
     up: curl localhost:3000

See also: #48

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions