Deploy replicates directory structure from artifact
Hi,
My build creates a zip file inside folder called 'upload' in my project, so it follows this structure:
C:\projects\<my_project>\upload\file.zip
I want to upload this file into an folder in the s3 bucket, so I have configured it this way:
artifacts:
- path: upload\*.zip
name: projet-zip
type: zip
deploy:
provider: S3
access_key_id:
secret_access_key:
bucket:
set_public: true
folder: windows
artifact: project-zip
However, I end up with the file in:
/windows/upload/file.zip
, instead of
/windows/file.zip
.
I have also tried using the 'application' settings deployment
(http://www.appveyor.com/docs/deployment/ftp),
but whichever way I configure the artifact I end up with:
/windows/project-zip.zip
(So, I guess that is only
really meant to be run for FTP deployment).
Is there any way I can upload the file
C:\projects\<my_project>\upload\file.zip
into an
s3 bucket as /windows/file.zip
?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 06 Jun, 2015 04:51 PM
You can use appveyor PushArtifact command to upload artifact with custom file name:
2 Posted by Carlos on 06 Jun, 2015 08:14 PM
Thank you for the quick response Feodor.
I should have mentioned that
file.zip
has an automatically generated filename which I cannot easily replicate within the appveyor.tml file. I can use a wildcard to select the artifact to upload, but I am not sure how to "copy" for the filename for the-FileName
flag.If you don't mind, for simplicity I will start using the names given in my project, instead of generic "project" and "file.zip", except for the autogerated tag which I will identified with "<filetag>".
If I leave the
artifact
setting in thedeployment
info it will still upload the correct zip file into/windows/upload/ardublockly_<filetag>.zip
(instead of ), but the PushArtifact command will not upload anything:It will still prints this (and the artifact shows in appveyor website), but nothing is uploaded into the s3 bucket with the name "file.zip":
If I remove the artifact listing, nothing gets uploaded:
Obviously I must be making a mistake somewhere, but I have tried many combinations and cannot seem to get it work. Any extra help will be greatly appreciated.
Support Staff 3 Posted by Feodor Fitsner on 06 Jun, 2015 10:37 PM
Remove
artifacts
section and leaveappveyor PushArtifact
command only, but do not use wildcard there - use exact path to the artifact:4 Posted by Carlos on 06 Jun, 2015 11:49 PM
Hi Feodor,
Unfortunately a script generates the zip file name which includes the time of build, so I cannot really hardcode the file name into the yml file.
I am very new to using the shell and ps scripts, is there a way to get the filename from the upload folder (we can count on only having one file there) and embed it into the
appveyor PushArtifac
command? I googled how to do this on a command line, but none of the stack overflow answers (all similar to this) worked on my command line interface (nor powershell), I don't know if I need to activate something or what am I doing wrong.Support Staff 5 Posted by Feodor Fitsner on 07 Jun, 2015 12:19 AM
You can use PowerShell instead:
6 Posted by Carlos on 07 Jun, 2015 12:36 AM
That worked, thank you Feodor, you're the best!
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:56 AM.