Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jlewi opened this issue Mar 26, 2024 · 0 comments
Open

Comments

@jlewi
Copy link
Owner

jlewi commented Mar 26, 2024

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 "/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant