Skip to content

Make it easier to reference/drop credentials into the bundle directory #496

@carolynvs

Description

@carolynvs

Instead of forcing people to code in the path where their bundle is placed inside the cnab environment, we should have a bundle-dir template variable, just like we do in the Dockerfile.

So that instead of having to copy credentials into my bundle directory like this:

credentials:
  - name: gcloud-key-file
    path: /cnab/app/gcloud.json

I could do this:

credentials:
  - name: gcloud-key-file
    path: "{{ porter.bundle-dir}}/gcloud.json"

Alternatively, maybe just using a relative path for the destination should drop it into /cnab/app?

credentials:
  - name: gcloud-key-file
    path: gcloud.json

So when porter processes the paths for parameters and credentials, it would convert relative paths to absolute paths under the bundle directory? 🤔

When they reference the file later in their bundle it would look like this:

install:
  - gcloud:
      description: "Authenticate"
      groups:
        - auth
      command: activate-service-account
      flags:
        key-file: gcloud.json

Or later when we have template functions and they need the absolute path:

install:
  - gcloud:
      description: "Authenticate"
      groups:
        - auth
      command: activate-service-account
      flags:
        key-file: "{{ porter.path(bundle.credentials.gcloud-key-file) }}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    design 🚲🏠Bust out your paint chips, it's time to bikeshed.user experience 🌈💖Make it easier for everyone to use Porter

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions