Code Monkey home page Code Monkey logo

jenkins-php-api's People

Contributors

0bp avatar agallou avatar borales avatar chbiel avatar ianfixes avatar kuikui avatar marc-mabe avatar nickdaugherty avatar philipwhitt avatar srogier avatar terwey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jenkins-php-api's Issues

Error in README

Hi,

Nice to see some more stuff added to this. Just a quick one - the second example of launch in the readme should use launchAndWait, not launch.

/mikke

Build::getConsoleTextBuild error

It's impossible to get "console output" for the selected build via the \JenkinsApi\Item\Build::getConsoleTextBuild method.

https://github.com/chbiel/jenkins-php-api/blob/master/src/JenkinsApi/Item/Build.php#L225

The problem is that \JenkinsApi\Jenkins::get method tries to process the response data with the json_decode function and throws an exception (because received data is a plain text)

https://github.com/chbiel/jenkins-php-api/blob/master/src/JenkinsApi/Jenkins.php#L166


Maybe we could add additional parameter to the \JenkinsApi\Jenkins::get method like $raw = false and run the json_decode function depending on this parameter?

public function get($url, $depth = 1, $params = array(), array $curlOpts = [], $raw = false)

Launch with empty parameters failed

When I try to launch a job with empty parameters, I got below response:

<title>Error 403 No valid crumb was included in the request</title>

HTTP ERROR 403

Problem accessing /job/ICE/build. Reason:

    No valid crumb was included in the request


Powered by Jetty://
===== Codes:

$job=$jenkins->getJob('ICE');
$builds = $job->getBuilds();
echo "Last Builds:\n";
foreach ($builds as $build) {
/**
*
* @var JenkinsApi\Item\Build $build
*/
echo "Result:" . $build->getResult() . "\n";
echo "Timestamp:" . $build->getTimestamp() . "\n";
}
echo $job->launch();

Results:

Last Builds:
Result:FAILURE
Timestamp:1499054331
Result:SUCCESS
Timestamp:1498065719
Result:SUCCESS
Timestamp:1497838451
Result:SUCCESS
Timestamp:1497836036
Result:FAILURE
Timestamp:1497618011
Result:FAILURE
Timestamp:1497597399

<title>Error 403 No valid crumb was included in the request</title>

HTTP ERROR 403

Problem accessing /job/ICE/build. Reason:

    No valid crumb was included in the request


Powered by Jetty://

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.