-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Seperate remote_path into remote_folder and remote_script. #3462
Conversation
Failure on appveyor seems unrelated. @markpeek @rickard-von-essen @cbednarski does this look OK to you? :) |
|
||
- `remote_file` (string) - The filename the uploaded script will have on the machine. | ||
This defaults to 'script_nnn.sh'. | ||
|
||
- `remote_path` (string) - The filename where the script will be uploaded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remote_path
now has the same documentation as remote_file
, can you include some language to distinguish them ("full path to the file") and also what happens if all three are specified / recommend which ones should be used in which cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback @cbednarski I will update the documentation accordingly.
In the event all three or set the remote_path will overwrite both remote_file and remote_folder. I only kept remote_path in order to not break peoples packer.json files.
@imduffy15 Thanks for the PR, and for updating the docs! The change LGTM but would you be able to add a test that verifies the change? I think it's sufficient to provide two configuration blocks that demonstrate each case, parse them, and validate that the expected path comes out. You can move this logic to a new function if that makes it easier to test. |
Here's an example test that does config parsing: https://github.com/mitchellh/packer/blob/master/post-processor/compress/post-processor_test.go#L153-L182 |
Commonly /tmp is set as noexec, as a result packer scripts fail to run. In order to get around this one can set a remote_path, whoever, remote path requires full filename and path. By making remote_path a combination of remote_folder/remote_script we can change remote_folder and keep the default script_nnn.sh Signed-off-by: Ian Duffy <ian@ianduffy.ie>
Updated with test cases to ensure the following:
|
Looks great! Thanks for adding the tests and docs. :) |
Why is the default directory |
In terms of the linux file system and folder structure I feel /tmp is a In my situtation, /tmp was mounted on the system with noexec for security I do not believe / would make a sane default, / is generally just On 20 May 2016 at 18:53, Sander Maijers notifications@github.com wrote:
|
Assuming Linux, take your pick based on FHS. |
…#3462) Commonly /tmp is set as noexec, as a result packer scripts fail to run. In order to get around this one can set a remote_path, whoever, remote path requires full filename and path. By making remote_path a combination of remote_folder/remote_script we can change remote_folder and keep the default script_nnn.sh Signed-off-by: Ian Duffy <ian@ianduffy.ie>
Commonly /tmp is set as noexec, as a result packer scripts
fail to run. In order to get around this one can set a
remote_path, whoever, remote path requires full filename
and path.
By making remote_path a combination of
remote_folder/remote_script we can change remote_folder
and keep the default script_nnn.sh