Thanks, Aravind! The zip file is unzipped into the specified folder (in 
your example below file.zip would be extracted to a folder named "pkg/
foobar-widgets-1.2.3.jar 
<https://www.google.com/url?q=https%3A%2F%2Fci.example.com%2Fgo%2Ffiles%2FPipelineName%2F541%2FStageName%2F1%2FJobName%2Fpkg%2Ffoobar-widgets-1.2.3.jar&sa=D&sntz=1&usg=AFQjCNEgj2VIsx5nH6Xudo0MqbbchI_13A>"
 
- probably want to update that for the documentation ;) ) but otherwise 
works like a charm! I'll set to modifying my build script to use this 
approach

On Thursday, April 5, 2018 at 5:31:47 PM UTC-5, Aravind SV wrote:
>
> This seems undocumented and I haven't tried it, but try using "zipfile" 
> instead of "file" and pass it a zip file. If my quick look at the code is 
> right, it should unzip it once uploaded.
>
> So, based on the documentation 
> <https://api.gocd.org/current/#create-artifact>, I mean, trying:
>
> curl 
> 'https://ci.example.com/go/files/PipelineName/541/StageName/1/JobName/pkg/foobar-widgets-1.2.3.jar
>  
> <https://www.google.com/url?q=https%3A%2F%2Fci.example.com%2Fgo%2Ffiles%2FPipelineName%2F541%2FStageName%2F1%2FJobName%2Fpkg%2Ffoobar-widgets-1.2.3.jar&sa=D&sntz=1&usg=AFQjCNEgj2VIsx5nH6Xudo0MqbbchI_13A>'
>  \
>       -u 'username:password' \
>       -H 'Confirm:true' \
>       -X POST \
>       -F '*zipfile*=@/path/to/your/file.zip'
>
> If it works, I guess we can change the documentation to reflect that.
>
> On Thu, Apr 5, 2018 at 6:19 PM, Andrew Jones <[email protected] 
> <javascript:>> wrote:
>
>> Yes - they were specified as directories. If I POST or PUT a zip file, 
>> does the server treat that file as a single artifact or part of the folder 
>> structure? The documentation doesn't mention - my assumption was that 
>> uploading a ZIP would create a single artifact.
>>
>>
>> On Tuesday, March 27, 2018 at 5:17:01 PM UTC-5, Andrew Jones wrote:
>>>
>>> The API documentation mentions there are two ways to upload artifacts, 
>>> both of which operate on individual files. I'm experiencing very long 
>>> upload times (10 minutes for all artifacts from a single job) - if I 
>>> specify these files as artifacts on the job uploading takes a fraction of 
>>> this time (< 3 minutes). Is there an undocumented way to send multiple 
>>> artifact files? I'm using the "Create artifact" (POST) for all files - 
>>> should I be using PUT? Is one method preferred over the other?
>>>
>>> I can't specify the files as artifacts on the job because I'm running 
>>> multiple instances of the job and manually uploading all artifacts to the 
>>> first instance.
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "go-cd" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to