Artifactory-Client
view release on metacpan or search on metacpan
0.9.2 2015/10/11
Adding test data in manifest
0.9.1 2015/10/10
Added mithun's PR for calculate_bower_repository_metadata
0.9.0 2015/8/2
Releasing new features from PR
0.8.20 2015/3/31
Added build_upload API call
0.8.19 2015/3/12
Added artifacts_with_date_in_date_range call
0.8.18 2015/3/11
Added artifactory_query_language call
0.8.17 2015/3/9
Added push_artifacts_as_a_version_to_bintray API call
Added optional $filename argument to retrieve_artifact() call to handle large payload. Otherwise the entire
content would go into the HTTP::Response object
0.7.6 2014/7/11
Fixing synopsis as API changed
0.7.5 2014/7/7
Adding test xml to the distribution so that tests can run
0.7.4 2014/7/1
Updated deploy-related methods to take a filename then stream it so that large files can be uploaded without
reading into memory first.
0.7.3 2014/6/25
Updating POD
0.7.2 2014/6/24
Cleaned up logic to generate properties in matrix / non-matrix mode
0.7.1 2014/6/24
Added import_system_settings_example, full_system_import, export_system_settings_example, export_system
0.7.0 2014/6/23
Added retrieve_build_staging_strategy, execute_build_promotion, import_repository_content, uses Path::Tiny
instead of File::Slurp (although out of memory error persists on uploading a large archive)
0.6.2 2014/6/19
Updated contact info, fixed paths that resulted in errors on some Artifactory instances
0.6.1 2014/6/12
Added retrieve_all_available_plugin_info, retrieve_plugin_info_of_a_certain_type
0.6.0 2014/6/11
Added save_general_configuration, version_and_addons_information, execute_plugin_code
# BUILDS
## all\_builds
Retrieves information on all builds from artifactory.
## build\_runs( $build\_name )
Retrieves information of a particular build from artifactory.
## build\_upload( $path\_to\_json )
Upload Build
## build\_info( $build\_name, $build\_number )
Retrieves information of a particular build number.
## builds\_diff( $build\_name, $new\_build\_number, $old\_build\_number )
Retrieves diff of 2 builds
lib/Artifactory/Client.pm view on Meta::CPAN
Retrieves information of a particular build from artifactory.
=cut
sub build_runs {
my ( $self, $build ) = @_;
return $self->_get_build($build);
}
=head2 build_upload( $path_to_json )
Upload Build
=cut
sub build_upload {
my ( $self, $json_file ) = @_;
open( my $fh, '<', $json_file );
chomp( my @lines = <$fh> );
my $json_input = join( "", @lines );
my $data = $self->_json->decode($json_input);
my $url = $self->_api_url() . "/build";
return $self->put(
$url,
"Content-Type" => 'application/json',
t/01_unit.t view on Meta::CPAN
subtest 'build_runs', sub {
my $client = setup();
local *{'LWP::UserAgent::get'} = sub {
return $mock_responses{http_200};
};
my $resp = $client->build_runs('api-test');
is( $resp->code, 200, 'got build runs' );
};
subtest 'build_upload', sub {
my $client = setup();
local *{'LWP::UserAgent::put'} = sub {
return $mock_responses{http_200};
};
my $json_file = "$Bin/data/test.json";
my $resp = $client->build_upload($json_file);
is( $resp->code, 200, 'got build upload' );
};
subtest 'build_info', sub {
my $client = setup();
local *{'LWP::UserAgent::get'} = sub {
return $mock_responses{http_200};
};
my $resp = $client->build_info( 'api-test', 14 );
is( $resp->code, 200, 'got build info' );
( run in 1.293 second using v1.01-cache-2.11-cpan-b16cb0d3907 )