resource-types icon indicating copy to clipboard operation
resource-types copied to clipboard

Add `duct-tape-resource`

Open HeavyWombat opened this issue 1 year ago • 0 comments

Add duct-tape-resource, a generic custom Concourse resource to write custom resources on the fly as inline shell scripts in the pipeline definition itself.

Example:

resources:
- name: foobar
  type: duct-tape-resource
  icon: application-variable
  check_every: 20m
  source:
    check:
      env:
        ACCESS_KEY: ((bar))

      # only run once per worker
      before: |
        #!/bin/bash
        run install of sometool

      run: |
        #!/bin/bash
        run some shell commands to get things
        
        # output of this tool will be treated a ref/version of the resource, i.e. list Git commits so it would act like a Git resource
        sometool --list

The resource is in active use and proved quite useful, because you don't need to setup a full fledged custom Concourse resource with container images, but instead quickly assemble what you need. Also useful to be used to test pipelines with a custom resource before committing to writing a standalone custom resource.

HeavyWombat avatar Feb 28 '24 17:02 HeavyWombat