Skip to content

hydros build should we support file:// URIs and treat paths as relative #82

@jlewi

Description

@jlewi

Related to #81

Right now if you specify a file URI for the URI in the src the globs get treated as absolute paths. At least if they start with "/".
Is this a bug or working as intended?
Should we print a warning?

Here's an example.

kind: Image
apiVersion: hydros.dev/v1alpha1
metadata:
  name: frontend
  namespace: foyle
  labels:
    env: dev
spec:
  image: us-west1-docker.pkg.dev/foyle-public/images/frontend
  source:
    - uri: file:///Users/jlewi/git/foyle
      mappings:
        - src: "/frontend/**/*"
  builder:
    gcb:
      project: foyle-public
      bucket : builds-foyle-public
      machineType: 'E2_HIGHCPU_8'
      dockerfile: /frontend/Dockerfile

"/frontend/**/*" gets treated as an absolute path rather than being relative to "//Users/jlewi/git/foyle". This is most likely because the path begins with a "/"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions