Jenkins is useful for monitoring the non-interactive execution of processes, such as cron jobs, procmail, inetd-launched processes. This library facilates Jenkins integration for PHP projects and processes running in a PHP environment.
Monitoring external jobs in Jenkins
Via Composer
$ composer require softius/jenkins-job-monitor
A process result can be submitted using the command jenkins-job-monitor monitor
as indicated below.
jenkins-job-monitor monitor http://acme.org/jenkins jobName 'ls -lah'
A process result can be submitted using the command jenkins-job-monitor push
. This approach is only useful when the process output and total execution are already available and it's only necessary to push the data to Jenkins.
jenkins-job-monitor push http://acme.org/jenkins jobName --log "Command results" --duration 5
Large log results can be transported through pipe as shown below.
cat results.txt | jenkins-job-monitor push http://acme.org/jenkins jobName --duration 5
$ composer test
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.