1.6.1 Managing Resources

fly check-resource

To force immediate checking for new versions of a resource, rather than waiting for the periodic checking, run:

$ fly -t example check-resource --resource my-pipeline/my-resource

To check from a particular version, including the given version, append the --from flag like so:

$ fly -t example check-resource --resource my-pipeline/my-resource \
    --from ref:abcdef

This can be useful for collecting versions that are older than the current ones, given that a newly configured resource will only start from the latest version.

Note the ref: prefix is resource-dependent. For example, the bosh-io-release resource might use version:11.2 in place of ref:abcdef.

fly pin-resource

To pin a resource to a specific version of that resource, run:

$ fly -t example pin-resource --resource my-pipeline/my-resource \
    --version ref:bceaf

Note that the version needs to be provided as a key-value pair. For the git resource the ref: prefix is used while the registry resource might use digest as a prefix like digest:sha256:94be7d7b.

A comment can be provided using the --comment flag, which is then also visible in the UI :

$ fly -t example pin-resource --resource my-pipeline/my-resource \
    --version ref:abcdef \
    --comment "Some reason"

This can, for example, be used to pull in a fixed version of an external dependency which might break your build in a new release. After the problem has been resolved, the pin can be removed. Another example could be running a build with a set of older inputs when needed.

To remove the pin on a resource use:

$ fly -t example unpin-resource --resource my-pipeline/my-resource

You can also pin a resource via the UI by clicking on the pin button next to the desired version on the resource page. A default comment is automatically generated containing your username and a timestamp. This comment can be edited.

fly enable-resource-version

To enable a specific version of a resource, run:

$ fly -t example enable-resource-version --resource my-pipeline/my-resource \
    --version ref:bceaf

Note that the version needs to be provided as a key-value pair. For the git resource the ref: prefix is used while the registry resource might use digest as a prefix like digest:sha256:94be7d7b.

This command is idempotent. Enabling an already enabled resource version will do nothing.

You can also enable a resource version via the UI by clicking on the check mark button next to the desired version on the resource page.

fly disable-resource-version

To disable a specific version of a resource, run:

$ fly -t example disable-resource-version --resource my-pipeline/my-resource \
    --version ref:bceaf

Note that the version needs to be provided as a key-value pair. For the git resource the ref: prefix is used while the registry resource might use digest as a prefix like digest:sha256:94be7d7b.

This command is idempotent. Disabling an already disabled resource version will do nothing.

You can also disable a resource version via the UI by clicking on the check mark button next to the desired version on the resource page.