App-JenkinsCli
view release on metacpan or search on metacpan
=head1 SYNOPSIS
jenkins-cli [option] command
OPTIONS:
-b --base-url[=]str
The base url of the Jenkins instance to talk to
-U --username[=]str
The username to interact with Jenkins
-P --password[=]str
The passowrd of --username
-v --verbose Show more detailed option
--version Prints the version information
--help Prints this help information
--man Prints the full documentation for jenkins-cli
COMMANDS:
ls|list [search]
List jenkins jobs
=head1 CONFIGURATION
You can save your configuration into C<~/.jenkins-cli.yml> so that you don't
have to enter them each time. The following is an example of what the file
looks like:
---
base_url: http://localhost:8080/
username: admin
password: my-secrent-password
=head1 SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc App::JenkinsCli
You can also look for information at:
bin/jenkins-cli view on Meta::CPAN
my ($option, $auto, $errors) = @_;
my $sub_command = $option->cmd;
if ( $sub_command eq '--' ) {
warn '--';
}
},
},
[
'base_url|base-url|b=s',
'username|U=s',
'password|P=s',
'colors|c=s%',
'color!',
'test|T!',
'verbose|v+',
],
);
# do stuff here
my $jenkins = App::JenkinsCli->new(
base_url => $options->base_url || _error('Missing base_url!'),
api_key => $options->username || _error('Missing username!'),
api_pass => $options->password || _error('Missing password!'),
test => $options->test,
colours => $options->colors,
opt => $options,
);
return $jenkins->$cmd(@{ $opt->files }) || 0;
}
sub _error {
my ($msg) = @_;
bin/jenkins-cli view on Meta::CPAN
=head1 SYNOPSIS
jenkins-cli [option] command
OPTIONS:
-b --base-url[=]str
The base url of the Jenkins instance to talk to
-U --username[=]str
The username to interact with Jenkins
-P --password[=]str
The passowrd of --username
-v --verbose Show more detailed option
--version Prints the version information
--help Prints this help information
--man Prints the full documentation for jenkins-cli
COMMANDS:
ls|list [search]
List jenkins jobs
bin/jenkins-cli view on Meta::CPAN
=head1 CONFIGURATION AND ENVIRONMENT
You can save your configuration into C<~/.jenkins-cli.yml> so that you don't
have to enter them each time. The following is an example of what the file
looks like:
---
base_url: http://localhost:8080/
username: admin
password: my-secrent-password
=head1 DEPENDENCIES
=head1 INCOMPATIBILITIES
=head1 BUGS AND LIMITATIONS
There are no known bugs in this module.
Please report problems to Ivan Wills (ivan.wills@gmail.com).
example/rebuild-to-success view on Meta::CPAN
name => 'jenkins-cli',
conf_prefix => '.',
helper => 1,
default => {
sleep => 10,
},
},
[
'base_url|base-url|b=s',
'username|U=s',
'password|P=s',
'start',
'sleep|s=i',
'verbose|v+',
],
);
# do stuff here
my $jenkins = Jenkins::API->new({
base_url => $options->base_url,
api_key => $options->username,
api_pass => $options->password,
});
my $job = shift @ARGV || die "No job supplied!\n";
my ($result, $build) = status($jenkins, $job);
my $number = $result->{nextBuildNumber} - 1;
while ( $build->{building} || $build->{result} ne 'SUCCESS' ) {
if ( ! $build->{building} && $build->{number} == $number ) {
warn "$job : Retrying\n";
lib/App/JenkinsCli.pm view on Meta::CPAN
=item base_url
The base URL of Jenkins
=item api_key
The username to access jenkins by
=item api_pass
The password to access jenkins by
=item test
Flag to not actually perform changes
=item jenkins
Internal L<Jenkins::API> object
=item colours
( run in 0.254 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )