Resource

A Resource is a pre-requisite for a command in a Step.

Resource is a term used to describe an external requirement that is needed before a step can be executed successfully, e.g. source code which needs to be continuously integrated and delivered.

To denote that a particular step needs a resource:

{
  "cmd": "sbt test",
  "needs_resource": "my-scala-src"
}

This resource must be declared in the resources section of the Pipeline definition.

Each entry consists of the following keys:

Conditional keys:

If type is external:

If type is internal:

Example:

[
  {
    "name": "my-source",
    "type": "external",
    "provider": "github-provider",
    "params": {
      "repo": "https://github.com/bob-cd/bob",
      "branch": "main"
    }
  },
  {
    "name": "my-ml-model",
    "type": "internal",
    "provider": "s3",
    "params": {
      "group": "dev",
      "name": "make-model",
      "run_id": "r-0ef66ba9-e397-461b-a6d9-f52f91889264"
    }
  }
]

A Resource can be used fetch any external items which may be needed in a build. This is provided to Bob via a Resource Provider.

Resource Provider

A Resource Provider is Bob’s way of abstracting itself from knowing about how to fetch various resources.

The most general use case for a resource provider is to clone source code that is to be continuously integrated and delivered.

A Resource Provider is any system which has the following properties:

A reference resource provider which handles simple Github pulls can be found

This gives the following advantages:

A resource provider must be registered with Bob prior to the execution of a Step that needs a resource.

To register a Resource provider with Bob:

Conversely a DELETE request on /resource-providers/<name> un-registers it from Bob.

To list registered resource providers make a GET request on /resource-providers.