Path inside artifact name. Is there a way to remove it?
Hi!
I'm using the artifacts feature to package my windows service (console app using TopShelf) as a zip file. Later, using the environment functionality I'm uploading this package to an S3 account. However, when it uploads it to S3 it prepends the file name with it's path creating an unnecessary long path inside S3.
Is there a way to push just the zip file to S3 without it's entire source path?
The relevant part of my yml file looks like this:
configuration: Debug
artifacts:
- path: 'src\BSP\bin\$(CONFIGURATION)'
name: '$(APPVEYOR_PROJECT_NAME)_$(APPVEYOR_BUILD_VERSION)'
In S3 the resulting path is my-bucket-name\BSP\src\BSP\bin\BSP_1.0.0.26.zip when I wanted it to be my-bucket-name\BSP_1.0.0.26.zip
BSP being my project's name.
Thanks!
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 30 Apr, 2015 04:20 PM
You can use either PowerShell or
appveyorcommand-line utility to push artifact with a custom path in artifacts storage:http://www.appveyor.com/docs/packaging-artifacts#pushing-artifacts-...
http://www.appveyor.com/docs/build-worker-api#push-artifact
2 Posted by tucaz on 30 Apr, 2015 05:39 PM
I think I understood, but is this the expected behavior? Meaning that when the artifact is generated by using the artifacts feature the path will include the whole directory structure?
Support Staff 3 Posted by Feodor Fitsner on 30 Apr, 2015 05:43 PM
Yeah, this is correct behavior - it puts path relative to build folder.
4 Posted by tucaz on 30 Apr, 2015 05:47 PM
Got it!
If you don't mind the question, why is this the implemented behavior?
It would be much more natural do me to have a property (at first I thought it was name) where you can specify the filename and if one really wanted, he could put the path in it?
Thanks
Support Staff 5 Posted by Feodor Fitsner on 01 May, 2015 01:04 AM
It was made like that "historically". Changing this bahavior now could break a lot of builds :)
- Feodor
6 Posted by mike on 12 Oct, 2015 07:40 PM
I would second a need for this. It seems like an extra field or checkbox on the Artifacts page could be added to specify a destination path for artifact(s) or a simple check box that says "destination path begins at first found artifact (for wildcard situations). Default of course would be current behavior.
7 Posted by Graham on 10 Nov, 2015 08:08 PM
Hi,
I'm with Mike on this one.
Graham
8 Posted by Graham on 10 Nov, 2015 08:36 PM
My quick get-around to this was to put a copy in the 'After build script' on the build tab:
copy xyz.Installer\bin\release\xyz.Installer.msi xyz.msi
That pops it in the root directory, and hence no path.
then trap xyz.msi as the artefact, and everything works without the paths and no need for other scripts.
Hope this helps.
Graham
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:01 AM.