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'
\
      -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]>
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].
> 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