-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
Allow setting custom dest of get_url when using download deployment strategy #384
Comments
First of all, the downloaded file will (or at least, should) be called download, stripping out the query string. And anyway, why is the auto-generated name relevant? If you are using the combined "download_unarchive" it does not matter what the filename is as it will be unarchived and deleted and if that is not the case, you need to treat the file anyway with some hook so if you could specify what's the use case where this is relevant that would be appreciated |
I confirm that the file name contains the query string, which is unexpected. I did not explored the I don't have in mind a specific case where the file name is very important, but I can imagine some cases where keeping the downloaded file in the release folder could be helpful, and in that case it's better if it has a good name. I know it can be achieved by custom hooks. You can close this issues if you find it irrelevant. Anyway, thanks for your help! |
This is weird, we added some ansible filters to prevent the files having the query string when downloaded Would it be possible to share the exact url you are downloading from (obv taking out any tokens or similar things that may affect security)?
|
The URL is # deploy_environment is either prod or staging
ansistrano_get_url: "https://<gitlab-on-premise-domain>/api/v4/projects/524/jobs/artifacts/{{ ansistrano_git_branch }}/download?job=build:{{ deploy_environment }}"
For Maybe injecting a variable in the query string part of |
There is some cases where the URL does not contain the filename, therefore the auto-generated name is not suitable.
For example, downloading artifacts from Gitlab API is done using the following URL
Therefore the downloaded file will have the name
download?job=<job-name>
.Having a new variable like
ansistrano_download_dest
to manually set the destination file name would be awesome!The text was updated successfully, but these errors were encountered: