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

Feat: Allow user to specify a 'dest' to /stacker/imports #508

Open
smoser opened this issue Sep 21, 2023 · 0 comments
Open

Feat: Allow user to specify a 'dest' to /stacker/imports #508

smoser opened this issue Sep 21, 2023 · 0 comments

Comments

@smoser
Copy link
Contributor

smoser commented Sep 21, 2023

Is your feature request related to a problem? Please describe.

I'd like to be able to specify a 'dest' for a import that goes into /stacker/imports.
I think this is a significant shortcoming that should be addressed. The workaround is for the user to specify a different path (not under /stacker, say '/imports'), but that results in
a. having to consistently use that 'import' directory
b. having to clean up the import directory so it doesn't appear in the target.

Here is an example stacker.yaml

build:
  build_only: true
  from:
    type: docker
    url: ${{DOCKER_BASE-docker://}busybox:latest
  import:
    - path: bar
      dest: bar.txt
    - path: foo
      dest: /stacker/imports/foo.txt
  run: |
    ls -l /stacker/imports/foo.txt /stacker/improts/bar.txt

Neither of the attempts above work with stacker version v1.0.0-rc5-396ff9d.

The first, using a relative path (bar), will complain:

`error: Dest path cannot be relative for: map[interface {}]interface {}{"dest":"bar.txt", "path":"bar"}`

The second, using an absolute path but explicitly under /stacker/imports (foo), ends up populating an overlay that goes below /stacker/imports, so the 'run' section does not actually see it.

Here is an example script that i'd like to pass.
test-case.sh.txt

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

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