Comments (9)
Can you please open in browser next url, and share result with me:
http://<JENKINS_URL>/job/<JOBNAME>/api/json?depth=1&tree=builds[id,timestamp,result,url,building,culprits[fullName]]
just replace two vars inside.
from jenkins.el.
Here's a response, with some strings replaced with placeholders to protect the innocent:
{"builds":[{"building":false,"id":"2015-10-27_02-05-28","result":"UNSTABLE","timestamp":1445925928909,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1596/","culprits":[]},{"building":false,"id":"2015-10-26_12-37-09","result":"SUCCESS","timestamp":1445877429000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1595/","culprits":[{"fullName":"<USER>"}]},{"building":false,"id":"2015-10-26_02-12-15","result":"SUCCESS","timestamp":1445839935000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1594/","culprits":[]},{"building":false,"id":"2015-10-25_02-05-21","result":"SUCCESS","timestamp":1445753121000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1593/","culprits":[]},{"building":false,"id":"2015-10-24_15-29-09","result":"SUCCESS","timestamp":1445714949000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1592/","culprits":[{"fullName":"<USER>"}]},{"building":false,"id":"2015-10-24_01-56-28","result":"SUCCESS","timestamp":1445666188000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1591/","culprits":[]},{"building":false,"id":"2015-10-23_02-04-25","result":"SUCCESS","timestamp":1445580265000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1590/","culprits":[]},{"building":false,"id":"2015-10-22_01-47-19","result":"SUCCESS","timestamp":1445492839000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1589/","culprits":[]},{"building":false,"id":"2015-10-21_19-09-46","result":"SUCCESS","timestamp":1445468986000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1588/","culprits":[{"fullName":"<USER>"}]},{"building":false,"id":"2015-10-21_16-57-30","result":"SUCCESS","timestamp":1445461050000,"url":"http://<JENKINS_URL>/job/<JOBNAME>/1587/","culprits":[{"fullName":"<USER>"}]}]}
from jenkins.el.
Sorry, i can't understand what might be broken on your side. For example, if we mock retrieving data and paste there json you've provided - it works fine:
(setq glucas-response "{\"builds\":[{\"building\":false,\"id\":\"2015-10-27_02-05-28\",\"result\":\"UNSTABLE\",\"timestamp\":1445925928909,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1596/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-26_12-37-09\",\"result\":\"SUCCESS\",\"timestamp\":1445877429000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1595/\",\"culprits\":[{\"fullName\":\"<USER>\"}]},{\"building\":false,\"id\":\"2015-10-26_02-12-15\",\"result\":\"SUCCESS\",\"timestamp\":1445839935000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1594/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-25_02-05-21\",\"result\":\"SUCCESS\",\"timestamp\":1445753121000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1593/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-24_15-29-09\",\"result\":\"SUCCESS\",\"timestamp\":1445714949000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1592/\",\"culprits\":[{\"fullName\":\"<USER>\"}]},{\"building\":false,\"id\":\"2015-10-24_01-56-28\",\"result\":\"SUCCESS\",\"timestamp\":1445666188000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1591/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-23_02-04-25\",\"result\":\"SUCCESS\",\"timestamp\":1445580265000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1590/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-22_01-47-19\",\"result\":\"SUCCESS\",\"timestamp\":1445492839000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1589/\",\"culprits\":[]},{\"building\":false,\"id\":\"2015-10-21_19-09-46\",\"result\":\"SUCCESS\",\"timestamp\":1445468986000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1588/\",\"culprits\":[{\"fullName\":\"<USER>\"}]},{\"building\":false,\"id\":\"2015-10-21_16-57-30\",\"result\":\"SUCCESS\",\"timestamp\":1445461050000,\"url\":\"http://<JENKINS_URL>/job/<JOBNAME>/1587/\",\"culprits\":[{\"fullName\":\"<USER>\"}]}]}")
(flet ((jenkins--retrieve-page-as-json (url) (json-read-from-string glucas-response)))
(jenkins-enter-job "airborne-dev"))
You can try to execute this code, just paste this to empty buffer and execute:
M-x eval-buffer
from jenkins.el.
Hi,
I'm having the same error. Evaluating that data, I get this error: mapcar: Wrong type argument: sequencep, :json-false
Could it be related to emacs version? M-x emacs-version
GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.2) of 2015-10-26
Will try to debug it
from jenkins.el.
For me, It's failing in https://github.com/rmuslimov/jenkins.el/blob/master/jenkins.el#L293
Debugging, the value of item is:
((building . :json-false) (id . "382") (result . "SUCCESS") (timestamp . 1447159882765) (url . "https://jenkins.3sca.net/job/cubert-pr/382/") (culprits . []))
Probably something changed in jenkins response, because in the code you're doing (let ((culprits (cdar item)))
and that is :json-false
(it's accessing to building property).
I'm using jenkins version 1.636
from jenkins.el.
It could be related to version -- I am also on GNU Emacs 25.0.50.1 (2015-10-05).
from jenkins.el.
Ah, you're it might be version issue - will check soon, thanks!
from jenkins.el.
Guys, can you please check and let me know if issue has been fixed with latest changes. I got the same bug on latest emacs, and now it fixed for me. Thanks!
from jenkins.el.
It's working well for me, thanks @rmuslimov
from jenkins.el.
Related Issues (20)
- A few jobs on several servers HOT 1
- Reading credentials from encrypted file HOT 1
- Make http request async HOT 1
- It would be nice to have the jenkins-status column width customizable HOT 5
- Would be nice to be able to refresh the job view buffer
- JSON read table error HOT 3
- Dmitri HOT 1
- Would be nice to accept self signed certificicates
- Job details erroring out HOT 3
- handle better HTTP authentication HOT 1
- Unable to launch job HOT 10
- Ability to view jenkins without being logged in
- Read API token using `auth-source` HOT 1
- gentoo app-emacs/jenkins dependancy issue
- Add support for folders
- Longer user id makes Authorization header invalid
- [Feature Request] Switch between multiple Jenkins instances
- Multibranch pipeline not supported
- JSON readtable error when trying to connect to Jenkins using API key
- jenkins-hostname expects a trailing slash HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jenkins.el.