cloudfoundry/bbl-state-resource

Handle plan patches in put

christianang opened this issue · 2 comments

Hi team,

I recently had to apply a plan patch while using the bbl state resource, which required me to make a task to copy files around. It is not the most complex task in the world, but considering this might be something that many users will want to do (and would have to create a task for) it might be nice if the bbl-state-resource did it itself.

For example:

My current job:

jobs:
- name: ci-bbl-up
  serial: true
  plan:
  - get: bbl-plan-patches
  - get: bbl-state
  - task: apply-plan-patch
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: busybox}
      inputs:
      - name: bbl-plan-patches
      - name: bbl-state
        path: bbl-state-in
      outputs:
      - name: bbl-state
      run:
        path: sh
        args:
        - -exc
        - |
          cp -r bbl-state-in/. bbl-state
          cp -r bbl-plan-patches/plan-patches/concourse-credhub-gcp/. bbl-state
  - put: bbl-state
    params:
      command: up
      name: ci
      state_dir: bbl-state

Can become:

jobs:
- name: ci-bbl-up
  serial: true
  plan:
  - get: bbl-plan-patches
  - put: bbl-state
    params:
      command: up
      name: ci
      state_dir: bbl-state
      plan_patches:
      - bbl-plan-patches/plan-patches/concourse-credhub-gcp

Let me know what you think.

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/158160117

The labels on this github issue will be updated when the story is started.

+1, this is already in our backlog! https://www.pivotaltracker.com/story/show/155239992

thanks for the mockup and the validation!