how to use artifact_archiver ?

26 views
Skip to first unread message

Sabari

unread,
Feb 10, 2016, 4:57:47 PM2/10/16
to jenkins_api_client
I am trying to use artifact_archiver method to update artifact_files in my job. How can i do it ? I don't see a job name parameter in the method. I am not familiar with using xml files as well. if you can a provide a sample that would be great.


I tried this today,
artifact_params = {:name => "highpriority-chrome-test",:artifact_files => "test/report/**", :excludes => nil, :fingerprint => false, :allow_empty_archive => false, :only_if_successful => false, :default_excludes => false}
@job_handler.artifact_archiver(artifact_params,:xml => Nokogiri::XML::Builder)

I am getting the below error,
artifact_archiver': undefined methodhudson.tasks.ArtifactArchiver' for {:xml=>Nokogiri::XML::Builder}:Hash (NoMethodError)

does it mean artifact_archiver is only for Hudson and not Jenkins ?



Sabari

unread,
Feb 12, 2016, 10:59:32 AM2/12/16
to jenkins_api_client
:artifact_archiver => {:artifact_files => 'test/report/**'} fixed it.. 
Reply all
Reply to author
Forward
0 new messages