Capsules

This sections explains how to use a Capsule in a Pipeline, including released Capsules, those with secrets, changing Capsule resources, and removing or replacing Capsules.

Adding a Capsule to a Pipeline

To add a Capsule to the Pipeline, use the Add Capsules pane in the Pipeline editor. You will be able to find Capsules by searching by name, sorting capsules by date, status, or titles, or filtering capsules by properties or Code Ocean Apps. Then drag the capsule card from the Add Capsule menu and drop it into the Pipeline editor.

In order to be used in a Pipeline, each Capsule must have git installed in the environment. Recommended base images include git. If you are not using a recommended base image, install git as a package in the environment builder of the Capsule. In addition, all changes must be committed and a Reproducible Run performed on each Capsule of the Pipeline. If a Capsule does not have changes committed and a run performed, a hazard symbol appears beside it.

Using Release Capsules in a Pipeline

When adding a release Capsule, if there is more than one version, the version will have to be specified before the Capsule is added to the Pipeline editor.

If the user also has a private, editable version of the Capsule, that is another option to add to the Pipeline. If the Capsules are filtered for release Capsules only, the editable version will not be listed in the drop down menu.

The version can be changed at any time in the Capsule's settings.

The version used by the Pipeline will remain unchanged if a new version of the Capsule is released.

Once the Pipeline works as intended, the Capsules in it can be released so that any subsequent changes to the Capsule do not affect the Pipeline. See how to release a capsule.

Removing or Replacing a Capsule from a Pipeline

To remove a Capsule from a Pipeline, hover over the Capsule and click the garbage can to remove it from the Pipeline. This will remove the Capsule and all connections.

If a Capsule has been deleted, it will appear red in the Pipeline Editor and can be easily replaced while retaining the existing Connections and Path Mappings. It can also be deleted from the Pipeline.

Running a Pipeline with Secrets

When a Capsule that uses secrets is added to a Pipeline, the same secrets that are selected in the Capsule's environment editor will be used by the Pipeline.

One exception is AWS Cloud Credentials. AWS Cloud Credential secrets that are used to access external Data Assets will not be used by the Pipeline. A custom IAM role is required to use external Data Assets in a Pipeline. See Pipeline Settings for more information.

If the required secrets have not been selected, users will receive an error when trying to run the Pipeline. The error message provides links to all the Capsules that require secrets, making it easy for users to identify which Capsules need to be updated.

For example, if the "Accessing Redshift database" Capsule requires secrets and they have not been selected in the Capsule, users will receive the following error when trying to run the Pipeline: